- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中us.ihmc.robotics.math.trajectories.YoParabolicTrajectoryGenerator
类的一些代码示例,展示了YoParabolicTrajectoryGenerator
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoParabolicTrajectoryGenerator
类的具体详情如下:
包路径:us.ihmc.robotics.math.trajectories.YoParabolicTrajectoryGenerator
类名称:YoParabolicTrajectoryGenerator
暂无
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public void getPosition(FramePoint positionToPack)
{
double parameter = minimumJerkTrajectory.getPosition();
parameter = MathTools.clipToMinMax(parameter, 0.0, 1.0);
parabolicTrajectoryGenerator.getPosition(positionToPack, parameter);
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public ReferenceFrame getReferenceFrame()
{
return parabolicTrajectoryGenerator.getReferenceFrame();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testInitialVelocity()
{
YoVariableRegistry registry = new YoVariableRegistry("registry");
Random random = new Random(186L);
ReferenceFrame referenceFrame = ReferenceFrame.getWorldFrame();
YoParabolicTrajectoryGenerator trajectoryGenerator = new YoParabolicTrajectoryGenerator("test", referenceFrame, registry);
FramePoint3D initialPosition = new FramePoint3D(referenceFrame, RandomGeometry.nextVector3D(random));
FrameVector3D initialVelocity = new FrameVector3D(referenceFrame, RandomGeometry.nextVector3D(random));
FramePoint3D finalPosition = new FramePoint3D(referenceFrame, RandomGeometry.nextVector3D(random));
trajectoryGenerator.initialize(initialPosition, initialVelocity, finalPosition);
FramePoint3D initialPositionBack = new FramePoint3D(referenceFrame);
trajectoryGenerator.getPosition(initialPositionBack, 0.0);
FrameVector3D initialVelocityBack = new FrameVector3D(referenceFrame);
trajectoryGenerator.getVelocity(initialVelocityBack, 0.0);
FramePoint3D finalPositionBack = new FramePoint3D(referenceFrame);
trajectoryGenerator.getPosition(finalPositionBack, 1.0);
double delta = 0.0;
EuclidCoreTestTools.assertTuple3DEquals(initialPosition, initialPositionBack, delta);
EuclidCoreTestTools.assertTuple3DEquals(initialVelocity, initialVelocityBack, delta);
EuclidCoreTestTools.assertTuple3DEquals(finalPosition, finalPositionBack, delta);
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testConditions()
{
YoVariableRegistry registry = new YoVariableRegistry("registry");
ReferenceFrame referenceFrame = ReferenceFrame.getWorldFrame();
FramePoint3D initialPosition = new FramePoint3D(referenceFrame, 0.0, 0.0, 0.0);
FramePoint3D intermediatePosition = new FramePoint3D(referenceFrame, 0.5, 0.5, 2.5);
FramePoint3D finalPosition = new FramePoint3D(referenceFrame, 1.0, 1.0, 1.0);
double intermediateParameter = 0.5;
YoParabolicTrajectoryGenerator trajectoryGenerator = new YoParabolicTrajectoryGenerator("test", referenceFrame, registry);
trajectoryGenerator.initialize(initialPosition, intermediatePosition, finalPosition, intermediateParameter);
double delta = 1e-10;
FramePoint3D positionToPack = new FramePoint3D(referenceFrame);
trajectoryGenerator.getPosition(positionToPack, 0.0);
EuclidCoreTestTools.assertTuple3DEquals(initialPosition, positionToPack, delta);
trajectoryGenerator.getPosition(positionToPack, intermediateParameter);
EuclidCoreTestTools.assertTuple3DEquals(intermediatePosition, positionToPack, delta);
trajectoryGenerator.getPosition(positionToPack, 1.0);
EuclidCoreTestTools.assertTuple3DEquals(finalPosition, positionToPack, delta);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void getAcceleration(FrameVector3D accelerationToPack)
{
double parameter = minimumJerkTrajectory.getPosition();
parameter = MathTools.clamp(parameter, 0.0, 1.0);
parabolicTrajectoryGenerator.getAcceleration(accelerationToPack);
accelerationToPack.scale(minimumJerkTrajectory.getVelocity() * minimumJerkTrajectory.getVelocity());
parabolicTrajectoryGenerator.getVelocity(tempVector, parameter);
tempVector.scale(minimumJerkTrajectory.getAcceleration());
accelerationToPack.add(tempVector);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000,expected = RuntimeException.class)
public void testIllegalParameter2()
{
double intermediateParameter = -0.1;
ReferenceFrame referenceFrame = ReferenceFrame.getWorldFrame();
FramePoint3D initialPosition = new FramePoint3D(referenceFrame, 0.0, 0.0, 0.0);
FramePoint3D intermediatePosition = new FramePoint3D(referenceFrame, 0.5, 0.5, 2.5);
FramePoint3D finalPosition = new FramePoint3D(referenceFrame, 1.0, 1.0, 1.0);
YoVariableRegistry registry = new YoVariableRegistry("registry");
YoParabolicTrajectoryGenerator trajectoryGenerator = new YoParabolicTrajectoryGenerator("test", referenceFrame, registry);
trajectoryGenerator.initialize(initialPosition, intermediatePosition, finalPosition, intermediateParameter);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void initialize()
{
timeIntoStep.set(0.0);
this.stepTime.set(stepTimeProvider.getValue());
if (stepTime.getDoubleValue() < 1e-10)
{
stepTime.set(1e-10);
}
minimumJerkTrajectory.setParams(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, stepTime.getDoubleValue());
double middleOfTrajectoryParameter = 0.5;
FramePoint3D initialPosition = new FramePoint3D(ReferenceFrame.getWorldFrame());
initialPositionProvider.getPosition(initialPosition);
FramePoint3D finalPosition = new FramePoint3D(ReferenceFrame.getWorldFrame());
finalPositionProvider.getPosition(finalPosition);
initialPosition.changeFrame(parabolicTrajectoryGenerator.getReferenceFrame());
finalPosition.changeFrame(parabolicTrajectoryGenerator.getReferenceFrame());
double maxAnkleHeight = Math.max(initialPosition.getZ(), finalPosition.getZ());
double apexHeight = maxAnkleHeight + groundClearance.getDoubleValue();
parabolicTrajectoryGenerator.initialize(initialPosition, finalPosition, apexHeight, middleOfTrajectoryParameter);
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public void getVelocity(FrameVector velocityToPack)
{
double parameter = minimumJerkTrajectory.getPosition();
parameter = MathTools.clipToMinMax(parameter, 0.0, 1.0);
parabolicTrajectoryGenerator.getVelocity(tempVector, parameter);
velocityToPack.setIncludingFrame(tempVector);
velocityToPack.scale(minimumJerkTrajectory.getVelocity());
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public void initialize(FramePoint initialPosition, FrameVector initialVelocity, FrameVector initialAcceleration, FramePoint finalDesiredPosition,
FrameVector finalDesiredVelocity)
{
timeIntoStep.set(0.0);
this.stepTime.set(stepTimeProvider.getValue());
if (stepTime.getDoubleValue() < 1e-10)
{
stepTime.set(1e-10);
}
minimumJerkTrajectory.setParams(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, stepTime.getDoubleValue());
double middleOfTrajectoryParameter = 0.5;
parabolicTrajectoryGenerator.initialize(initialPosition, finalDesiredPosition, groundClearance.getDoubleValue(), middleOfTrajectoryParameter);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public ParabolicCartesianTrajectoryGenerator(String namePrefix, ReferenceFrame referenceFrame, DoubleProvider stepTimeProvider, double groundClearance,
YoVariableRegistry parentRegistry)
{
this.registry = new YoVariableRegistry(namePrefix + namePostFix);
this.minimumJerkTrajectory = new YoMinimumJerkTrajectory(namePrefix, registry);
this.parabolicTrajectoryGenerator = new YoParabolicTrajectoryGenerator(namePrefix, referenceFrame, registry);
this.groundClearance = new YoDouble("groundClearance", registry);
this.stepTime = new YoDouble("stepTime", registry);
this.timeIntoStep = new YoDouble("timeIntoStep", registry);
parentRegistry.addChild(registry);
this.stepTimeProvider = stepTimeProvider;
this.groundClearance.set(groundClearance);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
Random random = new Random(186L);
ReferenceFrame referenceFrame = ReferenceFrame.getWorldFrame();
YoParabolicTrajectoryGenerator trajectoryGenerator = new YoParabolicTrajectoryGenerator("test", referenceFrame, registry);
FramePoint3D finalPosition = new FramePoint3D(referenceFrame, RandomGeometry.nextVector3D(random));
double intermediateParameter = random.nextDouble();
trajectoryGenerator.initialize(initialPosition, intermediatePosition, finalPosition, intermediateParameter);
double parameter = random.nextDouble();
trajectoryGenerator.getPosition(position1, parameter);
trajectoryGenerator.getPosition(position2, parameter + dt);
trajectoryGenerator.getVelocity(velocityFromTrajectoryGenerator, parameter);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000,expected = RuntimeException.class)
public void testIllegalParameter3()
{
ReferenceFrame referenceFrame = ReferenceFrame.getWorldFrame();
YoParabolicTrajectoryGenerator trajectoryGenerator = null;
try
{
double intermediateParameter = 0.7;
FramePoint3D initialPosition = new FramePoint3D(referenceFrame, 0.0, 0.0, 0.0);
FramePoint3D intermediatePosition = new FramePoint3D(referenceFrame, 0.5, 0.5, 2.5);
FramePoint3D finalPosition = new FramePoint3D(referenceFrame, 1.0, 1.0, 1.0);
YoVariableRegistry registry = new YoVariableRegistry("registry");
trajectoryGenerator = new YoParabolicTrajectoryGenerator("test", referenceFrame, registry);
trajectoryGenerator.initialize(initialPosition, intermediatePosition, finalPosition, intermediateParameter);
}
catch (RuntimeException e)
{
fail();
}
FramePoint3D positionToPack = new FramePoint3D(referenceFrame);
trajectoryGenerator.getPosition(positionToPack, 1.1);
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public void getAcceleration(FrameVector accelerationToPack)
{
double parameter = minimumJerkTrajectory.getPosition();
parameter = MathTools.clipToMinMax(parameter, 0.0, 1.0);
parabolicTrajectoryGenerator.getAcceleration(accelerationToPack);
accelerationToPack.scale(minimumJerkTrajectory.getVelocity() * minimumJerkTrajectory.getVelocity());
parabolicTrajectoryGenerator.getVelocity(tempVector, parameter);
tempVector.scale(minimumJerkTrajectory.getAcceleration());
accelerationToPack.add(tempVector);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000,expected = RuntimeException.class)
public void testIllegalParameter1()
{
double intermediateParameter = 1.1;
ReferenceFrame referenceFrame = ReferenceFrame.getWorldFrame();
FramePoint3D initialPosition = new FramePoint3D(referenceFrame, 0.0, 0.0, 0.0);
FramePoint3D intermediatePosition = new FramePoint3D(referenceFrame, 0.5, 0.5, 2.5);
FramePoint3D finalPosition = new FramePoint3D(referenceFrame, 1.0, 1.0, 1.0);
YoVariableRegistry registry = new YoVariableRegistry("registry");
YoParabolicTrajectoryGenerator trajectoryGenerator = new YoParabolicTrajectoryGenerator("test", referenceFrame, registry);
trajectoryGenerator.initialize(initialPosition, intermediatePosition, finalPosition, intermediateParameter);
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public void initialize()
{
timeIntoStep.set(0.0);
this.stepTime.set(stepTimeProvider.getValue());
if (stepTime.getDoubleValue() < 1e-10)
{
stepTime.set(1e-10);
}
minimumJerkTrajectory.setParams(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, stepTime.getDoubleValue());
double middleOfTrajectoryParameter = 0.5;
FramePoint initialPosition = new FramePoint(ReferenceFrame.getWorldFrame());
initialPositionProvider.getPosition(initialPosition);
FramePoint finalPosition = new FramePoint(ReferenceFrame.getWorldFrame());
finalPositionProvider.getPosition(finalPosition);
initialPosition.changeFrame(parabolicTrajectoryGenerator.getReferenceFrame());
finalPosition.changeFrame(parabolicTrajectoryGenerator.getReferenceFrame());
double maxAnkleHeight = Math.max(initialPosition.getZ(), finalPosition.getZ());
double apexHeight = maxAnkleHeight + groundClearance.getDoubleValue();
parabolicTrajectoryGenerator.initialize(initialPosition, finalPosition, apexHeight, middleOfTrajectoryParameter);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void getVelocity(FrameVector3D velocityToPack)
{
double parameter = minimumJerkTrajectory.getPosition();
parameter = MathTools.clamp(parameter, 0.0, 1.0);
parabolicTrajectoryGenerator.getVelocity(tempVector, parameter);
velocityToPack.setIncludingFrame(tempVector);
velocityToPack.scale(minimumJerkTrajectory.getVelocity());
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@Override
public void initialize(FramePoint3D initialPosition, FrameVector3D initialVelocity, FrameVector3D initialAcceleration, FramePoint3D finalDesiredPosition,
FrameVector3D finalDesiredVelocity)
{
timeIntoStep.set(0.0);
this.stepTime.set(stepTimeProvider.getValue());
if (stepTime.getDoubleValue() < 1e-10)
{
stepTime.set(1e-10);
}
minimumJerkTrajectory.setParams(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, stepTime.getDoubleValue());
double middleOfTrajectoryParameter = 0.5;
parabolicTrajectoryGenerator.initialize(initialPosition, finalDesiredPosition, groundClearance.getDoubleValue(), middleOfTrajectoryParameter);
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public ParabolicCartesianTrajectoryGenerator(String namePrefix, ReferenceFrame referenceFrame, DoubleProvider stepTimeProvider, double groundClearance,
YoVariableRegistry parentRegistry)
{
this.registry = new YoVariableRegistry(namePrefix + namePostFix);
this.minimumJerkTrajectory = new YoMinimumJerkTrajectory(namePrefix, registry);
this.parabolicTrajectoryGenerator = new YoParabolicTrajectoryGenerator(namePrefix, referenceFrame, registry);
this.groundClearance = new DoubleYoVariable("groundClearance", registry);
this.stepTime = new DoubleYoVariable("stepTime", registry);
this.timeIntoStep = new DoubleYoVariable("timeIntoStep", registry);
parentRegistry.addChild(registry);
this.stepTimeProvider = stepTimeProvider;
this.groundClearance.set(groundClearance);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testApex()
{
YoVariableRegistry registry = new YoVariableRegistry("registry");
ReferenceFrame referenceFrame = ReferenceFrame.getWorldFrame();
FramePoint3D initialPosition = new FramePoint3D(referenceFrame, 0.0, 0.0, 0.0);
FramePoint3D intermediatePosition = new FramePoint3D(referenceFrame, 0.5, 0.5, 2.5);
FramePoint3D finalPosition = new FramePoint3D(referenceFrame, 1.0, 1.0, 0.0);
double intermediateParameter = 0.5;
YoParabolicTrajectoryGenerator trajectoryGenerator = new YoParabolicTrajectoryGenerator("test", referenceFrame, registry);
trajectoryGenerator.initialize(initialPosition, intermediatePosition, finalPosition, intermediateParameter);
double delta = 1e-10;
FramePoint3D positionToPack = new FramePoint3D(referenceFrame);
int n = 1000;
double smallestDifference = Double.POSITIVE_INFINITY;
for (int i = 0; i < n; i++)
{
double parameter = i / (double) n;
trajectoryGenerator.getPosition(positionToPack, parameter);
double difference = intermediatePosition.getZ() - positionToPack.getZ();
if (difference < smallestDifference)
smallestDifference = difference;
}
assertTrue(smallestDifference < delta);
assertTrue(smallestDifference >= 0.0);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void getAcceleration(FrameVector3D accelerationToPack)
{
double parameter = minimumJerkTrajectory.getPosition();
parameter = MathTools.clamp(parameter, 0.0, 1.0);
parabolicTrajectoryGenerator.getAcceleration(accelerationToPack);
accelerationToPack.scale(minimumJerkTrajectory.getVelocity() * minimumJerkTrajectory.getVelocity());
parabolicTrajectoryGenerator.getVelocity(tempVector, parameter);
tempVector.scale(minimumJerkTrajectory.getAcceleration());
accelerationToPack.add(tempVector);
}
本文整理了Java中us.ihmc.robotDataLogger.YoVariableServer类的一些代码示例,展示了YoVariableServer类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中us.ihmc.robotDataLogger.YoVariableClient类的一些代码示例,展示了YoVariableClient类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中us.ihmc.kalman.YoKalmanFilter类的一些代码示例,展示了YoKalmanFilter类的具体用法。这些代码示例主要来源于Github/Stackoverf
本文整理了Java中us.ihmc.robotDataLogger.YoVariablesUpdatedListener类的一些代码示例,展示了YoVariablesUpdatedListener类的
本文整理了Java中us.ihmc.robotics.screwTheory.Wrench类的一些代码示例,展示了Wrench类的具体用法。这些代码示例主要来源于Github/Stackoverflo
本文整理了Java中us.ihmc.mecano.spatial.Wrench类的一些代码示例,展示了Wrench类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mave
本文整理了Java中us.ihmc.yoVariables.variable.YoVariable类的一些代码示例,展示了YoVariable类的具体用法。这些代码示例主要来源于Github/Stac
本文整理了Java中us.ihmc.yoVariables.variable.YoLong类的一些代码示例,展示了YoLong类的具体用法。这些代码示例主要来源于Github/Stackoverflo
本文整理了Java中us.ihmc.yoVariables.variable.YoFrameVector3D类的一些代码示例,展示了YoFrameVector3D类的具体用法。这些代码示例主要来源于G
本文整理了Java中us.ihmc.yoVariables.variable.YoEnum类的一些代码示例,展示了YoEnum类的具体用法。这些代码示例主要来源于Github/Stackoverflo
本文整理了Java中us.ihmc.yoVariables.variable.YoFramePoint3D类的一些代码示例,展示了YoFramePoint3D类的具体用法。这些代码示例主要来源于Git
本文整理了Java中us.ihmc.graphicsDescription.yoGraphics.YoGraphicsList类的一些代码示例,展示了YoGraphicsList类的具体用法。这些代码
本文整理了Java中us.ihmc.yoVariables.variable.YoBoolean类的一些代码示例,展示了YoBoolean类的具体用法。这些代码示例主要来源于Github/Stacko
本文整理了Java中us.ihmc.yoVariables.variable.YoInteger类的一些代码示例,展示了YoInteger类的具体用法。这些代码示例主要来源于Github/Stacko
本文整理了Java中us.ihmc.graphicsDescription.yoGraphics.YoGraphicPosition类的一些代码示例,展示了YoGraphicPosition类的具体用
本文整理了Java中us.ihmc.graphicsDescription.appearance.YoAppearance类的一些代码示例,展示了YoAppearance类的具体用法。这些代码示例主要
本文整理了Java中us.ihmc.graphicsDescription.yoGraphics.YoGraphicsListRegistry类的一些代码示例,展示了YoGraphicsListReg
本文整理了Java中us.ihmc.yoVariables.variable.YoDouble类的一些代码示例,展示了YoDouble类的具体用法。这些代码示例主要来源于Github/Stackove
本文整理了Java中us.ihmc.yoVariables.variable.YoFrameVector2D类的一些代码示例,展示了YoFrameVector2D类的具体用法。这些代码示例主要来源于G
本文整理了Java中us.ihmc.codecs.yuv.YUVPictureConverter类的一些代码示例,展示了YUVPictureConverter类的具体用法。这些代码示例主要来源于Git
我是一名优秀的程序员,十分优秀!