gpt4 book ai didi

us.ihmc.robotics.math.frames.YoFrameQuaternion类的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 22:12:40 25 4
gpt4 key购买 nike

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

YoFrameQuaternion介绍

暂无

代码示例

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

public YoQuaternionProvider(String namePrefix, ReferenceFrame referenceFrame, YoVariableRegistry registry)
{
 orientation = new YoFrameQuaternion(namePrefix + "Orientation", referenceFrame, registry);
}

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

@Override
public void getOrientation(Quat4d orientationToPack)
{
 orientation.get(orientationToPack);
}

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

@Override
public void setOrientation(Quat4d orientation)
{
 this.orientation.set(orientation);
}

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

public void set(YoFrameQuaternion yoFrameQuaternion)
{
 checkReferenceFrameMatch(yoFrameQuaternion);
 yoFrameQuaternion.getFrameOrientationIncludingFrame(frameOrientation);
 getYoValuesFromFrameOrientation();
}

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

public void setToHoldCurrentDesired(ReferenceFrame desiredTrajectoryFrame)
{
 desiredPelvisOrientation.getFrameOrientationIncludingFrame(tempOrientation);
 initialPelvisOrientation.set(tempOrientation);
 finalPelvisOrientation.set(tempOrientation);
 initialize(desiredTrajectoryFrame);
}

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

public void prepareForLocomotion()
{
 desiredPelvisOrientationWithOffset.getFrameOrientationIncludingFrame(tempOrientation);
 tempOrientation.changeFrame(initialPelvisOrientation.getReferenceFrame());
 initialPelvisOrientation.set(tempOrientation);
 finalPelvisOrientation.set(tempOrientation);
 desiredPelvisOrientation.set(tempOrientation);
 resetOrientationOffset();
 initialize(worldFrame);
}

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

public TaskspaceHeadControlState(RigidBody chest, RigidBody head, double[] homeYawPitchRoll, YoOrientationPIDGainsInterface gains, YoVariableRegistry parentRegistry)
{
 super(HeadControlMode.TASKSPACE);
 this.gains = gains;
 feedbackControlCommand.set(chest, head);
 headFrame = head.getBodyFixedFrame();
 chestFrame = chest.getBodyFixedFrame();
 trajectoryGenerator = new MultipleWaypointsOrientationTrajectoryGenerator("head", true, worldFrame, registry);
 trajectoryGenerator.registerNewTrajectoryFrame(chestFrame);
 homeOrientation = new YoFrameQuaternion("headHomeOrientation", chestFrame, registry);
 homeOrientation.set(homeYawPitchRoll);
 parentRegistry.addChild(registry);
}

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

@Override
public void compute()
{
 if (!isEnabled())
   return;
 yoDesiredOrientation.getFrameOrientationIncludingFrame(tempOrientation);
 yoDesiredAngularVelocity.getFrameTupleIncludingFrame(tempAngularVelocity);
 yoFeedForwardAngularAcceleration.getFrameTupleIncludingFrame(feedForwardAngularAcceleration);
 accelerationControlModule.compute(desiredAngularAcceleration, tempOrientation, tempAngularVelocity, feedForwardAngularAcceleration, base);
 yoDesiredAngularAcceleration.setAndMatchFrame(desiredAngularAcceleration);
 tempOrientation.setToZero(endEffectorFrame);
 yoCurrentOrientation.setAndMatchFrame(tempOrientation);
 accelerationControlModule.getEndEffectorCurrentAngularVelocity(tempAngularVelocity);
 yoCurrentAngularVelocity.setAndMatchFrame(tempAngularVelocity);
 yoDesiredOrientation.get(tempAxisAngle);
 yoDesiredRotationVector.set(tempAxisAngle.getX(), tempAxisAngle.getY(), tempAxisAngle.getZ());
 yoDesiredRotationVector.scale(tempAxisAngle.getAngle());
 yoCurrentOrientation.get(tempAxisAngle);
 yoCurrentRotationVector.set(tempAxisAngle.getX(), tempAxisAngle.getY(), tempAxisAngle.getZ());
 yoCurrentRotationVector.scale(tempAxisAngle.getAngle());
 output.setAngularAcceleration(endEffectorFrame, baseFrame, desiredAngularAcceleration);
}

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

private void updateOrientationVisualization()
{
 desiredSpatialAcceleration.getAngularPart(desiredAngularAcceleration);
 yoDesiredAngularAcceleration.setAndMatchFrame(desiredAngularAcceleration);
 tempOrientation.setToZero(accelerationControlModule.getTrackingFrame());
 yoCurrentOrientation.setAndMatchFrame(tempOrientation);
 accelerationControlModule.getEndEffectorCurrentAngularVelocity(tempAngularVelocity);
 yoCurrentAngularVelocity.setAndMatchFrame(tempAngularVelocity);
 yoDesiredOrientation.get(tempAxisAngle);
 yoDesiredRotationVector.set(tempAxisAngle.getX(), tempAxisAngle.getY(), tempAxisAngle.getZ());
 yoDesiredRotationVector.scale(tempAxisAngle.getAngle());
 yoCurrentOrientation.get(tempAxisAngle);
 yoCurrentRotationVector.set(tempAxisAngle.getX(), tempAxisAngle.getY(), tempAxisAngle.getZ());
 yoCurrentRotationVector.scale(tempAxisAngle.getAngle());
}

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

