gpt4 book ai didi

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

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

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

YoPlaneContactState.clear介绍

暂无

代码示例

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

public void setPlaneContactStateFree(ContactablePlaneBody contactableBody)
{
 YoPlaneContactState yoPlaneContactState = yoPlaneContactStates.get(contactableBody);
 if (yoPlaneContactState != null)
   yoPlaneContactState.clear();
}

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

public void clearContacts()
{
 for (int i = 0; i < yoPlaneContactStateList.size(); i++)
 {
   yoPlaneContactStateList.get(i).clear();
 }
}

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

@Override
public void updateFromPlaneContactStateCommand(PlaneContactStateCommand planeContactStateCommand)
{
 if (planeContactStateCommand.getContactingRigidBody() != rigidBody)
   throw new RuntimeException("The rigid body in the command does not match this rigid body: command.rigidBody = " + planeContactStateCommand.getContactingRigidBody() + ", contactState.rigidBody = " + rigidBody);
 coefficientOfFriction.set(planeContactStateCommand.getCoefficientOfFriction());
 planeContactStateCommand.getContactNormal(contactNormalFrameVector);
 if (planeContactStateCommand.isEmpty())
   clear();
 else
   inContact.set(true);
 for (int i = 0; i < planeContactStateCommand.getNumberOfContactPoints(); i++)
 {
   planeContactStateCommand.getContactPoint(i, tempContactPointPosition);
   YoContactPoint contactPoint = contactPoints.get(i);
   contactPoint.setPosition(tempContactPointPosition);
   contactPoint.setInContact(true);
 }
 for (int i = planeContactStateCommand.getNumberOfContactPoints(); i < getTotalNumberOfContactPoints(); i++)
 {
   contactPoints.get(i).setInContact(false);
 }
}

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

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