gpt4 book ai didi

us.ihmc.robotics.referenceFrames.ZUpFrame类的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 18:40:49 25 4
gpt4 key购买 nike

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

ZUpFrame介绍

暂无

代码示例

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

public BlindWalkingDesiredFootstepCalculator(SideDependentList<? extends ContactablePlaneBody> contactableBodies, YoVariableRegistry parentRegistry)
{
 super(parentRegistry);
 for (RobotSide robotSide : RobotSide.values)
 {
   ReferenceFrame soleFrame = contactableBodies.get(robotSide).getSoleFrame();
   soleFrames.put(robotSide, soleFrame);
   soleZUpFrames.put(robotSide, new ZUpFrame(worldFrame, soleFrame, "soleZUpFrame"));
 }
}

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

public ZUpFrame(ReferenceFrame worldFrame, FramePoint3D origin, String name)
{
 super(name, worldFrame, false, true);
 this.worldFrame = worldFrame;
 this.origin = new FramePoint3D(origin);
 
 this.update();
}

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

ZUpFrame zUpFrameAfterJoint = new ZUpFrame(frameAfterJoint.getRootFrame(), frameAfterJoint, frameAfterJoint.getName() + "ZUp");
MovingZUpFrame movingZUpFrameAfterJoint = new MovingZUpFrame(frameAfterJoint, frameAfterJoint.getName() + "ZUp");
for (Entry<ZUpFrame, MovingZUpFrame> entry : entrySet)
 expectedTransform.set(entry.getKey().getTransformToRoot());
 actualTransform.set(entry.getValue().getTransformToRoot());

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

@Override
public FootstepDataMessage predictFootstepAfterDesiredFootstep(RobotSide supportLegSide, FootstepDataMessage desiredFootstep, double timeFromNow,
   double stepDuration)
{
 RobotSide futureSwingLegSide = supportLegSide;
 PoseReferenceFrame futureSupportFrame = new PoseReferenceFrame("futureSupportFrame", worldFrame);
 futureSupportFrame.setPoseAndUpdate(desiredFootstep.getLocation(), desiredFootstep.getOrientation());
 ZUpFrame futureSupportZUpFrame = new ZUpFrame(worldFrame, futureSupportFrame, "futureSupportZUpFrame");
 futureSupportZUpFrame.update();
 ReferenceFrame desiredHeadingFrame = desiredHeadingControlModule.getPredictedHeadingFrame(timeFromNow);
 Matrix3d footToWorldRotation = computeDesiredFootRotation(desiredHeadingFrame);
 FrameOrientation footstepOrientation = new FrameOrientation(worldFrame, footToWorldRotation);
 FramePoint footstepPosition = getDesiredFootstepPosition(futureSupportZUpFrame, futureSwingLegSide, footToWorldRotation, timeFromNow, stepDuration);
 footstepPosition.changeFrame(worldFrame);
 FootstepDataMessage predictedFootstep = new FootstepDataMessage();
 predictedFootstep.setOrigin(FootstepOrigin.AT_SOLE_FRAME);
 predictedFootstep.setRobotSide(futureSwingLegSide);
 predictedFootstep.setLocation(footstepPosition.getPoint());
 predictedFootstep.setOrientation(footstepOrientation.getQuaternion());
 return predictedFootstep;
}

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

public ComponentBasedDesiredFootstepCalculator(ReferenceFrame pelvisZUpFrame, SideDependentList<? extends ContactablePlaneBody> bipedFeet,
   DesiredHeadingControlModule desiredHeadingControlModule, DesiredVelocityControlModule desiredVelocityControlModule, YoVariableRegistry parentRegistry)
{
 super(parentRegistry);
 this.pelvisZUpFrame = pelvisZUpFrame;
 this.contactableBodies = bipedFeet;
 for (RobotSide robotSide : RobotSide.values)
 {
   ReferenceFrame soleFrame = contactableBodies.get(robotSide).getSoleFrame();
   soleFrames.put(robotSide, soleFrame);
   soleZUpFrames.put(robotSide, new ZUpFrame(worldFrame, soleFrame, "soleZUpFrame"));
 }
 this.desiredHeadingControlModule = desiredHeadingControlModule;
 this.desiredVelocityControlModule = desiredVelocityControlModule;
 matchSupportFootPlane.set(false);
}

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

public ZUpFrame(ReferenceFrame worldFrame, FramePoint origin, String name)
{
 super(name, worldFrame, false, false, true);
 this.worldFrame = worldFrame;
 this.origin = new FramePoint(origin);
 
 this.update();
}

代码示例来源:origin: us.ihmc/ihmc-whole-body-controller