YoFrameQuaternion yoDesiredHandOrientation = yoDesiredHandOrientations.get(robotSide);
  if (yoDesiredHandPosition.containsNaN() || yoDesiredHandOrientation.containsNaN())
   Quat4d desiredHandOrientation = new Quat4d();
   yoDesiredHandPosition.get(desiredHandPosition);
   yoDesiredHandOrientation.get(desiredHandOrientation);
   HandTrajectoryMessage temporaryHandTrajectoryMessage = new HandTrajectoryMessage(robotSide, 0.0, desiredHandPosition, desiredHandOrientation);
   handTrajectoryMessage.put(robotSide, temporaryHandTrajectoryMessage);
if (yoDesiredChestOrientation.containsNaN())
  yoDesiredChestQuaternion.get(desiredChestOrientation);
  chestTrajectoryMessage = new ChestTrajectoryMessage(0.0, desiredChestOrientation);
if (yoDesiredPelvisOrientation.containsNaN())
  yoDesiredPelvisQuaternion.get(desiredPelvisOrientation);
  pelvisOrientationTrajectoryMessage = new PelvisOrientationTrajectoryMessage(0.0, desiredPelvisOrientation);

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

@Override
public void initializeForFrozenState()
{
 rotationFrozenOffset.setIdentity();
 // R_{measurementFrame}^{world}
 imuProcessedOutput.getOrientationMeasurement(orientationMeasurement);
 transformFromMeasurementFrameToWorld.setRotationAndZeroTranslation(orientationMeasurement);
 // R_{root}^{measurementFrame}
 rootJointFrame.getTransformToDesiredFrame(transformFromRootJointFrameToMeasurementFrame, measurementFrame);
 // R_{root}^{world} = R_{estimationLink}^{world} * R_{root}^{estimationLink}
 transformFromRootJointFrameToWorld.multiply(transformFromMeasurementFrameToWorld, transformFromRootJointFrameToMeasurementFrame);
 transformFromRootJointFrameToWorld.getRotation(rotationFromRootJointFrameToWorld);
 
 double initialYaw = RotationTools.computeYaw(rotationFromRootJointFrameToWorld);
 rootJointYawOffsetFromFrozenState.set(initialYaw);
 rotationFrozenOffset.rotZ(initialYaw);
 yoRootJointFrameQuaternion.setToZero();
 yoRootJointFrameOrientation.setToZero();
 yoRootJointFrameQuaternion.get(rotationFromRootJointFrameToWorld);
 rootJoint.setRotation(rotationFromRootJointFrameToWorld);
 // Set the rootJoint twist to zero.
 rootJoint.getJointTwist(twistRootBodyRelativeToWorld);
 twistRootBodyRelativeToWorld.setToZero();
 rootJoint.setJointTwist(twistRootBodyRelativeToWorld);
}

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

rawOrientationBiases.get(imuIndex).setToZero();
orientationMeasurementTransposed.transform(biasRotationAxis);
biasAxisAngle.set(biasRotationAxis, biasMagnitude);
rawOrientationBiases.get(imuIndex).set(biasAxisAngle);

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

public void setPose(FramePose pose)
  {
   pose.getPositionIncludingFrame(tempPoint);
   tempPoint.changeFrame(this.position.getReferenceFrame());
   this.position.set(tempPoint);

   pose.getOrientationIncludingFrame(tempOrientation);
   tempOrientation.changeFrame(this.orientation.getReferenceFrame());
   this.orientation.set(tempOrientation);
  }
}

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

@Override
public void getOrientation(FrameOrientation orientationToPack)
{
 currentOrientation.getFrameOrientationIncludingFrame(orientationToPack);
}

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

@Override
public void setOrientationToZero()
{
 orientation.setToZero();
}

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

@Override
public void setOrientationToNaN()
{
 orientation.setToNaN();
}

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

public void setDesiredChestOrientation(FrameOrientation desiredChestOrientation)
{
 yoDesiredChestOrientation.setAndMatchFrame(desiredChestOrientation);
}

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

public void set(YoFrameQuaternion orientation)
{
 orientation.checkReferenceFrameMatch(getReferenceFrame());
 orientation.getFrameOrientationIncludingFrame(tempFrameOrientation);
 set(tempFrameOrientation);
}

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

@Override
public boolean containsNaN()
{
 return position.containsNaN() || orientation.containsNaN();
}

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

public void setInitialOrientation(YoFrameQuaternion initialOrientation)
{
 initialOrientation.getFrameOrientationIncludingFrame(tempOrientation);
 tempOrientation.changeFrame(trajectoryFrame);
 this.initialOrientation.set(tempOrientation);
}

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