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

x33g5p2x  于2022-02-05 转载在 其他  
字(9.5k)|赞(0)|评价(0)|浏览(139)

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

YoFrameQuaternionInMultipleFrames介绍

暂无

代码示例

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

public ConstantPoseTrajectoryGenerator(String namePrefix, boolean allowMultipleFrames, ReferenceFrame referenceFrame, YoVariableRegistry parentRegistry)
{
 this.allowMultipleFrames = allowMultipleFrames;
 YoVariableRegistry registry = new YoVariableRegistry(namePrefix + getClass().getSimpleName());
 YoFramePointInMultipleFrames yoFramePointInMultipleFrames = new YoFramePointInMultipleFrames(namePrefix + "ConstantPosition", registry, referenceFrame);
 position = yoFramePointInMultipleFrames;
 YoFrameQuaternionInMultipleFrames yoFrameQuaternionInMultiplesFrames = new YoFrameQuaternionInMultipleFrames(namePrefix + "ConstantOrientation",
    registry, referenceFrame);
 orientation = yoFrameQuaternionInMultiplesFrames;
 multipleFramesHolders = new ArrayList<YoMultipleFramesHolder>();
 multipleFramesHolders.add(yoFramePointInMultipleFrames);
 multipleFramesHolders.add(yoFrameQuaternionInMultiplesFrames);
}

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

/**
* Change the current reference frame and set to zero the coordinates (different from changeFrame() ).
* @return the previous current reference frame.
*/
@Override
public ReferenceFrame switchCurrentReferenceFrame(ReferenceFrame referenceFrame)
{
 ReferenceFrame previousReferenceFrame = multipleFramesHelper.switchCurrentReferenceFrame(referenceFrame);
 set(0.0, 0.0, 0.0);
 return previousReferenceFrame;
}

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

@Override
public String toString()
{
 String ret = "";
 List<ReferenceFrame> referenceFrames = new ArrayList<ReferenceFrame>();
 multipleFramesHelper.getRegisteredReferenceFrames(referenceFrames);
 for (int i = 0; i < referenceFrames.size(); i++)
 {
   if (i > 0)
    ret += "\n";
   ret += toStringForASingleReferenceFrame(referenceFrames.get(i));
 }
 return ret;
}

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

@Override
public void changeFrame(ReferenceFrame desiredFrame)
{
 get(quaternion);
 ReferenceFrame currentReferenceFrame = multipleFramesHelper.switchCurrentReferenceFrame(desiredFrame);
 frameOrientation.setIncludingFrame(currentReferenceFrame, quaternion);
 frameOrientation.changeFrame(desiredFrame);
 frameOrientation.getQuaternion(quaternion);
 set(quaternion);
}

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

public void setInitialPose(FramePose initialPose)
{
 initialPose.getPoseIncludingFrame(tempPosition, tempOrientation);
 tempPosition.changeFrame(initialPosition.getReferenceFrame());
 initialPosition.set(tempPosition);
 tempOrientation.changeFrame(initialOrientation.getReferenceFrame());
 initialOrientation.set(tempOrientation);
 initialOrientationForViz.setAndMatchFrame(tempOrientation);
}

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

currentAcceleration.setToZero();
  currentOrientation.set(finalOrientation);
  currentAngularVelocity.setToZero();
  currentAngularAcceleration.setToZero();
  currentAcceleration.subAndScale(alphaAcc, finalPosition, initialPosition);
  currentOrientation.interpolate(initialOrientation, finalOrientation, quinticParameterPolynomial.getPosition());
  orientationInterpolationCalculator.computeAngularVelocity(currentAngularVelocity, initialOrientation, finalOrientation, alphaAngVel);
  orientationInterpolationCalculator.computeAngularAcceleration(currentAngularAcceleration, initialOrientation, finalOrientation, alphaAngAcc);
currentOrientation.getFrameOrientationIncludingFrame(tempOrientation);
tempOrientation.changeFrame(currentOrientationForViz.getReferenceFrame());
currentOrientationForViz.set(tempOrientation);

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

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

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

interpolationFrameForViz.set(copyOfInitialOrientation);
trajectoryFrame = initialOrientation.getReferenceFrame();
   finalVelocity.getZ(), 0.0);
initialOrientation.getFrameOrientationIncludingFrame(copyOfInitialOrientation);
finalOrientation.getFrameOrientationIncludingFrame(copyOfFinalOrientation);
initialAngularVelocity.getFrameTupleIncludingFrame(copyOfInitialAngularVelocity);
finalAngularVelocity.getFrameTupleIncludingFrame(copyOfFinalAngularVelocity);

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

@Override
  public void setToNaN(ReferenceFrame desiredReferenceFrame)
  {
   setToNaN();
   multipleFramesHelper.switchCurrentReferenceFrame(desiredReferenceFrame);
  }
}

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

public void getPose(FramePose framePoseToPack)
{
 framePoseToPack.changeFrame(currentPosition.getReferenceFrame());
 framePoseToPack.setPosition(currentPosition.getFrameTuple());
 currentOrientation.get(temp);
 framePoseToPack.setOrientation(temp);
}

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

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

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

