us.ihmc.euclid.referenceFrame.ReferenceFrame.update()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(85)

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

ReferenceFrame.update介绍

[英]The user must call update each tick. It will then call #updateTransformToParent(RigidBodyTransform) which should be overridden to indicate how the transform to each frame's parent should be updated.

Note that it is not necessary to call update on reference frames with an unchanging transform to parent, even if the parent frame is moving.
[中]用户必须在每次勾选时调用update。然后,它将调用#updateTransformToParent(RigidByTransform),应该覆盖它,以指示应该如何更新对每个帧的父帧的转换。
请注意,即使父帧正在移动,也不必在参照帧上调用对父帧的不变变换的更新。

代码示例

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

private void updateAllFrames(ReferenceFrame[] referenceFrames)
{
 for (ReferenceFrame frame : referenceFrames)
 {
   frame.update();
 }
}

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

public void updateTransformToParent(String name)
{
 ReferenceFrame referenceFrame = referenceFrames.get(name);
 if (referenceFrame != null)
 {
   referenceFrame.update();
 }
}

代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test

@Override
public void updateFrames()
{
  worldFrame.update();
  elevator.updateFramesRecursively();
}

代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test

@Override
public void updateFrames()
{
  worldFrame.update();
  elevator.updateFramesRecursively();
}

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

/**
* Updates all the reference frames and the twist calculator. This method needs to be called at
* the beginning of each control tick.
*/
protected void updateTools()
{
 rootBody.updateFramesRecursively();
 centerOfMassFrame.update();
}

代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test

@Override
public void updateFrames()
{
  worldFrame.update();
  referenceFrames.updateFrames();
}

代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test

@Override
public void updateFrames()
{
  worldFrame.update();
  elevator.updateFramesRecursively();
}

代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test

@Override
public void updateFrames()
{
  worldFrame.update();
  elevator.updateFramesRecursively();
}

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

/**
* Iterative method that calls {@link RecursionStep#passTwo()} only if
* {@link #isJacobianFrameAtCenterOfMass} is {@code true}.
* 
* @see RecursionStep#passTwo()
*/
private void passTwo()
{
 if (!isJacobianFrameAtCenterOfMass)
   return;
 jacobianFrame.update();
 for (RecursionStep recursionStep : recursionSteps)
   recursionStep.passTwo();
}

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

public RigidBodyTransform convertMocapPoseToRobotFrame(MocapRigidBody mocapRigidBody)
{
 int id = mocapRigidBody.getId();
 
 if(!mocapReferenceFrames.containsKey(id))
 {
   ReferenceFrame mocapObjectFrame = createReferenceFrameForMocapObject(id);
   mocapReferenceFrames.put(id, mocapObjectFrame);
 }
 
 mocapRigidBody.packPose(mocapRigidBodyTransforms.get(id));
 
 ReferenceFrame referenceFrame = mocapReferenceFrames.get(id);
 referenceFrame.update();
 
 return referenceFrame.getTransformToDesiredFrame(mocapOffsetFrame);
}

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

private void initializeMocapFrameConverter(ArrayList<MocapRigidBody> listOfRigidbodies)
{
 pelvisFrameFromRobotConfigurationDataPacket.update();
 MocapRigidBody pelvisRigidBody = getPelvisRigidBody(listOfRigidbodies);
 mocapToPelvisFrameConverter.initialize(pelvisFrameFromRobotConfigurationDataPacket, pelvisRigidBody);
 
}

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

