gpt4 book ai didi

us.ihmc.robotics.math.trajectories.YoSpline3D.getVelocityCopy()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 15:53:31 26 4
gpt4 key购买 nike

本文整理了Java中us.ihmc.robotics.math.trajectories.YoSpline3D.getVelocityCopy()方法的一些代码示例,展示了YoSpline3D.getVelocityCopy()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoSpline3D.getVelocityCopy()方法的具体详情如下:
包路径:us.ihmc.robotics.math.trajectories.YoSpline3D
类名称:YoSpline3D
方法名:getVelocityCopy

YoSpline3D.getVelocityCopy介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

FrameVector3D pd0 = splines.get(0).getVelocityCopy();
FrameVector3D pdd0 = splines.get(0).getAccelerationCopy();
splines.get(2).compute(times[i + 1]);
FrameVector3D pdf = splines.get(2).getVelocityCopy();
FrameVector3D pddf = splines.get(2).getAccelerationCopy();
spline.setQuintic(t0, tf, p0, pd0, pdd0, pf, pdf, pddf);

代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit

FrameVector pd0 = splines.get(0).getVelocityCopy();
FrameVector pdd0 = splines.get(0).getAccelerationCopy();
splines.get(2).compute(times[i + 1]);
FrameVector pdf = splines.get(2).getVelocityCopy();
FrameVector pddf = splines.get(2).getAccelerationCopy();
spline.setQuintic(t0, tf, p0, pd0, pdd0, pf, pdf, pddf);

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test

@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testGetAcceleration()
{
  Random random = new Random(4561955L);
  YoSpline3D spline = generateRandomQuintic(random);
  double t = 2 * (random.nextDouble() - 1);
  double dt = 1e-9;
  spline.compute(t);
  FrameVector3D actual = spline.getAccelerationCopy();
  FrameVector3D vel1 = spline.getVelocityCopy();
  spline.compute(t + dt);
  FrameVector3D vel2 = spline.getVelocityCopy();
  FrameVector3D numerical = new FrameVector3D(worldFrame, (vel2.getX() - vel1.getX()) / dt, (vel2.getY() - vel1.getY()) / dt, (vel2.getZ() - vel1.getZ()) / dt);
  assertEquals(numerical.getX(), actual.getX(), Math.abs(actual.getX()) * 1e-5);
  assertEquals(numerical.getY(), actual.getY(), Math.abs(actual.getY()) * 1e-5);
  assertEquals(numerical.getZ(), actual.getZ(), Math.abs(actual.getZ()) * 1e-5);
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test

@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testGetVelocity()
{
  Random random = new Random(557975L);
  YoSpline3D spline = generateRandomQuintic(random);
    double t = 2 * (random.nextDouble() - 1);
  double dt = 1e-9;
  spline.compute(t);
  FrameVector3D actual = spline.getVelocityCopy();
  FramePoint3D pos1 = spline.getPositionCopy();
  spline.compute(t + dt);
  FramePoint3D pos2 = spline.getPositionCopy();
  FrameVector3D numerical = new FrameVector3D(worldFrame, (pos2.getX() - pos1.getX()) / dt, (pos2.getY() - pos1.getY()) / dt, (pos2.getZ() - pos1.getZ()) / dt);
  assertEquals(numerical.getX(), actual.getX(), 1e-5);
  assertEquals(numerical.getY(), actual.getY(), 1e-5);
  assertEquals(numerical.getZ(), actual.getZ(), 1e-5);
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com