本文整理了Java中us.ihmc.robotics.math.trajectories.waypoints.YoFrameEuclideanTrajectoryPoint.getTime()
方法的一些代码示例,展示了YoFrameEuclideanTrajectoryPoint.getTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoFrameEuclideanTrajectoryPoint.getTime()
方法的具体详情如下:
包路径:us.ihmc.robotics.math.trajectories.waypoints.YoFrameEuclideanTrajectoryPoint
类名称:YoFrameEuclideanTrajectoryPoint
方法名:getTime
暂无
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public double getLastWaypointTime()
{
return waypoints.get(numberOfWaypoints.getIntegerValue() - 1).getTime();
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public double getLastWaypointTime()
{
return waypoints.get(numberOfWaypoints.getIntegerValue() - 1).getTime();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
private void initializeSubTrajectory(int waypointIndex)
{
int secondWaypointIndex = Math.min(waypointIndex + 1, numberOfWaypoints.getValue() - 1);
YoFrameEuclideanTrajectoryPoint start = waypoints.get(waypointIndex);
YoFrameEuclideanTrajectoryPoint end = waypoints.get(secondWaypointIndex);
subTrajectory.setCubic(0.0, end.getTime() - start.getTime(), start.getPosition(), start.getLinearVelocity(), end.getPosition(), end.getLinearVelocity());
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
@Override
public boolean isDone()
{
if (isEmpty())
return true;
boolean isLastWaypoint = currentWaypointIndex.getIntegerValue() >= numberOfWaypoints.getIntegerValue() - 2;
if (!isLastWaypoint)
return false;
return currentTrajectoryTime.getValue() >= waypoints.get(currentWaypointIndex.getValue() + 1).getTime();
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
@Override
public void compute(double time)
{
currentTrajectoryTime.set(time);
if (currentWaypointIndex.getIntegerValue() < numberOfWaypoints.getIntegerValue() - 2
&& time >= waypoints.get(currentWaypointIndex.getIntegerValue() + 1).getTime())
{
currentWaypointIndex.increment();
initializeSubTrajectory(currentWaypointIndex.getIntegerValue());
}
double subTrajectoryTime = time - waypoints.get(currentWaypointIndex.getIntegerValue()).getTime();
subTrajectory.compute(subTrajectoryTime);
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public void setTrajectoryParameters(YoFrameEuclideanTrajectoryPoint initialYoFrameEuclideanWaypoint, YoFrameEuclideanTrajectoryPoint finalYoFrameEuclideanWaypoint)
{
setTrajectoryTime(finalYoFrameEuclideanWaypoint.getTime() - initialYoFrameEuclideanWaypoint.getTime());
initialPosition.set(initialYoFrameEuclideanWaypoint.getPosition());
initialVelocity.set(initialYoFrameEuclideanWaypoint.getLinearVelocity());
finalPosition.set(finalYoFrameEuclideanWaypoint.getPosition());
finalVelocity.set(finalYoFrameEuclideanWaypoint.getLinearVelocity());
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void setTrajectoryParameters(YoFrameEuclideanTrajectoryPoint initialYoFrameEuclideanWaypoint, YoFrameEuclideanTrajectoryPoint finalYoFrameEuclideanWaypoint)
{
setTrajectoryTime(finalYoFrameEuclideanWaypoint.getTime() - initialYoFrameEuclideanWaypoint.getTime());
initialPosition.set(initialYoFrameEuclideanWaypoint.getPosition());
initialVelocity.set(initialYoFrameEuclideanWaypoint.getLinearVelocity());
finalPosition.set(finalYoFrameEuclideanWaypoint.getPosition());
finalVelocity.set(finalYoFrameEuclideanWaypoint.getLinearVelocity());
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
boolean changedSubTrajectory = false;
if (time < waypoints.get(currentWaypointIndex.getIntegerValue()).getTime())
&& time >= waypoints.get(currentWaypointIndex.getIntegerValue() + 1).getTime())
YoFrameEuclideanTrajectoryPoint end = waypoints.get(secondWaypointIndex);
if (time < start.getTime())
return;
if (time > end.getTime())
if (Precision.equals(start.getTime(), end.getTime()))
double subTrajectoryTime = MathTools.clamp(time - start.getTime(), 0.0, end.getTime() - start.getTime());
subTrajectory.compute(subTrajectoryTime);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
assertTrue(Double.isNaN(testedYoFrameEuclideanTrajectoryPoint.getTime()));
assertTrue(testedYoFrameEuclideanTrajectoryPoint.getPosition().containsNaN());
assertTrue(testedYoFrameEuclideanTrajectoryPoint.getLinearVelocity().containsNaN());
assertTrue(Double.isNaN(testedYoFrameEuclideanTrajectoryPoint.getTime()));
assertTrue(testedYoFrameEuclideanTrajectoryPoint.getPosition().containsNaN());
assertTrue(testedYoFrameEuclideanTrajectoryPoint.getLinearVelocity().containsNaN());
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
expectedYoFrameEuclideanTrajectoryPoint.setLinearVelocity(linearVelocity);
assertEquals(3.4, yoFrameEuclideanTrajectoryPoint.getTime(), 1e-7);
assertEquals(3.4, expectedYoFrameEuclideanTrajectoryPoint.getTime(), 1e-7);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
testedYoFrameEuclideanTrajectoryPoint.getTime(), testedYoFrameEuclideanTrajectoryPoint.getPosition(),
testedYoFrameEuclideanTrajectoryPoint.getLinearVelocity(), testedYoFrameEuclideanTrajectoryPoint, epsilon);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
yoFrameEuclideanTrajectoryPoint.getLinearVelocity(linearVelocityForVerification);
assertEquals(time, yoFrameEuclideanTrajectoryPoint.getTime(), 1e-10);
assertTrue(pointForVerification.epsilonEquals(position, 1e-10));
assertTrue(linearVelocityForVerification.epsilonEquals(linearVelocity, 1e-10));
linearVelocityForVerification.set(8.8, 1.4, 9.22);
assertFalse(Math.abs(yoFrameEuclideanTrajectoryPoint.getTime() - time) < 1e-7);
assertFalse(pointForVerification.epsilonEquals(position, 1e-7));
assertFalse(linearVelocityForVerification.epsilonEquals(linearVelocity, 1e-7));
yoFrameEuclideanTrajectoryPoint.getLinearVelocity(linearVelocity);
assertEquals(time, yoFrameEuclideanTrajectoryPoint.getTime(), 1e-10);
assertTrue(pointForVerification.epsilonEquals(position, 1e-10));
assertTrue(linearVelocityForVerification.epsilonEquals(linearVelocity, 1e-10));
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
assertEquals(expectedTime, testedYoFrameEuclideanTrajectoryPoint.getTime(), epsilon);
assertEquals(expectedNamePrefix, testedYoFrameEuclideanTrajectoryPoint.getNamePrefix());
assertEquals(expectedNameSuffix, testedYoFrameEuclideanTrajectoryPoint.getNameSuffix());
内容来源于网络,如有侵权,请联系作者删除!