us.ihmc.mecano.multiBodySystem.interfaces.OneDoFJointBasics.setQdd()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(69)

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

OneDoFJointBasics.setQdd介绍

[英]Sets the current acceleration for this joint.
[中]设置此关节的当前加速度。

代码示例

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

/** {@inheritDoc} */
@Override
default void setJointAccelerationToZero()
{
 setQdd(0.0);
}

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

/**
* Sets this joint acceleration from the other joint.
* 
* @param other the other to get the acceleration from. Not modified.
*/
default void setJointAcceleration(OneDoFJointReadOnly other)
{
 setQdd(other.getQdd());
}

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

/** {@inheritDoc} */
@Override
default int setJointAcceleration(int rowStart, DenseMatrix64F matrix)
{
 setQdd(matrix.get(rowStart + 0, 0));
 return rowStart + getDegreesOfFreedom();
}

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

@Before
public void setUp()
{
 joint.setQ(0.0);
 joint.setQd(0.0);
 joint.setQdd(0.0);
 trajectoryTimeProvider = new ConstantDoubleProvider(timeRequired);
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

public void setFullRobotModelAccelerationRandomly(Random random, double maxPelvisLinearAcceleration, double maxPelvisAngularAcceleration,
   double maxJointAcceleration)
{
 FloatingJointBasics sixDoFJoint = fullRobotModel.getRootJoint();
 setSixDoFJointAccelerationRandomly(sixDoFJoint, random, maxPelvisLinearAcceleration, maxPelvisAngularAcceleration);
 ArrayList<OneDegreeOfFreedomJoint> oneDegreeOfFreedomJoints = new ArrayList<OneDegreeOfFreedomJoint>();
 robot.getAllOneDegreeOfFreedomJoints(oneDegreeOfFreedomJoints);
 for (OneDegreeOfFreedomJoint oneDegreeOfFreedomJoint : oneDegreeOfFreedomJoints)
 {
   OneDoFJointBasics oneDoFJoint = fullRobotModel.getOneDoFJointByName(oneDegreeOfFreedomJoint.getName());
   oneDoFJoint.setQdd(RandomNumbers.nextDouble(random, maxJointAcceleration));
 }
}

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

private void readAndUpdateOneDoFJointPositionsVelocitiesAndAccelerations()
{
 for (int i = 0; i < revoluteJoints.size(); i++)
 {
   ImmutablePair<OneDegreeOfFreedomJoint, OneDoFJointBasics> jointPair = revoluteJoints.get(i);
   OneDegreeOfFreedomJoint pinJoint = jointPair.getLeft();
   OneDoFJointBasics revoluteJoint = jointPair.getRight();
   if (pinJoint == null) continue;
   revoluteJoint.setQ(pinJoint.getQYoVariable().getDoubleValue());
   revoluteJoint.setQd(pinJoint.getQDYoVariable().getDoubleValue());
   revoluteJoint.setQdd(pinJoint.getQDDYoVariable().getDoubleValue());
   revoluteJoint.setTau(pinJoint.getTau());
 }
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

public void setFullRobotModelAccelerationToMatchRobot()
{
 robot.update();
 FloatingJointBasics sixDoFJoint = fullRobotModel.getRootJoint();
 FloatingJoint floatingJoint = robot.getRootJoint();
 fullRobotModel.updateFrames();
 copyAccelerationFromForwardToInverse(floatingJoint, sixDoFJoint);
 ArrayList<OneDegreeOfFreedomJoint> oneDegreeOfFreedomJoints = new ArrayList<OneDegreeOfFreedomJoint>();
 robot.getAllOneDegreeOfFreedomJoints(oneDegreeOfFreedomJoints);
 for (OneDegreeOfFreedomJoint oneDegreeOfFreedomJoint : oneDegreeOfFreedomJoints)
 {
   OneDoFJointBasics oneDoFJoint = fullRobotModel.getOneDoFJointByName(oneDegreeOfFreedomJoint.getName());
   double robotJointAcceleration = oneDegreeOfFreedomJoint.getQDDYoVariable().getDoubleValue();
   oneDoFJoint.setQdd(robotJointAcceleration);
   YoDouble computedJointAcceleration = computedJointAccelerations.get(oneDoFJoint);
   computedJointAcceleration.set(robotJointAcceleration);
 }
}

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

/**
* Generates a random state and update the given {@code joint} with it.
* 
* @param random the random generator to use.
* @param stateToRandomize the joint state that is to be randomized.
* @param min the minimum value for the generated random value.
* @param max the maximum value for the generated random value.
* @param joint the joints to set the state of. Modified.
*/
public static void nextState(Random random, JointStateType stateToRandomize, double min, double max, OneDoFJointBasics joint)
{
 switch (stateToRandomize)
 {
 case CONFIGURATION:
   joint.setQ(EuclidCoreRandomTools.nextDouble(random, min, max));
   break;
 case VELOCITY:
   joint.setQd(EuclidCoreRandomTools.nextDouble(random, min, max));
   break;
 case ACCELERATION:
   joint.setQdd(EuclidCoreRandomTools.nextDouble(random, min, max));
   break;
 case EFFORT:
   joint.setTau(EuclidCoreRandomTools.nextDouble(random, min, max));
   break;
 default:
   throw new RuntimeException("Unhandled state selection: " + stateToRandomize);
 }
}

相关文章