本文整理了Java中us.ihmc.commonWalkingControlModules.bipedSupportPolygons.YoPlaneContactState.clear()
方法的一些代码示例,展示了YoPlaneContactState.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoPlaneContactState.clear()
方法的具体详情如下:
包路径:us.ihmc.commonWalkingControlModules.bipedSupportPolygons.YoPlaneContactState
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!