本文整理了Java中us.ihmc.simulationconstructionset.Robot.getAllGroundContactPoints
方法的一些代码示例,展示了Robot.getAllGroundContactPoints
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Robot.getAllGroundContactPoints
方法的具体详情如下:
包路径:us.ihmc.simulationconstructionset.Robot
类名称:Robot
方法名:getAllGroundContactPoints
暂无
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
public void addGroundContactPoint(Robot robot, String groundContactPointName)
{
ArrayList<GroundContactPoint> allGroundContactPoints = robot.getAllGroundContactPoints();
for (GroundContactPoint groundContactPoint : allGroundContactPoints)
{
if (groundContactPoint.getName().equals(groundContactPointName))
{
this.addGroundContactPoint(groundContactPoint);
return;
}
}
}
代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge
public DRCSimulationVisualizer(Robot robot, YoGraphicsListRegistry yoGraphicsListRegistry)
{
this.robot = robot;
YoGraphicsList yoGraphicsList = new YoGraphicsList("Simulation Viz");
ArrayList<GroundContactPoint> groundContactPoints = robot.getAllGroundContactPoints();
AppearanceDefinition appearance = YoAppearance.Red(); // BlackMetalMaterial();
for (GroundContactPoint groundContactPoint : groundContactPoints)
{
double scaleFactor = 0.0015;
YoGraphicVector dynamicGraphicVector = new YoGraphicVector(groundContactPoint.getName(), groundContactPoint.getYoPosition(), groundContactPoint.getYoForce(), scaleFactor, appearance);
yoGraphicsList.add(dynamicGraphicVector);
}
if (yoGraphicsListRegistry != null)
yoGraphicsListRegistry.registerYoGraphicsList(yoGraphicsList);
robot.setController(this, 10);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
private void createContactPoints(Robot floatingRobot)
{
GroundContactPoint contactPoint1 = new GroundContactPoint("contactPoint1", new Vector3D(0.0, 0.0, 0.0), floatingRobot);
verticalJoint.addGroundContactPoint(1, contactPoint1);
GroundContactPoint contactPoint2 = new GroundContactPoint("contactPoint2", new Vector3D(-0.002, 0.0, 0.0), floatingRobot);
verticalJoint.addGroundContactPoint(1, contactPoint2);
GroundContactPoint contactPoint3 = new GroundContactPoint("contactPoint3", new Vector3D(0.002, 0.0, 0.0), floatingRobot);
verticalJoint.addGroundContactPoint(1, contactPoint3);
ContactController contactController = new ContactController();
contactController.setContactParameters(10000.0, 1000.0, 0.5, 0.3);
contactController.addContactPoints(robots[0].getAllGroundContactPoints());
ArrayList<Contactable> robotList = new ArrayList<Contactable>();
robotList.add((Contactable) robots[1]);
contactController.addContactables(robotList);
robots[1].setController(contactController);
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
private void getExternalWrenchesFromSCS()
{
calculator.setExternalWrenchesToZero();
for (ExternalForcePoint efp : robot.getAllGroundContactPoints())
{
String parentJointName = efp.getParentJoint().getName();
RigidBodyBasics body = nameToJointMap.get(parentJointName).getSuccessor();
FrameVector3DReadOnly moment = efp.getYoMoment();
FrameVector3DReadOnly force = efp.getYoForce();
FramePoint3D pointOfApplication = new FramePoint3D(efp.getYoPosition());
pointOfApplication.changeFrame(body.getBodyFixedFrame());
SpatialVector vector6D = new SpatialVector(moment, force);
vector6D.changeFrame(body.getBodyFixedFrame());
Wrench externalWrench = new Wrench(body.getBodyFixedFrame(), body.getBodyFixedFrame());
externalWrench.set(vector6D.getAngularPart(), vector6D.getLinearPart(), pointOfApplication);
calculator.getExternalWrench(body).add(externalWrench);
}
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
GroundContactPoint groundContactPoint = robot.getAllGroundContactPoints().get(0);
YoFramePoint3D yoPosition = groundContactPoint.getYoPosition();
xPosition = dataBuffer.getEntry(yoPosition.getYoX()).getData();
内容来源于网络,如有侵权,请联系作者删除!