gpt4 book ai didi

us.ihmc.commonWalkingControlModules.bipedSupportPolygons.YoPlaneContactState.setFullyConstrained()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 04:06:31 26 4
gpt4 key购买 nike

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

YoPlaneContactState.setFullyConstrained介绍

暂无

代码示例

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

public void setPlaneContactStateFullyConstrained(ContactablePlaneBody contactableBody)
{
 YoPlaneContactState yoPlaneContactState = yoPlaneContactStates.get(contactableBody);
 yoPlaneContactState.setFullyConstrained();
}

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

public void setPlaneContactStateFullyConstrained(ContactablePlaneBody contactableBody, double coefficientOfFriction, FrameVector normalContactVector)
{
 YoPlaneContactState yoPlaneContactState = yoPlaneContactStates.get(contactableBody);
 yoPlaneContactState.setFullyConstrained();
 yoPlaneContactState.setCoefficientOfFriction(coefficientOfFriction);
 yoPlaneContactState.setContactNormalVector(normalContactVector);
}

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

private void updateContactState(int currentStepCount, double percentageOfPhase)
{
 if (inDoubleSupport.getBooleanValue())
 {
   for (RobotSide side : RobotSide.values)
    contactStates.get(side).setFullyConstrained();
 }
 else
 {
   RobotSide swingSide = footstepList.get(currentStepCount).getRobotSide();
   contactStates.get(swingSide).clear();
   contactStates.get(swingSide.getOppositeSide()).setFullyConstrained();
   if (currentStepCount > 0)
   {
    swingFootPose.set(footstepList.get(currentStepCount - 1).getFootstepPose());
   }
   else
   {
    swingFootPose.set(initialPose);
    swingFootPose.appendTranslation(0.0, swingSide.negateIfRightSide(stepWidth / 2.0), 0.0);
   }
   FramePose3D endOfSwing = footstepList.get(currentStepCount).getFootstepPose();
   swingFootPose.interpolate(endOfSwing, percentageOfPhase);
   FootSpoof foot = feet.get(swingSide);
   foot.setSoleFrame(swingFootPose);
 }
 bipedSupportPolygons.updateUsingContactStates(contactStates);
}

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

double coefficientOfFriction = contactableFoot.getCoefficientOfFriction();
YoPlaneContactState yoPlaneContactState = new YoPlaneContactState(sidePrefix + "Foot", foot, soleFrame, contactFramePoints, coefficientOfFriction, parentRegistry);
yoPlaneContactState.setFullyConstrained();
contactStates.put(robotSide, yoPlaneContactState);

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

@Before
public void setUp()
{
 parentRegistry = new YoVariableRegistry("parentRegistryTEST");
 for (RobotSide robotSide : RobotSide.values)
 {
   String sidePrefix = robotSide.getCamelCaseNameForStartOfExpression();
   double xToAnkle = 0.0;
   double yToAnkle = 0.0;
   double zToAnkle = 0.0;
   List<Point2D> contactPointsInSoleFrame = new ArrayList<>();
   contactPointsInSoleFrame.add(new Point2D(footLengthForControl / 2.0, toeWidthForControl / 2.0));
   contactPointsInSoleFrame.add(new Point2D(footLengthForControl / 2.0, -toeWidthForControl / 2.0));
   contactPointsInSoleFrame.add(new Point2D(-footLengthForControl / 2.0, -footWidthForControl / 2.0));
   contactPointsInSoleFrame.add(new Point2D(-footLengthForControl / 2.0, footWidthForControl / 2.0));
   FootSpoof contactableFoot = new FootSpoof(sidePrefix + "Foot", xToAnkle, yToAnkle, zToAnkle, contactPointsInSoleFrame, 0.0);
   FramePose3D startingPose = new FramePose3D();
   startingPose.setToZero(worldFrame);
   startingPose.setY(robotSide.negateIfRightSide(0.20));
   contactableFoot.setSoleFrame(startingPose);
   contactableFeet.put(robotSide, contactableFoot);
   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, parentRegistry);
   yoPlaneContactState.setFullyConstrained();
   contactStates.put(robotSide, yoPlaneContactState);
 }
}

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

YoPlaneContactState yoPlaneContactState = new YoPlaneContactState(sidePrefix + "Foot", foot, soleFrame, contactFramePoints, coefficientOfFriction,
   registry);
yoPlaneContactState.setFullyConstrained();
contactStates.put(robotSide, yoPlaneContactState);

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

YoPlaneContactState yoPlaneContactState = new YoPlaneContactState(side.getCamelCaseName(), foot.getRigidBody(), foot.getSoleFrame(),
                                 foot.getContactPoints2d(), foot.getCoefficientOfFriction(), testRegistry);
yoPlaneContactState.setFullyConstrained();
contactStates.put(side, yoPlaneContactState);

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

contactStates.get(side).setFullyConstrained();
bipedSupportPolygons.updateUsingContactStates(contactStates);

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

contactStates.get(side).setFullyConstrained();
bipedSupportPolygons.updateUsingContactStates(contactStates);

代码示例来源: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;
}

代码示例来源: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;
}

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

YoPlaneContactState contactState = new YoPlaneContactState(footName + "ContactState", foot.getRigidBody(), foot.getSoleFrame(),
                             foot.getContactPoints2d(), foot.getCoefficientOfFriction(), registry);
contactState.setFullyConstrained();
this.contactStates.put(side, contactState);

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