@Override
  public void setToNaN(ReferenceFrame desiredReferenceFrame)
  {
   setToNaN();
   multipleFramesHelper.switchCurrentReferenceFrame(desiredReferenceFrame);
  }
}

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

public void getPose(FramePose framePoseToPack)
{
 framePoseToPack.changeFrame(currentPosition.getReferenceFrame());
 framePoseToPack.setPosition(currentPosition.getFrameTuple());
 currentOrientation.get(temp);
 framePoseToPack.setOrientation(temp);
}

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

public ConstantPoseTrajectoryGenerator(String namePrefix, boolean allowMultipleFrames, ReferenceFrame referenceFrame, YoVariableRegistry parentRegistry)
{
 this.allowMultipleFrames = allowMultipleFrames;
 YoVariableRegistry registry = new YoVariableRegistry(namePrefix + getClass().getSimpleName());
 YoFramePointInMultipleFrames yoFramePointInMultipleFrames = new YoFramePointInMultipleFrames(namePrefix + "ConstantPosition", registry, referenceFrame);
 position = yoFramePointInMultipleFrames;
 YoFrameQuaternionInMultipleFrames yoFrameQuaternionInMultiplesFrames = new YoFrameQuaternionInMultipleFrames(namePrefix + "ConstantOrientation",
    registry, referenceFrame);
 orientation = yoFrameQuaternionInMultiplesFrames;
 multipleFramesHolders = new ArrayList<YoMultipleFramesHolder>();
 multipleFramesHolders.add(yoFramePointInMultipleFrames);
 multipleFramesHolders.add(yoFrameQuaternionInMultiplesFrames);
}

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

public void setInitialPose(FramePoint initialPosition, FrameOrientation initialOrientation)
{
 this.initialPosition.set(initialPosition);
 this.initialOrientation.set(initialOrientation);
 initialOrientationForViz.setAndMatchFrame(initialOrientation);
}

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

@Override
public String toString()
{
 String ret = "";
 List<ReferenceFrame> referenceFrames = new ArrayList<ReferenceFrame>();
 multipleFramesHelper.getRegisteredReferenceFrames(referenceFrames);
 for (int i = 0; i < referenceFrames.size(); i++)
 {
   if (i > 0)
    ret += "\n";
   ret += toStringForASingleReferenceFrame(referenceFrames.get(i));
 }
 return ret;
}

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

public String toStringForASingleReferenceFrame(ReferenceFrame referenceFrame)
{
 getFrameOrientationIncludingFrame(frameOrientation);
 frameOrientation.changeFrame(referenceFrame);
 return frameOrientation.toStringAsQuaternion();
}

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

YoFrameQuaternionInMultipleFrames initialOrientation = new YoFrameQuaternionInMultipleFrames(initialOrientationName, registry, referenceFrame);
YoFrameQuaternionInMultipleFrames finalOrientation = new YoFrameQuaternionInMultipleFrames(finalOrientationName, registry, referenceFrame);
YoFrameQuaternionInMultipleFrames currentOrientation = new YoFrameQuaternionInMultipleFrames(currentOrientationName, registry, referenceFrame);
YoFrameVectorInMultipleFrames currentAngularVelocity = new YoFrameVectorInMultipleFrames(currentAngularVelocityName, registry, referenceFrame);
YoFrameVectorInMultipleFrames currentAngularAcceleration = new YoFrameVectorInMultipleFrames(currentAngularAccelerationName, registry, referenceFrame);

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

public void setInitialPoseWithInitialVelocity(FramePoint initialPosition, FrameVector initialVelocity, FrameOrientation initialOrientation,
   FrameVector initialAngularVelocity)
{
 this.initialPosition.set(initialPosition);
 this.initialVelocity.set(initialVelocity);
 this.initialOrientation.set(initialOrientation);
 this.initialAngularVelocity.set(initialAngularVelocity);
}

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

public String toString()
  {
   String ret = "";

   ReferenceFrame currentFrame = initialPosition.getReferenceFrame();

   ret += "Current time: " + currentTime.getDoubleValue() + ", trajectory time: " + trajectoryTime.getDoubleValue();
   ret += "\nCurrent position: " + currentPosition.toStringForASingleReferenceFrame(currentFrame);
   ret += "\nCurrent velocity: " + currentVelocity.toStringForASingleReferenceFrame(currentFrame);
   ret += "\nCurrent acceleration: " + currentAcceleration.toStringForASingleReferenceFrame(currentFrame);
   ret += "\nCurrent orientation: " + currentOrientation.toStringForASingleReferenceFrame(currentFrame);
   ret += "\nCurrent angular velocity: " + currentAngularVelocity.toStringForASingleReferenceFrame(currentFrame);
   ret += "\nCurrent angular acceleration: " + currentAngularAcceleration.toStringForASingleReferenceFrame(currentFrame);
   return ret;
  }
}

相关文章