public void update(MocapRigidBody mocapObject)
{
 if(enableMocapUpdates)
 {
   mocapObject.packPose(workingRigidBodyTransform);
   workingRigidBodyTransform.multiply(mocapJigCalibrationTransform);
   workingRigidBodyTransform.multiply(transformFromMocapHeadCentroidToHeadRoot);
   mocapHeadPoseInZUp.set(workingRigidBodyTransform);
      mocapHeadFrame.update();
   robotDataReceiver.updateRobotModel();
   mocapHeadFrame.getTransformToDesiredFrame(transformFromMocapHeadToRobotHead , robotHeadFrame);
   mocapOffsetFrame.update();
 }
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

@Override
public synchronized boolean isPointOnOrInside(Point3D pointInWorldToCheck)
{
 afterRootJointFrame.update();
 frameCylinder.changeFrame(worldFrame);
 boolean insideOrOnSurface = frameCylinder.getCylinder3d().isInsideOrOnSurface(pointInWorldToCheck);
 frameCylinder.changeFrame(afterRootJointFrame);
 return insideOrOnSurface;
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

@Override
public synchronized void closestIntersectionAndNormalAt(Point3D intersectionToPack, Vector3D normalToPack, Point3D pointInWorldToCheck)
{
 afterRootJointFrame.update();
 frameCylinder.changeFrame(worldFrame);
 frameCylinder.getCylinder3d().checkIfInside(pointInWorldToCheck, intersectionToPack, normalToPack);
 frameCylinder.changeFrame(afterRootJointFrame);
}

代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test

private void simulateTicksAndAssertSamePlan(double totalTime, int currentStepCount, SmoothCMPBasedICPPlanner planner1, SmoothCMPBasedICPPlanner planner2)
{
 for (double timeInState = 0.0; timeInState < totalTime; timeInState += dt)
 {
   updateContactState(currentStepCount, timeInState / totalTime);
   for (RobotSide robotSide : RobotSide.values)
   {
    bipedSupportPolygons.getSoleZUpFrames().get(robotSide).update();
   }
   simulateOneTickAndAssertSamePlan(planner1, planner2);
 }
}

代码示例来源: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-common-walking-control-modules-test

@Override
public void updateFrames()
{
  centerOfMassFrame.update();
  for (RobotSide robotSide : RobotSide.values())
  {
   footReferenceFrames.get(robotSide).update();
   soleReferenceFrames.get(robotSide).update();
  }
}

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

@Override
public void updateFrames()
{
 fullRobotModel.updateFrames();
 pelvisZUpFrame.update();
 for (RobotSide robotSide : RobotSide.values)
 {
   ankleZUpFrames.get(robotSide).update();
   ReferenceFrame handZUpFrame = handZUpFrames.get(robotSide);
   if (handZUpFrame != null)
   {
    handZUpFrame.update();
   }
   footReferenceFrames.get(robotSide).update();
   soleFrames.get(robotSide).update();
   soleZUpFrames.get(robotSide).update();
 }
 midFeetZUpFrame.update();
 midFootZUpGroundFrame.update();
 midFeetUnderPelvisWalkDirectionFrame.update();
 centerOfMassFrame.update();
}

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

@Override
 public void doControl()
 {
   refFrame.update();
   sixDofPelvisJoint.setJointConfiguration(robotPose);
   pelvisPoseHistoryCorrection.doControl(Conversions.secondsToNanoseconds(scs.getTime()));
   floatingJoint.setQuaternion(sixDofPelvisJoint.getJointPose().getOrientation());
   floatingJoint.setPosition(sixDofPelvisJoint.getJointPose().getPosition());
 }
}

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

public VehicleModelObjectVisualizer(ReferenceFrame vehicleFrame, VehicleModelObjects vehicleModelObjects, YoGraphicsListRegistry yoGraphicsListRegistry,
   YoVariableRegistry parentRegistry)
{
 yoGraphicsList = new YoGraphicsList("vehicleObjects");
 for (VehicleObject vehicleObject : VehicleObject.values())
 {
   FramePose3D framePose = vehicleModelObjects.getFramePose(vehicleFrame, vehicleObject);
   String objectName = FormattingTools.underscoredToCamelCase(vehicleObject.toString(), false);
   ReferenceFrame objectFrame = new PoseReferenceFrame(objectName, framePose);
   objectFrame.update();
   YoGraphicReferenceFrame yoGraphicReferenceFrame = new YoGraphicReferenceFrame(objectFrame, registry, true, objectFrameScale);
   yoGraphicsList.add(yoGraphicReferenceFrame);
 }
 YoGraphicReferenceFrame vehicleFrameViz = new YoGraphicReferenceFrame(vehicleFrame, registry, true, vehicleFrameScale);
 yoGraphicsList.add(vehicleFrameViz);
 yoGraphicsListRegistry.registerYoGraphicsList(yoGraphicsList);
 parentRegistry.addChild(registry);
}

相关文章