private static CenterOfMassCalculator createCenterOfMassCalculatorInJointZUpFrame(RigidBodyBasics rootBody, boolean preserveY)
  {
   if (DEBUG) System.out.println("\nCenterOfMassCalibrationTool: rootBody = " + rootBody);

   JointBasics parentJoint = rootBody.getParentJoint();
   if (DEBUG) System.out.println("parentJoint = " + parentJoint);

   ReferenceFrame jointFrame = parentJoint.getFrameAfterJoint();
   if (DEBUG) System.out.println("jointFrame = " + jointFrame);

   String jointName = parentJoint.getName();
   if (DEBUG) System.out.println("jointName = " + jointName);

   ReferenceFrame jointZUpFrame;
   
   if (preserveY)
   {
     jointZUpFrame = new ZUpPreserveYReferenceFrame(ReferenceFrame.getWorldFrame(), jointFrame, jointName + "ZUp");
   }
   else
   {
     jointZUpFrame = new ZUpFrame(ReferenceFrame.getWorldFrame(), jointFrame, jointName + "ZUp");
   }
   
   CenterOfMassCalculator centerOfMassCalculator = new CenterOfMassCalculator(rootBody, jointZUpFrame);

   return centerOfMassCalculator;
  }
}

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

@Override
public void updateFrames()
{
 fullRobotModel.updateFrames();
 pelvisZUpFrame.update();
 midFeetZUpFrame.update();
 midFeetZUpWalkDirectionFrame.update();
 midFeetUnderPelvisWalkDirectionFrame.update();
 for (RobotSide robotSide : RobotSide.values)
 {
   ankleZUpFrames.get(robotSide).update();
   soleFrames.get(robotSide).update();
   soleZUpFrames.get(robotSide).update();
 }
 centerOfMassFrame.update();
}

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

jointZUpFrame = new ZUpFrame(ReferenceFrame.getWorldFrame(), jointFrame, jointName + "ZUp");

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

@Override
public void initializeDesiredFootstep(RobotSide supportLegSide, double stepDuration)
{
 RobotSide swingLegSide = supportLegSide.getOppositeSide();
 ZUpFrame supportZUpFrame = soleZUpFrames.get(supportLegSide);
 supportZUpFrame.update();
 ReferenceFrame supportFrame = soleFrames.get(supportLegSide);
 computeDistanceAndAngleToDestination(supportZUpFrame, swingLegSide, desiredDestination.getFramePoint2dCopy());
 if (distanceToDestination.getDoubleValue() < DISTANCE_TO_DESTINATION_FOR_STEP_IN_PLACE)
 {
   numberBlindStepsInPlace.increment();
 }
 FrameOrientation footOrientation = computeDesiredFootRotation(angleToDestination.getDoubleValue(), swingLegSide, supportFrame);
 FramePoint footstepPosition = getDesiredFootstepPositionCopy(supportZUpFrame, supportFrame, swingLegSide);
 setYoVariables(swingLegSide, footOrientation, footstepPosition);
}

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

ZUpFrame soleFrame = new ZUpFrame(ReferenceFrame.getWorldFrame(),
                 new FramePoint3D(ReferenceFrame.getWorldFrame(), 0.0, side.negateIfRightSide(soleFrameYDisplacement), 0.0),
                 "DummyRobot" + side.toString() + "FootSoleFrame");
soleZUpFrames.put(side, soleFrame);
ZUpFrame ankleFrame = new ZUpFrame(soleFrame, new FramePoint3D(soleFrame, 0.0, 0.0, ankleFrameZDisplacement),
                 "DummyRobot" + side.toString() + "AnkleSoleFrame");
ankleZUpFrames.put(side, ankleFrame);

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

parentSoleZupFrame.update();

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

private static CenterOfMassCalculator createCenterOfMassCalculatorInJointZUpFrame(RigidBody rootBody, boolean preserveY)
  {
   if (DEBUG) System.out.println("\nCenterOfMassCalibrationTool: rootBody = " + rootBody);

   InverseDynamicsJoint parentJoint = rootBody.getParentJoint();
   if (DEBUG) System.out.println("parentJoint = " + parentJoint);

   ReferenceFrame jointFrame = parentJoint.getFrameAfterJoint();
   if (DEBUG) System.out.println("jointFrame = " + jointFrame);

   String jointName = parentJoint.getName();
   if (DEBUG) System.out.println("jointName = " + jointName);

   ReferenceFrame jointZUpFrame;
   
   if (preserveY)
   {
     jointZUpFrame = new ZUpPreserveYReferenceFrame(ReferenceFrame.getWorldFrame(), jointFrame, jointName + "ZUp");
   }
   else
   {
     jointZUpFrame = new ZUpFrame(ReferenceFrame.getWorldFrame(), jointFrame, jointName + "ZUp");
   }
   
   RigidBody[] rigidBodies = ScrewTools.computeSubtreeSuccessors(rootBody.getParentJoint());
   CenterOfMassCalculator centerOfMassCalculator = new CenterOfMassCalculator(rigidBodies, jointZUpFrame);

   return centerOfMassCalculator;
  }
}

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

parentSoleZupFrame.update();

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

ReferenceFrame ankleFrame = contactableFoot.getFrameAfterParentJoint();
ankleFrames.put(robotSide, ankleFrame);
ankleZUpFrames.put(robotSide, new ZUpFrame(worldFrame, ankleFrame, robotSide.getCamelCaseNameForStartOfExpression() + "ZUp"));
soleFrames.put(robotSide, contactableFoot.getSoleFrame());

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

