gpt4 book ai didi

us.ihmc.yoVariables.variable.YoFramePoint3D类的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 20:30:40 28 4
gpt4 key购买 nike

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

YoFramePoint3D介绍

[英]FixedFramePoint3DBasics implementation which coordinates x, y, zare baked with YoDoubles.
[中]FixedFramePoint3DBasics实现,它用Yodouble来协调x、y、zare。

代码示例

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

public YoGraphicLineSegment(String namePrefix, String nameSuffix, ReferenceFrame referenceFrame, AppearanceDefinition appearance,
              YoVariableRegistry registry)
{
 this(namePrefix, new YoFramePoint3D(namePrefix, nameSuffix + "Start", referenceFrame, registry),
    new YoFramePoint3D(namePrefix, nameSuffix + "End", referenceFrame, registry), appearance);
}

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

public void set(FramePoint3D framePoint)
  {
   this.framePoint.set(framePoint);
  }
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces

private void setupSlidersForSupportBaseControl()
{
 int sliderChannel = 1;
 for (int i = 0; i < baseControlPoints.length; i++)
 {
   YoFramePoint3D baseControlPoint = baseControlPoints[i];
   sliderBoard.setSlider(sliderChannel++, baseControlPoint.getYoX(), baseControlPoint.getX() - 2, baseControlPoint.getX() + 2);
   sliderBoard.setSlider(sliderChannel++, baseControlPoint.getYoY(), baseControlPoint.getY() - 2, baseControlPoint.getY() + 2);
 }
}

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

@Override
public YoDouble[] getVariables()
{
 return new YoDouble[] {start.getYoX(), start.getYoY(), start.getYoZ(), end.getYoX(), end.getYoY(), end.getYoZ()};
}

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

public YoArtifactOval(String name, YoFramePoint3D center, YoDouble radius, Color color)
{
 this(name, center.getYoX(), center.getYoY(), radius, radius, color);
}

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

public YoGraphicPosition(String name, YoFramePoint3D framePoint, double scale, AppearanceDefinition appearance, GraphicType type)
{
 super(name);
 framePoint.checkReferenceFrameMatch(ReferenceFrame.getWorldFrame());
 x = framePoint.getYoX();
 y = framePoint.getYoY();
 z = framePoint.getYoZ();
 this.scale = scale;
 this.type = type;
 this.appearance = appearance;
}

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

@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testComputeDesiredCapturePointVelocity()
{
 YoFramePoint3D initialCapturePointPosition = new YoFramePoint3D("", ReferenceFrame.getWorldFrame(), registry);
 YoFramePoint3D computedCapturePoint1 = new YoFramePoint3D("1", ReferenceFrame.getWorldFrame(), registry);
 YoFramePoint3D computedCapturePoint2 = new YoFramePoint3D("2", ReferenceFrame.getWorldFrame(), registry);
 YoFramePoint3D initialCenterOfPressure = new YoFramePoint3D("3", ReferenceFrame.getWorldFrame(), registry);
 YoFrameVector3D differentiatedCapturePointPosition = new YoFrameVector3D("4", ReferenceFrame.getWorldFrame(), registry);
 YoFrameVector3D computedCapturePointVelocity = new YoFrameVector3D("5", ReferenceFrame.getWorldFrame(), registry);
 for (int i = 0; i < nTests; i++)
 {
   initialCapturePointPosition.set(random.nextDouble(), random.nextDouble(), 0);
   initialCenterOfPressure.set(initialCapturePointPosition.getX() + 0.02, initialCapturePointPosition.getY() + 0.01, 0);
   double deltaT = 0.001;
   double time = random.nextDouble() * 0.1 + 0.05;
   double omega0 = 0.5;
   CapturePointTools.computeDesiredCapturePointPosition(omega0, time, initialCapturePointPosition, initialCenterOfPressure, computedCapturePoint1);
   CapturePointTools.computeDesiredCapturePointPosition(omega0, time + deltaT, initialCapturePointPosition, initialCenterOfPressure,
      computedCapturePoint2);
   differentiatedCapturePointPosition.set(computedCapturePoint2);
   differentiatedCapturePointPosition.sub(computedCapturePoint1);
   differentiatedCapturePointPosition.scale(1 / deltaT);
   CapturePointTools.computeDesiredCapturePointVelocity(omega0, time + deltaT, initialCapturePointPosition, initialCenterOfPressure,
      computedCapturePointVelocity);
   EuclidCoreTestTools.assertTuple3DEquals("", computedCapturePointVelocity, differentiatedCapturePointPosition, 1e-3);
 }
}

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

public void set(List<? extends Point3DReadOnly> points)
{
 if (points.size() > this.ccwOrderedYoFramePoints.length)
   throw new RuntimeException("Cannot plot more vertices than the maximum number");
 numberOfPoints.set(points.size());
 for (int i = 0; i < numberOfPoints.getValue(); i++)
   ccwOrderedYoFramePoints[i].set(points.get(i));
 for (int i = numberOfPoints.getValue(); i < ccwOrderedYoFramePoints.length; i++)
   ccwOrderedYoFramePoints[i].setToNaN();
}

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

