gpt4 book ai didi

us.ihmc.robotics.math.trajectories.YoPolynomial3D类的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 05:23:31 30 4
gpt4 key购买 nike

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

YoPolynomial3D介绍

[英]YoPolynomial3D is the simplest 3D wrapper around the 1D YoPolynomial.

Unlike YoSpline3D, YoPolynomial3D does not add extra information and is only meant to simplify the interaction with polynomials when dealing with 3D trajectories.

The output is given in the form of Point3DReadOnly, Vector3DReadOnly, or Tuple3DReadOnly.
[中]YoPolynomial3D是围绕1D YoPolynomial最简单的3D包装。
与YoSpline3D不同,YoPolynomial3D不添加额外信息,仅用于简化处理3D轨迹时与多项式的交互。
输出以Point3DReadOnly、Vector3DReadOnly或Tuple3DReadOnly的形式给出。

代码示例

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

public static YoPolynomial3D[] createYoPolynomial3DArray(YoPolynomial[] xPolynomial, YoPolynomial[] yPolynomial, YoPolynomial[] zPolynomial)
{
 if (xPolynomial.length != yPolynomial.length || xPolynomial.length != zPolynomial.length)
   throw new RuntimeException("Cannot handle different number of polynomial for the different axes.");
 YoPolynomial3D[] yoPolynomial3Ds = new YoPolynomial3D[xPolynomial.length];
 for (int i = 0; i < xPolynomial.length; i++)
 {
   yoPolynomial3Ds[i] = new YoPolynomial3D(xPolynomial[i], yPolynomial[i], zPolynomial[i]);
 }
 return yoPolynomial3Ds;
}

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

private void initializeSubTrajectory(int waypointIndex)
{
 int secondWaypointIndex = Math.min(waypointIndex + 1, numberOfWaypoints.getValue() - 1);
 YoFrameEuclideanTrajectoryPoint start = waypoints.get(waypointIndex);
 YoFrameEuclideanTrajectoryPoint end = waypoints.get(secondWaypointIndex);
 subTrajectory.setCubic(0.0, end.getTime() - start.getTime(), start.getPosition(), start.getLinearVelocity(), end.getPosition(), end.getLinearVelocity());
}

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

public void reset()
{
 for (int index = 0; index < 3; index++)
   getYoPolynomial(index).reset();
}

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

public YoPolynomial getYoPolynomial(int index)
{
 switch (index)
 {
 case 0:
   return getYoPolynomialX();
 case 1:
   return getYoPolynomialY();
 case 2:
   return getYoPolynomialZ();
 default:
   throw new IndexOutOfBoundsException(Integer.toString(index));
 }
}

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

swTraj.setCubic(0, phaseTime, fromPoint, swFootVeloIn, toPoint, swFootVeloFi);
swTraj.compute(tphase);
swFootLoc.set(swTraj.getPosition());
swFootLoc.add(0.0, 0.0, footLift * 4 * tphase * (1.0 - tphase/phaseTime)/phaseTime);
swFootVelo.set(swTraj.getVelocity());

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

activePolynomial3D.compute(t);
intermediatePositions[i].set(activePolynomial3D.getPosition());
intermediateVelocities[i].set(activePolynomial3D.getVelocity());
intermediateAccelerations[i].set(activePolynomial3D.getAcceleration());
maxVelocity = Math.max(maxVelocity, activePolynomial3D.getVelocity().lengthSquared());
maxAcceleration = Math.max(maxAcceleration, activePolynomial3D.getAcceleration().lengthSquared());

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

subTrajectory.compute(subTrajectoryTime);
currentPosition.set(subTrajectory.getPosition());
currentVelocity.set(subTrajectory.getVelocity());
currentAcceleration.set(subTrajectory.getAcceleration());

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

public void set(YoPolynomial3D other)
{
 xPolynomial.set(other.getYoPolynomialX());
 yPolynomial.set(other.getYoPolynomialY());
 zPolynomial.set(other.getYoPolynomialZ());
}

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

public static List<YoPolynomial3D> createYoPolynomial3DList(YoPolynomial[] xPolynomial, YoPolynomial[] yPolynomial, YoPolynomial[] zPolynomial)
{
 if (xPolynomial.length != yPolynomial.length || xPolynomial.length != zPolynomial.length)
   throw new RuntimeException("Cannot handle different number of polynomial for the different axes.");
 List<YoPolynomial3D> yoPolynomial3Ds = new ArrayList<>(xPolynomial.length);
 for (int i = 0; i < xPolynomial.length; i++)
 {
   yoPolynomial3Ds.add(new YoPolynomial3D(xPolynomial[i], yPolynomial[i], zPolynomial[i]));
 }
 return yoPolynomial3Ds;
}

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

public YoPolynomial getYoPolynomial(Axis axis)
{
 return getYoPolynomial(axis.ordinal());
}

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