@Override
public FootstepDataMessage predictFootstepAfterDesiredFootstep(RobotSide supportLegSide, FootstepDataMessage desiredFootstep, double timeFromNow,
   double stepDuration)
{
 RobotSide futureSwingLegSide = supportLegSide;
 PoseReferenceFrame futureSupportFrame = new PoseReferenceFrame("futureSupportFrame", worldFrame);
 futureSupportFrame.setPoseAndUpdate(desiredFootstep.getLocation(), desiredFootstep.getOrientation());
 ReferenceFrame futureSupportZUpFrame = new ZUpFrame(worldFrame, futureSupportFrame, "supportZUp");
 futureSupportZUpFrame.update();
 computeDistanceAndAngleToDestination(futureSupportZUpFrame, futureSwingLegSide, desiredDestination.getFramePoint2dCopy());
 FrameOrientation footOrientation = computeDesiredFootRotation(angleToDestination.getDoubleValue(), futureSwingLegSide, futureSupportZUpFrame);
 FramePoint footstepPosition = getDesiredFootstepPositionCopy(futureSupportZUpFrame, futureSupportFrame, futureSwingLegSide);
 FootstepDataMessage predictedFootstep = new FootstepDataMessage();
 predictedFootstep.setRobotSide(futureSwingLegSide);
 predictedFootstep.setLocation(footstepPosition.getPoint());
 predictedFootstep.setOrientation(footOrientation.getQuaternion());
 return predictedFootstep;
}

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

ZUpFrame zUpFrame = new ZUpFrame(ReferenceFrame.getWorldFrame(), ankleFrame, robotSide.getCamelCaseNameForStartOfExpression() + "ZUpFrame");
ankleZUpFrames.set(robotSide, zUpFrame);

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

this.ankleZUpFrames.put(side, new ZUpFrame(worldFrame, foot.getFrameAfterParentJoint(), footName + "AnkleZUpFrame"));
this.soleZUpFrames.put(side, new ZUpFrame(worldFrame, foot.getSoleFrame(), footName + "SoleZUpFrame"));
YoPlaneContactState contactState = new YoPlaneContactState(footName + "ContactState", foot.getRigidBody(), foot.getSoleFrame(),
                             foot.getContactPoints2d(), foot.getCoefficientOfFriction(), registry);

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

pelvisZUpFrame = new ZUpFrame(worldFrame, pelvisFrame, "pelvisZUpFrame");
  ankleZUpFrames.put(robotSide, new ZUpFrame(worldFrame, getFootFrame(robotSide), robotSide.getCamelCaseNameForStartOfExpression() + "ZUp"));
  soleZUpFrames.put(robotSide, new ZUpFrame(worldFrame, soleFrame, soleFrame.getName() + "ZUp"));

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

private BipedSupportPolygons setupBipedSupportPolygons(SideDependentList<FootSpoof> contactableFeet, YoVariableRegistry registry)
{
 SideDependentList<ReferenceFrame> ankleZUpFrames = new SideDependentList<>();
 SideDependentList<YoPlaneContactState> contactStates = new SideDependentList<>();
 for (RobotSide robotSide : RobotSide.values)
 {
   FootSpoof contactableFoot = contactableFeet.get(robotSide);
   ReferenceFrame ankleFrame = contactableFoot.getFrameAfterParentJoint();
   ankleFrames.put(robotSide, ankleFrame);
   ankleZUpFrames.put(robotSide, new ZUpFrame(worldFrame, ankleFrame, robotSide.getCamelCaseNameForStartOfExpression() + "ZUp"));
   String sidePrefix = robotSide.getCamelCaseNameForStartOfExpression();
   RigidBodyBasics foot = contactableFoot.getRigidBody();
   ReferenceFrame soleFrame = contactableFoot.getSoleFrame();
   List<FramePoint2D> contactFramePoints = contactableFoot.getContactPoints2d();
   double coefficientOfFriction = contactableFoot.getCoefficientOfFriction();
   YoPlaneContactState yoPlaneContactState = new YoPlaneContactState(sidePrefix + "Foot", foot, soleFrame, contactFramePoints, coefficientOfFriction, registry);
   yoPlaneContactState.setFullyConstrained();
   contactStates.put(robotSide, yoPlaneContactState);
 }
 ReferenceFrame midFeetZUpFrame = new MidFrameZUpFrame("midFeetZupFrame", worldFrame, ankleZUpFrames.get(RobotSide.LEFT), ankleZUpFrames.get(RobotSide.RIGHT));
 midFeetZUpFrame.update();
 BipedSupportPolygons bipedSupportPolygons = new BipedSupportPolygons(midFeetZUpFrame, ankleZUpFrames, registry, null);
 bipedSupportPolygons.updateUsingContactStates(contactStates);
 return bipedSupportPolygons;
}

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