@Before
public void setUp()
{
 referenceFrame = ReferenceFrame.constructARootFrame("rootNameTEST");
 registry = new YoVariableRegistry("parentRegistryTEST");
 yoFramePoint = new YoFramePoint3D(namePrefix, referenceFrame, registry);
 yoFramePoint.set(xValue, yValue, zValue);
}

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

private void setupVisualization(String prefix, YoGraphicsListRegistry graphicsListRegistry, YoVariableRegistry registry)
{
 YoGraphicsList yoGraphicsList = new YoGraphicsList(prefix + "VisGraph");
 for (int i = 0; i < bodyPathPointsForVisualization; i++)
 {
   YoFramePoint3D point = new YoFramePoint3D(prefix + "BodyPathPoint" + i, ReferenceFrame.getWorldFrame(), registry);
   point.setToNaN();
   bodyPathPoints.add(point);
   YoGraphicPosition pointVisualization = new YoGraphicPosition(prefix + "BodyPathPoint" + i, point, 0.02, YoAppearance.Yellow());
   yoGraphicsList.add(pointVisualization);
 }
 graphicsListRegistry.registerYoGraphicsList(yoGraphicsList);
}

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

@Override
public void initialize()
{
 currentTime.set(0.0);
 double tIntermediate = trajectoryTime.getDoubleValue() / 2.0;
 xPolynomial.setQuadraticWithFinalVelocityConstraint(0.0,trajectoryTime.getDoubleValue(), initialPosition.getX(), finalPosition.getX(), finalVelocity.getX());
 yPolynomial.setQuadraticWithFinalVelocityConstraint(0.0,trajectoryTime.getDoubleValue(), initialPosition.getY(), finalPosition.getY(), finalVelocity.getY());
 zPolynomial.setCubicWithIntermediatePositionAndFinalVelocityConstraint(0.0,  tIntermediate, trajectoryTime.getDoubleValue(), initialPosition.getZ(), intermediateZPosition.getDoubleValue(), finalPosition.getZ(), finalVelocity.getZ());
 currentPosition.set(initialPosition);
 currentAcceleration.setToZero();
}

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

public void handleClick(Point3D intersectionPosition, Point3D cameraPosition)
{
 LaunchedBall nextBall = poolOfBalls.get(nextBallIndex);
 final double ballVelocityMagnitude = directedPerturbance.getBallVelocityMagnitude();
 tempPoint.set(ballTarget.getX(), ballTarget.getY(), ballTarget.getZ());
 Point3D initialPosition = computeInitialPosition(intersectionPosition, ballTarget.getZ());
 final Point3D finalPosition = computeFinalPosition(initialPosition, ballVelocityMagnitude);
 nextBall.launch(initialPosition, finalPosition, directedPerturbance.getBallMass(), ballVelocityMagnitude);
 nextBallIndex++;
 if (nextBallIndex >= poolOfBalls.size())
 {
   nextBallIndex = 0;
 }
}

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

public YoGraphicLineSegment(String name, YoFramePoint3D startPoint, YoFramePoint3D endPoint, double scale, AppearanceDefinition appearance,
              boolean drawArrowhead)
{
 this(name, startPoint.getYoX(), startPoint.getYoY(), startPoint.getYoZ(), endPoint.getYoX(), endPoint.getYoY(), endPoint.getYoZ(), scale, appearance,
    drawArrowhead);
 if (!startPoint.getReferenceFrame().isWorldFrame() || !endPoint.getReferenceFrame().isWorldFrame())
 {
   System.err.println("Warning: Should be in a World Frame to create a YoGraphicLineSegment. startPoint = " + startPoint + ", endPoint = " + endPoint);
 }
}

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

public void setConstantPose(FramePose3D constantPose)
{
 position.checkReferenceFrameMatch(constantPose);
 position.set(constantPose.getX(), constantPose.getY(), constantPose.getZ());
 orientation.setYawPitchRoll(constantPose.getYaw(), constantPose.getPitch(), constantPose.getRoll());
}

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

@Test// timeout=300000
public void testGetYoPosition()
{
  YoFramePoint3D yoPosition = kinematicPoint.getYoPosition();
  String frameName = yoPosition.getReferenceFrame().getName();
  assertEquals("( 0.000,  0.000,  0.000 )-" + frameName, yoPosition.toString());
  yoPosition.set(new Point3D(5.0, 5.1, 5.2));
  assertEquals("( 5.000,  5.100,  5.200 )-" + frameName, yoPosition.toString());
}

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

@Override
public void setPositionToNaN()
{
 position.setToNaN();
}

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

public void getProjectedOntoXYPlane(YoFramePoint2D positionToPack)
{
 positionToPack.set(currentPosition.getX(), currentPosition.getY());
}

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

@Override
protected boolean containsNaN()
{
 if (pointOne.containsNaN())
   return true;
 if (pointTwo.containsNaN())
   return true;
 if (pointThree.containsNaN())
   return true;
 return false;
}

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

public double getX()
{
 return getPosition().getX();
}

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

public double getY()
{
 return getPosition().getY();
}

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