gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-14 23:19:31 25 4
gpt4 key购买 nike

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

YoConcatenatedSplines.<init>介绍

暂无

代码示例

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

concatenatedSplinesWithArcLengthApproximatedByDistance = new YoConcatenatedSplines(new int[] {4, 2, 6, 2, 4}, referenceFrame,
   arcLengthCalculatorDivisionsPerPolynomial, registry, namePrefix + "ConcatenatedSplinesWithArcLengthApproximatedByDistance");
concatenatedSplinesWithArcLengthCalculatedIteratively = new YoConcatenatedSplines(new int[] {4, 2, 6, 2, 4}, referenceFrame, 2, registry,
   namePrefix + "ConcatenatedSplinesWithArcLengthCalculatedIteratively");

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

FrameVector3D[] velocities = getRandomVelocities(4);
YoConcatenatedSplines originalSplines = new YoConcatenatedSplines(new int[] {4, 6, 4}, worldFrame, 100, registry, "original");
YoConcatenatedSplines respacedSplines = new YoConcatenatedSplines(new int[] {6, 6, 6, 6}, worldFrame, 100, registry, "respaced");

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

@ContinuousIntegrationTest(estimatedDuration = 1.7)
@Test(timeout = 30000)
public void testTimeFromArcLength()
{
 int trials = 50;
 for (int trial = 0; trial < trials; trial++)
 {
   YoVariableRegistry registry = new YoVariableRegistry("ConcatenatedSplinesTest");
   double[] times = getRandomTimes(4);
   FramePoint3D[] positions = getRandomPositions(4);
   FrameVector3D[] velocities = getRandomVelocities(4);
   YoConcatenatedSplines concatenatedSplines = new YoConcatenatedSplines(new int[] {4, 6, 4}, worldFrame, 100, registry, "original");
   concatenatedSplines.setCubicQuinticCubic(times, positions, velocities);
   double arcLengthThroughSecondSpline = concatenatedSplines.getSplineByIndex(0).getArcLength() + concatenatedSplines.getSplineByIndex(1).getArcLength();
   double arcLengthThroughThirdSpline = arcLengthThroughSecondSpline + concatenatedSplines.getSplineByIndex(2).getArcLength();
   double arcLengthSomewhereInBetween = (arcLengthThroughSecondSpline + arcLengthThroughThirdSpline) / 2.0;
   double actualTimeThroughSecondSpline = concatenatedSplines.approximateTimeFromArcLength(arcLengthThroughSecondSpline);
   double actualTimeThroughThirdSpline = concatenatedSplines.approximateTimeFromArcLength(arcLengthThroughThirdSpline);
   double actualTimeInBetween = concatenatedSplines.approximateTimeFromArcLength(arcLengthSomewhereInBetween);
   double expectedTimeThroughSecondSpline = times[2];
   double expectedTimeThroughThirdSpline = times[3];
   assertEquals(expectedTimeThroughSecondSpline, actualTimeThroughSecondSpline, EPSILON);
   assertEquals(expectedTimeThroughThirdSpline, actualTimeThroughThirdSpline, EPSILON);
   assertTrue(expectedTimeThroughSecondSpline <= actualTimeInBetween);
   assertTrue(actualTimeInBetween <= expectedTimeThroughThirdSpline);
 }
}

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

@ContinuousIntegrationTest(estimatedDuration = 1.7)
@Test(timeout = 30000)
public void testSimpleCubicQuinticCubic()
{
 int trials = 50;
 for (int trial = 0; trial < trials; trial++)
 {
   YoVariableRegistry registry = new YoVariableRegistry("ConcatenatedSplinesTest");
   double[] times = getRandomTimes(4);
   FramePoint3D[] positions = getRandomPositions(4);
   FrameVector3D[] velocities = getRandomVelocities(4);
      YoConcatenatedSplines concatenatedSplines = new YoConcatenatedSplines(new int[] {4, 6, 4}, worldFrame, 100, registry, "original");
   concatenatedSplines.setCubicQuinticCubic(times, positions, velocities);
   for (int i = 0; i < 4; i++)
   {
    concatenatedSplines.compute(times[i]);
    FramePoint3D expectedPosition = positions[i];
    FramePoint3D actualPosition = concatenatedSplines.getPosition();
    FrameVector3D expectedVelocity = velocities[i];
    FrameVector3D actualVelocity = concatenatedSplines.getVelocity();
    for (Axis axis : Axis.values())
    {
      assertEquals(expectedPosition.getElement(axis.ordinal()), actualPosition.getElement(axis.ordinal()), EPSILON);
      assertEquals(expectedVelocity.getElement(axis.ordinal()), actualVelocity.getElement(axis.ordinal()), EPSILON);
    }
   }
 }
}

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

FrameVector3D[] velocities = new FrameVector3D[]{v0, v1, v2, v3};
YoConcatenatedSplines concatenatedSplines = new YoConcatenatedSplines(new int[] {4, 6, 4}, worldFrame, 100, registry, "original");

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