gpt4 book ai didi

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

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

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

YoPolynomial.setCubicInitialPositionThreeFinalConditions介绍

暂无

代码示例

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

public void setCubicInitialPositionThreeFinalConditions(double t0, double tFinal, double z0, double zFinal, double zdFinal, double zddFinal)
{
 setTime(t0, tFinal);
 polynomial.setCubicInitialPositionThreeFinalConditions(t0, tFinal, z0, zFinal, zdFinal, zddFinal);
}

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

public void setCubicInitialPositionThreeFinalConditions(double t0, double tFinal, Point3DReadOnly z0, Point3DReadOnly zFinal, Vector3DReadOnly zdFinal,
                            Vector3DReadOnly zddFinal)
{
 for (int index = 0; index < 3; index++)
   getYoPolynomial(index).setCubicInitialPositionThreeFinalConditions(t0, tFinal, z0.getElement(index), zFinal.getElement(index),
                                    zdFinal.getElement(index), zddFinal.getElement(index));
}

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

/**
* Desired joint angles and velocities come from reading the joints, this method can override them those position and velocity values. 
* @param currentDesiredPosition Sets the desired joint position.
* @param currentDesiredVelocity Sets the desired joint velocity.
*/
@Override
public void initialize(double initialPosition, double initialVelocity)
{
 currentTime.set(0.0);
 currentTimeOffset.set(0.0);
 currentPolynomialIndex.set(0);
 trajectoryTime.set(trajectoryTimeProvider.getValue());
 subTrajectoryTime.set(trajectoryTime.getDoubleValue() / (currentNumberOfWaypoints.getIntegerValue() + 1));
 startMotionPolynomial.setCubicThreeInitialConditionsFinalPosition(0.0, subTrajectoryTime.getDoubleValue(), initialPosition, initialVelocity, 0.0,
    intermediatePositions.get(0).getDoubleValue());
 startMotionPolynomial.compute(subTrajectoryTime.getDoubleValue());
 for (int i = 0; i < currentNumberOfWaypoints.getIntegerValue() - 1; i++)
 {
   YoPolynomial connectingPolynomial = connectingPolynomials.get(i);
   double z0 = intermediatePositions.get(i).getDoubleValue();
   double zFinal = intermediatePositions.get(i + 1).getDoubleValue();
   connectingPolynomial.setLinear(0.0, subTrajectoryTime.getDoubleValue(), z0, zFinal);
   connectingPolynomial.compute(subTrajectoryTime.getDoubleValue());
 }
 double z0 = intermediatePositions.get(currentNumberOfWaypoints.getIntegerValue() - 1).getDoubleValue();
 double zFinal = finalPosition.getDoubleValue();
 finalizeMotionPolynomial.setCubicInitialPositionThreeFinalConditions(0.0, subTrajectoryTime.getDoubleValue(), z0, zFinal, 0.0, 0.0);
}

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

/**
* Desired joint angles and velocities come from reading the joints, this method can override them those position and velocity values. 
* @param currentDesiredPosition Sets the desired joint position.
* @param currentDesiredVelocity Sets the desired joint velocity.
*/
@Override
public void initialize(double initialPosition, double initialVelocity)
{
 currentTime.set(0.0);
 currentTimeOffset.set(0.0);
 currentPolynomialIndex.set(0);
 trajectoryTime.set(trajectoryTimeProvider.getValue());
 subTrajectoryTime.set(trajectoryTime.getDoubleValue() / (currentNumberOfWaypoints.getIntegerValue() + 1));
 startMotionPolynomial.setCubicThreeInitialConditionsFinalPosition(0.0, subTrajectoryTime.getDoubleValue(), initialPosition, initialVelocity, 0.0,
    intermediatePositions.get(0).getDoubleValue());
 startMotionPolynomial.compute(subTrajectoryTime.getDoubleValue());
 for (int i = 0; i < currentNumberOfWaypoints.getIntegerValue() - 1; i++)
 {
   YoPolynomial connectingPolynomial = connectingPolynomials.get(i);
   double z0 = intermediatePositions.get(i).getDoubleValue();
   double zFinal = intermediatePositions.get(i + 1).getDoubleValue();
   connectingPolynomial.setLinear(0.0, subTrajectoryTime.getDoubleValue(), z0, zFinal);
   connectingPolynomial.compute(subTrajectoryTime.getDoubleValue());
 }
 double z0 = intermediatePositions.get(currentNumberOfWaypoints.getIntegerValue() - 1).getDoubleValue();
 double zFinal = finalPosition.getDoubleValue();
 finalizeMotionPolynomial.setCubicInitialPositionThreeFinalConditions(0.0, subTrajectoryTime.getDoubleValue(), z0, zFinal, 0.0, 0.0);
}

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