gpt4 book ai didi

us.ihmc.graphicsDescription.yoGraphics.YoGraphicPolygon.update()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 19:30:40 25 4
gpt4 key购买 nike

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

YoGraphicPolygon.update介绍

暂无

代码示例

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

public void updateConvexPolygon2d(FrameConvexPolygon2d frameConvexPolygon2d)
{
 yoFrameConvexPolygon2d.setFrameConvexPolygon2d(frameConvexPolygon2d);
 update();
}

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

polygonToSnapViz.update();
  snappedPolygonViz.update();
  return;
snappedPolygonViz.update();

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public void updateConvexPolygon2d(FrameConvexPolygon2DReadOnly frameConvexPolygon2d)
{
 yoFrameConvexPolygon2d.set(frameConvexPolygon2d);
 update();
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public void updateConvexPolygon2d(ConvexPolygon2DReadOnly convexPolygon2d)
{
 yoFrameConvexPolygon2d.set(convexPolygon2d);
 update();
}

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

public void updateConvexPolygon2d(ConvexPolygon2d convexPolygon2d)
{
 yoFrameConvexPolygon2d.setConvexPolygon2d(convexPolygon2d);
 update();
}

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

@Override
public void goalWasSet(RigidBodyTransform goalLeftFootPose, RigidBodyTransform goalRightFootPose)
{
 plannerUpdateIndex.increment();
 footstepGoalsViz.get(RobotSide.LEFT).setTransformToWorld(goalLeftFootPose);
 footstepGoalsViz.get(RobotSide.RIGHT).setTransformToWorld(goalRightFootPose);
 footstepGoalsViz.get(RobotSide.LEFT).update();
 footstepGoalsViz.get(RobotSide.RIGHT).update();
 tickAndUpdate();
}

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

public void update(Footstep footstep)
{
 footstep.getSolePose(footstepPose);
 yoFootstepPose.setAndMatchFrame(footstepPose);
 List<Point2d> predictedContactPoints = footstep.getPredictedContactPoints();
 List<Point2d> contactPointsToVisualize;
 if (predictedContactPoints == null || predictedContactPoints.isEmpty())
   contactPointsToVisualize = defaultContactPointsInSoleFrame;
 else
   contactPointsToVisualize = predictedContactPoints;
 foothold.setAndUpdate(contactPointsToVisualize, contactPointsToVisualize.size());
 yoFoothold.setConvexPolygon2d(foothold);
 poseViz.update();
 footholdViz.update();
}

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

footPolygonViz.update();

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

footPolygonViz.update();

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

footstepUnderConsiderationViz.update();
tickAndUpdate();

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

@Override
public void nodeUnderConsiderationWasRejected(BipedalFootstepPlannerNode rejectedNode, BipedalFootstepPlannerNodeRejectionReason reason)
{
 plannerUpdateIndex.increment();
 RobotSide robotSide = rejectedNode.getRobotSide();
 RigidBodyTransform soleTransform = new RigidBodyTransform();
 rejectedNode.getSoleTransform(soleTransform);
 nodeIsAtGoal.get(robotSide).set(rejectedNode.isAtGoal());
 if (verbose)
 {
   System.out.println("Node rejected:");
   System.out.println(rejectedNode);
 }
 footstepsUnderConsiderationViz.get(robotSide).setPoseToNaN();
 acceptedFootstepsViz.get(robotSide).setPoseToNaN();
 YoGraphicPolygon rejectedFootstepViz = rejectedFootstepsViz.get(robotSide);
 rejectedFootstepViz.setTransformToWorld(soleTransform);
 moveUpSlightlyToEnsureVisible(rejectedFootstepViz);
 rejectedFootstepViz.update();
 nodeRejectedReason.set(reason);
 tickAndUpdate();
}

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

private void drawAcceptedFootstepNode(BipedalFootstepPlannerNode acceptedNode)
{
 RobotSide robotSide = acceptedNode.getRobotSide();
 RigidBodyTransform soleTransform = new RigidBodyTransform();
 acceptedNode.getSoleTransform(soleTransform);
 nodeIsAtGoal.get(robotSide).set(acceptedNode.isAtGoal());
 if (verbose)
 {
   System.out.println("Node accepted:");
   System.out.println(acceptedNode);
 }
 footstepsUnderConsiderationViz.get(robotSide).setPoseToNaN();
 rejectedFootstepsViz.get(robotSide).setPoseToNaN();
 YoGraphicPolygon acceptedFootstepViz = acceptedFootstepsViz.get(robotSide);
 acceptedFootstepViz.setTransformToWorld(soleTransform);
 Vector3d surfaceNormal = new Vector3d(0.0, 0.0, 1.0);
 soleTransform.transform(surfaceNormal);
 acceptedFootstepSurfaceNormals.get(robotSide).set(surfaceNormal);
 moveUpSlightlyToEnsureVisible(acceptedFootstepViz);
 acceptedFootstepViz.update();
}

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

@Override
public void startNodeWasAdded(BipedalFootstepPlannerNode startNode)
{
 plannerUpdateIndex.increment();
 
 RobotSide robotSide = startNode.getRobotSide();
 hideExpandingFootstepViz();
 
 RigidBodyTransform soleTransform = new RigidBodyTransform();
 startNode.getSoleTransform(soleTransform);
 YoGraphicPolygon startNodeViz = footstepStartsViz.get(robotSide);
 startNodeViz.setTransformToWorld(soleTransform);
 moveUpSlightlyToEnsureVisible(startNodeViz);
 startNodeViz.update();
 
 YoGraphicPolygon otherStartNodesViz = footstepStartsViz.get(robotSide.getOppositeSide());
 otherStartNodesViz.setPoseToNaN();
 tickAndUpdate();
}

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

public PolygonSnapperVisualizer(ConvexPolygon2D snappingPolygonShape)
{
 Robot robot = new Robot("Robot");
 scs = new SimulationConstructionSet(robot);
 scs.setDT(0.1, 1);
 polygonToSnap = new YoFrameConvexPolygon2D("polygonToSnap", ReferenceFrame.getWorldFrame(), 4, registry);
 snappedPolygon = new YoFrameConvexPolygon2D("snappedPolygon", ReferenceFrame.getWorldFrame(), 4, registry);
 polygonToSnap.set(snappingPolygonShape);
 snappedPolygon.set(snappingPolygonShape);
 polygonToSnapPose = new YoFramePoseUsingYawPitchRoll("polygonToSnapPose", ReferenceFrame.getWorldFrame(), registry);
 snappedPolygonPose = new YoFramePoseUsingYawPitchRoll("snappedPolygonPose", ReferenceFrame.getWorldFrame(), registry);
 polygonToSnapPose.setToNaN();
 snappedPolygonPose.setToNaN();
 polygonToSnapViz = new YoGraphicPolygon("polygonToSnapViz", polygonToSnap, polygonToSnapPose, 1.0, YoAppearance.Green());
 snappedPolygonViz = new YoGraphicPolygon("snappedPolygonViz", polygonToSnap, snappedPolygonPose, 1.0, YoAppearance.Red());
 polygonToSnapViz.update();
 snappedPolygonViz.update();
 scs.addYoGraphic(polygonToSnapViz);
 scs.addYoGraphic(snappedPolygonViz);
 scs.addYoVariableRegistry(registry);
 scs.setGroundVisible(false);
 scs.startOnAThread();
}

代码示例来源:origin: us.ihmc/simulation-construction-set-test

@Override
public void run()
{
 int i = 0;
 while (i++ < 20)
 {
   quickPause();
   ConvexPolygon2D newPolygon = new ConvexPolygon2D(Vertex2DSupplier.asVertex2DSupplier(secondPointList));
   yoPolygon.set(newPolygon);
   ConvexPolygon2D newYoPolygon = new ConvexPolygon2D(Vertex2DSupplier.asVertex2DSupplier(pointList));
   yoFramePolygon.set(newYoPolygon);
   yoGraphicYoFramePolygon.update();
   Vector3D eulerAngles = new Vector3D();
   yoFramePolygonOrientation.getEulerAngles(eulerAngles);
   eulerAngles.setY(eulerAngles.getY() + 0.1);
   yoFramePolygonOrientation.setEulerAngles(eulerAngles);
   yoGraphicText.setText("Hello");
   yoGraphicText.update();
   scs.tickAndUpdate();
   quickPause();
   newPolygon = new ConvexPolygon2D(Vertex2DSupplier.asVertex2DSupplier(pointList));
   yoPolygon.set(newPolygon);
   yoGraphicYoFramePolygon.update();
   newYoPolygon = new ConvexPolygon2D(Vertex2DSupplier.asVertex2DSupplier(secondPointList));
   yoFramePolygon.set(newYoPolygon);
   yoGraphicText.setText("GoodBye");
   yoGraphicText.update();
   scs.tickAndUpdate();
 }
}

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