本文整理了Java中us.ihmc.mecano.multiBodySystem.interfaces.FloatingJointBasics.setJointTwist()
方法的一些代码示例,展示了FloatingJointBasics.setJointTwist()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FloatingJointBasics.setJointTwist()
方法的具体详情如下:
包路径:us.ihmc.mecano.multiBodySystem.interfaces.FloatingJointBasics
类名称:FloatingJointBasics
方法名:setJointTwist
暂无
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
public void setFullRobotModelRootJointVelocityAndAngularVelocityToMatchRobot(FloatingJointBasics sixDoFJoint, FloatingJoint floatingJoint)
{
FrameVector3D angularVelocityFrameVector = new FrameVector3D();
FrameVector3D linearVelocityFrameVector = new FrameVector3D();
ReferenceFrame elevatorFrame = sixDoFJoint.getFrameBeforeJoint();
ReferenceFrame bodyFrame = sixDoFJoint.getFrameAfterJoint();
floatingJoint.getVelocity(linearVelocityFrameVector);
linearVelocityFrameVector.changeFrame(bodyFrame);
floatingJoint.getAngularVelocity(angularVelocityFrameVector, bodyFrame);
Twist bodyTwist = new Twist(bodyFrame, elevatorFrame, bodyFrame, angularVelocityFrameVector, linearVelocityFrameVector);
sixDoFJoint.setJointTwist(bodyTwist);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
public void updateJointVelocities_SCS_to_ID()
{
if (scsFloatingJoint != null)
{
ReferenceFrame elevatorFrame = idFloatingJoint.getFrameBeforeJoint();
ReferenceFrame rootBodyFrame = idFloatingJoint.getFrameAfterJoint();
scsFloatingJoint.getVelocity(linearVelocity);
linearVelocity.changeFrame(rootBodyFrame);
scsFloatingJoint.getAngularVelocity(angularVelocity, rootBodyFrame);
rootJointTwist.setIncludingFrame(rootBodyFrame, elevatorFrame, rootBodyFrame, angularVelocity, linearVelocity);
idFloatingJoint.setJointTwist(rootJointTwist);
}
for (OneDegreeOfFreedomJoint scsJoint : allSCSOneDoFJoints)
{
OneDoFJointBasics idJoint = scsToIDJointMap.get(scsJoint);
idJoint.setQd(scsJoint.getQDYoVariable().getDoubleValue());
}
}
代码示例来源:origin: us.ihmc/ihmc-simulation-toolkit
private void readAndUpdateRootJointAngularAndLinearVelocity()
{
ReferenceFrame elevatorFrame = rootJoint.getFrameBeforeJoint();
ReferenceFrame pelvisFrame = rootJoint.getFrameAfterJoint();
// Update base frames without updating all frames to transform velocity into pelvis
elevatorFrame.update();
pelvisFrame.update();
FrameVector3D linearVelocity = robot.getRootJointVelocity();
linearVelocity.changeFrame(pelvisFrame);
FrameVector3D angularVelocity = robot.getRootJointAngularVelocityInRootJointFrame(pelvisFrame);
angularVelocity.changeFrame(pelvisFrame);
Twist bodyTwist = new Twist(pelvisFrame, elevatorFrame, pelvisFrame, angularVelocity, linearVelocity);
rootJoint.setJointTwist(bodyTwist);
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
public void setFullRobotModelStateRandomly(Random random, double maxJointVelocity, double maxRootJointLinearAndAngularVelocity)
{
FloatingJointBasics rootJoint = fullRobotModel.getRootJoint();
ReferenceFrame elevatorFrame = rootJoint.getFrameBeforeJoint();
ReferenceFrame bodyFrame = rootJoint.getFrameAfterJoint();
Twist bodyTwist = new Twist(bodyFrame, elevatorFrame, bodyFrame, RandomGeometry.nextVector3D(random, maxRootJointLinearAndAngularVelocity),
RandomGeometry.nextVector3D(random, maxRootJointLinearAndAngularVelocity));
rootJoint.setJointTwist(bodyTwist);
rootJoint.setJointPosition(RandomGeometry.nextVector3D(random));
double yaw = RandomNumbers.nextDouble(random, Math.PI / 20.0);
double pitch = RandomNumbers.nextDouble(random, Math.PI / 20.0);
double roll = RandomNumbers.nextDouble(random, Math.PI / 20.0);
rootJoint.getJointPose().setOrientationYawPitchRoll(yaw, pitch, roll);
ArrayList<OneDoFJointBasics> oneDoFJoints = new ArrayList<OneDoFJointBasics>();
fullRobotModel.getOneDoFJoints(oneDoFJoints);
for (OneDoFJointBasics oneDoFJoint : oneDoFJoints)
{
double lowerLimit = oneDoFJoint.getJointLimitLower();
double upperLimit = oneDoFJoint.getJointLimitUpper();
double delta = upperLimit - lowerLimit;
lowerLimit = lowerLimit + 0.05 * delta;
upperLimit = upperLimit - 0.05 * delta;
oneDoFJoint.setQ(RandomNumbers.nextDouble(random, lowerLimit, upperLimit));
oneDoFJoint.setQd(RandomNumbers.nextDouble(random, maxJointVelocity));
}
}
代码示例来源:origin: us.ihmc/ihmc-simulation-toolkit
sixDoFJoint.setJointTwist(bodyTwist);
sixDoFJoint.updateFramesRecursively();
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces
rootJointTwist.setIncludingFrame(rootJoint.getFrameAfterJoint(), rootJoint.getFrameBeforeJoint(), rootJoint.getFrameAfterJoint(), frameAngularVelocity,
frameLinearVelocity);
rootJoint.setJointTwist(rootJointTwist);
内容来源于网络,如有侵权,请联系作者删除!