for (int i = 0; i < numberOfPolynomials; i++)
  yoPolynomialSizes[3 * i + 0] = yoPolynomial3Ds[i].getYoPolynomialX().getMaximumNumberOfCoefficients() + 1;
  yoPolynomialSizes[3 * i + 1] = yoPolynomial3Ds[i].getYoPolynomialY().getMaximumNumberOfCoefficients() + 1;
  yoPolynomialSizes[3 * i + 2] = yoPolynomial3Ds[i].getYoPolynomialZ().getMaximumNumberOfCoefficients() + 1;

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

public void setCubic(double t0, double tFinal, FramePoint3D z0, FrameVector3D zd0, FramePoint3D zFinal, FrameVector3D zdFinal)
{
 z0.checkReferenceFrameMatch(referenceFrame);
 zd0.checkReferenceFrameMatch(referenceFrame);
 zFinal.checkReferenceFrameMatch(referenceFrame);
 zdFinal.checkReferenceFrameMatch(referenceFrame);
 super.setCubic(t0, tFinal, z0, zd0, zFinal, zdFinal);
}

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

public static YoPolynomial3D[] createYoPolynomial3DArray(List<YoPolynomial> xPolynomial, List<YoPolynomial> yPolynomial, List<YoPolynomial> zPolynomial)
{
 if (xPolynomial.size() != yPolynomial.size() || xPolynomial.size() != zPolynomial.size())
   throw new RuntimeException("Cannot handle different number of polynomial for the different axes.");
 YoPolynomial3D[] yoPolynomial3Ds = new YoPolynomial3D[xPolynomial.size()];
 for (int i = 0; i < xPolynomial.size(); i++)
 {
   yoPolynomial3Ds[i] = new YoPolynomial3D(xPolynomial.get(i), yPolynomial.get(i), zPolynomial.get(i));
 }
 return yoPolynomial3Ds;
}

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

public void setConstant(Point3DReadOnly z)
{
 for (int index = 0; index < 3; index++)
   getYoPolynomial(index).setConstant(z.getElement(index));
}

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

public static List<YoPolynomial3D> createYoPolynomial3DList(List<YoPolynomial> xPolynomial, List<YoPolynomial> yPolynomial, List<YoPolynomial> zPolynomial)
{
 if (xPolynomial.size() != yPolynomial.size() || xPolynomial.size() != zPolynomial.size())
   throw new RuntimeException("Cannot handle different number of polynomial for the different axes.");
 List<YoPolynomial3D> yoPolynomial3Ds = new ArrayList<>(xPolynomial.size());
 for (int i = 0; i < xPolynomial.size(); i++)
 {
   yoPolynomial3Ds.add(new YoPolynomial3D(xPolynomial.get(i), yPolynomial.get(i), zPolynomial.get(i)));
 }
 return yoPolynomial3Ds;
}

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

public void setCubic(double t0, double tFinal, Point3DReadOnly z0, Point3DReadOnly zFinal)
{
 for (int index = 0; index < 3; index++)
   getYoPolynomial(index).setCubic(t0, tFinal, z0.getElement(index), zFinal.getElement(index));
}

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

public AngularMomentumSpy(DRCSimulationTestHelper simulationTestHelper)
{
  YoVariableRegistry scsRegistry = drcSimulationTestHelper.getYoVariableRegistry();
  drcSimulationTestHelper.addRobotControllerOnControllerThread(this);
  floatingRootJointModel = drcSimulationTestHelper.getRobot();
  rootJoint = floatingRootJointModel.getRootJoint();
  comAngularMomentum = new YoFrameVector3D("CoMAngularMomentum", worldFrame, scsRegistry);
  comEstimatedAngularMomentum = new YoFrameVector3D("CoMEstimatedAngularMomentum", worldFrame, scsRegistry);
  scs = drcSimulationTestHelper.getSimulationConstructionSet();
  swTraj = new YoPolynomial3D("SwingFootTraj", 4, scsRegistry);
  comTraj = new YoPolynomial3D("CoMTraj", 4, scsRegistry);
}

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

public void setLinear(double t0, double tFinal, Point3DReadOnly z0, Point3DReadOnly zf)
{
 for (int index = 0; index < 3; index++)
   getYoPolynomial(index).setLinear(t0, tFinal, z0.getElement(index), zf.getElement(index));
}

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

YoPolynomial yPolynomial = new YoPolynomial(name + "YPoly" + i, random.nextInt(20) + 1, registry);
YoPolynomial zPolynomial = new YoPolynomial(name + "ZPoly" + i, random.nextInt(20) + 1, registry);
yoPolynomial3Ds.add(new YoPolynomial3D(xPolynomial, yPolynomial, zPolynomial));
waypointTimes.add(new YoDouble(name + "WaypointTime" + i, registry));

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

YoPolynomial yoPolynomial = yoPolynomial3Ds[i].getYoPolynomial(index);

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