gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-16 05:28:40 27 4
gpt4 key购买 nike

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

YoPolynomial.setConstant介绍

暂无

代码示例

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

/**
* Sets the coefficients to zero. Initial and final time are retained.
*/
public void setZero()
{
 polynomial.setConstant(0.0);
}

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

public void setConstant(double t0, double tFinal, double z)
{
 setTime(t0, tFinal);
 polynomial.setConstant(z);
}

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

public void clearFinalConstraint()
{
 for (int i = 0; i < 3; i++)
 {
   finalConstraintPositionError.setToZero();
   finalConstraintVelocityError.setToZero();
   finalConstraintPolynomial[i].setConstant(0.0);
 }
}

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

public void setConstant(Point3DReadOnly z)
{
 for (int index = 0; index < 3; index++)
   getYoPolynomial(index).setConstant(z.getElement(index));
}

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

public void clearInitialConstraint()
{
 for (int i = 0; i < 3; i++)
 {
   initialConstraintPositionError.setToZero();
   initialConstraintVelocityError.setToZero();
   initialConstraintPolynomial[i].setConstant(0.0);
 }
}

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

@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testConstant()
{
 Random random = new Random(1635L);
 YoPolynomial spline = new YoPolynomial("test", 5, registry);
 double z = random.nextDouble();
 spline.setConstant(z);
 double[] coefficients = spline.getCoefficients();
 double epsilon = 1e-9;
 assertEquals(z, coefficients[0], epsilon);
 for (int i = 1; i < coefficients.length; i++)
 {
   assertEquals(0.0, coefficients[i], epsilon);
 }
}

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

@Override
public void initialize()
{
 optimizer.compute(maxIterations.getIntegerValue());
 for (int i = 0; i < segments.getIntegerValue()-1; i++)
   waypointTimes.get(i).set(optimizer.getWaypointTime(i));
 for (int dimension = 0; dimension < dimensions; dimension++)
 {
   optimizer.getPolynomialCoefficients(coefficients, dimension);
   Direction axis;
   if (dimension == 0) axis = Direction.X;
   else if (dimension == 1) axis = Direction.Z;
   else axis = null;
   for (int i = 0; i < segments.getIntegerValue(); i++)
   {
    coefficients.get(i).toArray(tempCoeffs);
    trajectories.get(axis).get(i).setDirectlyReverse(tempCoeffs);
   }
 }
 for (int i = 0; i < segments.getIntegerValue(); i++)
 {
   trajectories.get(Direction.Y).get(i).setConstant(0.0);
 }
 visualize();
}

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