gpt4 book ai didi

us.ihmc.yoVariables.variable.YoFrameVector3D.sub()方法的使用及代码示例

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

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

YoFrameVector3D.sub介绍

暂无

代码示例

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

@Override
protected void computeRotationTranslation(AffineTransform transform3D)
{
 if (vector == null)
 {
   return;
 }
 vector.sub(end, start);
 super.computeRotationTranslation(transform3D);
}

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

public void setStartAndEnd(Point3DReadOnly startPoint, Point3DReadOnly endPoint)
{
 start.set(startPoint);
 end.set(endPoint);
 vector.sub(endPoint, startPoint);
}

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

public void initialize(FramePoint3D initialPosition, FrameVector3D initialVelocity, FramePoint3D finalPosition)
{
 initialPosition.changeFrame(referenceFrame);
 initialVelocity.changeFrame(referenceFrame);
 finalPosition.changeFrame(referenceFrame);
 
 c0.set(initialPosition);
 c1.set(initialVelocity);
 c2.set(finalPosition);
 c2.sub(initialPosition);
 c2.sub(initialVelocity);
}

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

public void initialize(FramePoint3D initialPosition, FramePoint3D intermediatePosition, FramePoint3D finalPosition, double intermediateParameter)
{
 initialPosition.changeFrame(referenceFrame);
 intermediatePosition.changeFrame(referenceFrame);
 finalPosition.changeFrame(referenceFrame);
 final double q = intermediateParameter;
 MathTools.checkIntervalContains(q, 0.0, 1.0);
 c0.set(initialPosition);
 c2.set(intermediatePosition);
 c2.sub(initialPosition);
 tempInitialize.set(finalPosition);
 tempInitialize.sub(initialPosition);
 tempInitialize.scale(q);
 c2.sub(tempInitialize);
 c2.scale(1.0 / (MathTools.square(q) - q));
 c1.set(finalPosition);
 c1.sub(initialPosition);
 c1.sub(c2);
}

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

private double computeFrameOrientationRelativeToWalkingPath(ReferenceFrame referenceFrame)
{
 this.walkPathVector.sub(this.targetLocation, robotYoPose.getPosition());
 fullRobotModel.updateFrames();
 FrameVector2D frameHeadingVector = new FrameVector2D(referenceFrame, 1.0, 0.0);
 frameHeadingVector.changeFrame(worldFrame);
 double ret = -Math.abs(frameHeadingVector.angle(new FrameVector2D(walkPathVector)));
 if (DEBUG)
 {
   PrintTools.debug(this, "FrameHeadingVector : " + frameHeadingVector);
   PrintTools.debug(this, "WalkPathVector : " + walkPathVector);
   PrintTools.debug(this, "OrientationToWalkPath : " + ret);
 }
 return ret;
}

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

private void applyTranslationalSlip(double percentOfDelta) 
{
 FrameVector3D slipDelta = new FrameVector3D(slipAmount);
 slipDelta.scale(percentOfDelta);
 slipAmount.sub(slipDelta);
 Point3D touchdownLocation = new Point3D();
 for (int i = 0; i < groundContactPointsToSlip.size(); i++)
 {
   GroundContactPoint groundContactPointToSlip = groundContactPointsToSlip.get(i);
   boolean touchedDown = (groundContactPointToSlip.isInContact());
   if (touchedDown)
   {
    groundContactPointToSlip.getTouchdownLocation(touchdownLocation);
    touchdownLocation.add(slipDelta);
    groundContactPointToSlip.setTouchdownLocation(touchdownLocation);
   }
 }
}

代码示例来源: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-robotics-toolkit

@Override
public void compute(double time)
{
 if (continuouslyUpdateFinalPosition.getBooleanValue())
 {
   updateFinalPosition();
 }
 this.currentTime.set(time);
 time = MathTools.clamp(time, 0.0, trajectoryTime.getDoubleValue());
 parameterPolynomial.compute(time);
 differenceVector.sub(finalPosition, initialPosition);
 double parameter = isDone() ? 1.0 : parameterPolynomial.getPosition();
 double parameterd = isDone() ? 0.0 : parameterPolynomial.getVelocity();
 double parameterdd = isDone() ? 0.0 : parameterPolynomial.getAcceleration();
 currentPosition.interpolate(initialPosition, finalPosition, parameter);
 currentVelocity.set(differenceVector);
 currentVelocity.scale(parameterd);
 currentAcceleration.set(differenceVector);
 currentAcceleration.scale(parameterdd);
}

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

desiredCoMVelocity.sub(integratedCoMPosition);
desiredCoMVelocity.scale(omega0.getDoubleValue());

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

desiredCoMVelocity.sub(integratedCoMPosition);
desiredCoMVelocity.scale(omega0.getDoubleValue());

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

desiredCoMVelocity.sub(integratedCoMPosition);
desiredCoMVelocity.scale(omega0.getDoubleValue());

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