gpt4 book ai didi

us.ihmc.robotics.math.frames.YoFramePoint.interpolate()方法的使用及代码示例

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

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

YoFramePoint.interpolate介绍

暂无

代码示例

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

YoFramePoint entryCMP = entryCMPs.get(i);
exitCornerPoint.interpolate(exitCMP, nextEntryCornerPoint, exitExponentialTerm);
entryCornerPoint.interpolate(entryCMP, exitCornerPoint, entryExponentialTerm);

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

/**
* Backward calculation of desired end of step capture point locations.
* @param cornerPointsToPack
* @param constantCMPs
* @param skipFirstCornerPoint whether the first is to be skipped or not. When in double support, the first corner point is useless and usually skipped.
* @param stepTime equals to the single plus double support durations
* @param omega0 the natural frequency &omega; = &radic;<span style="text-decoration:overline;">&nbsp; g / z0&nbsp;</span> of the biped.
*/
public static void computeDesiredCornerPoints(List<? extends YoFramePoint> cornerPointsToPack, List<YoFramePoint> constantCMPs, boolean skipFirstCornerPoint,
                       double stepTime, double omega0)
{
 double exponentialTerm = Math.exp(-omega0 * stepTime);
 YoFramePoint nextCornerPoint = constantCMPs.get(cornerPointsToPack.size());
 int firstCornerPointIndex = skipFirstCornerPoint ? 1 : 0;
 for (int i = cornerPointsToPack.size() - 1; i >= firstCornerPointIndex; i--)
 {
   YoFramePoint cornerPoint = cornerPointsToPack.get(i);
   YoFramePoint initialCMP = constantCMPs.get(i);
   cornerPoint.interpolate(initialCMP, nextCornerPoint, exponentialTerm);
   nextCornerPoint = cornerPoint;
 }
 if (skipFirstCornerPoint)
   cornerPointsToPack.get(0).setToNaN();
}

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

/**
* Compute the desired capture point position at a given time.
* x<sup>ICP<sub>des</sub></sup> = (e<sup>&omega;0 t</sup>) x<sup>ICP<sub>0</sub></sup> + (1-e<sup>&omega;0 t</sup>)x<sup>CMP<sub>0</sub></sup>
* @param omega0 the natural frequency &omega; = &radic;<span style="text-decoration:overline;">&nbsp; g / z0&nbsp;</span> of the biped.
* @param time
* @param initialCapturePoint
* @param initialCMP
* @param desiredCapturePointToPack
*/
public static void computeDesiredCapturePointPosition(double omega0, double time, YoFramePoint initialCapturePoint, YoFramePoint initialCMP,
                           YoFramePoint desiredCapturePointToPack)
{
 if (initialCapturePoint.distance(initialCMP) > EPSILON)
   desiredCapturePointToPack.interpolate(initialCMP, initialCapturePoint, Math.exp(omega0 * time));
 else
   desiredCapturePointToPack.set(initialCapturePoint);
}

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

/**
* Compute the desired capture point position at a given time.
* x<sup>ICP<sub>des</sub></sup> = (e<sup>&omega;0 t</sup>) x<sup>ICP<sub>0</sub></sup> + (1-e<sup>&omega;0 t</sup>)x<sup>CMP<sub>0</sub></sup>
*
* @param omega0 the natural frequency &omega; = &radic;<span style="text-decoration:overline;">&nbsp; g / z0&nbsp;</span> of the biped.
* @param time
* @param initialCapturePoint
* @param initialCMP
* @param desiredCapturePointToPack
*/
public static void computeDesiredCapturePointPosition(double omega0, double time, FramePoint initialCapturePoint, FramePoint initialCMP,
                           YoFramePoint desiredCapturePointToPack)
{
 if (initialCapturePoint.distance(initialCMP) > EPSILON)
   desiredCapturePointToPack.interpolate(initialCMP, initialCapturePoint, Math.exp(omega0 * time));
 else
   desiredCapturePointToPack.set(initialCapturePoint);
}

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

/**
* Backward calculation of the ICP corner points as the method {@link #computeDesiredCornerPoints(List, List, boolean, double, double)}
* but considering transfer time and swing time on a per step basis.
* <p>
* This method is to be used when in single support, or swing.
* @param cornerPointsToPack the ICP corner points computed by this method. Modified.
* @param constantCMPs the constant CMPs already computed. Not modified.
* @param swingTimes the swing time on a per step basis. Not modified.
* @param transferTimes the transfer time on a per step basis. Not modified.
* @param doubleSupportSplitFraction repartition around the ICP entry corner point of the double support.
* @param omega0 the natural frequency &omega; = &radic;<span style="text-decoration:overline;">&nbsp; g / z0&nbsp;</span> of the biped.
*/
public static void computeDesiredCornerPointsSingleSupport(List<? extends YoFramePoint> cornerPointsToPack, List<YoFramePoint> constantCMPs,
                             List<DoubleYoVariable> swingTimes, List<DoubleYoVariable> transferTimes,
                             double doubleSupportSplitFraction, double omega0)
{
 YoFramePoint nextCornerPoint = constantCMPs.get(cornerPointsToPack.size());
 for (int i = cornerPointsToPack.size() - 1; i >= 0; i--)
 {
   double stepTime = swingTimes.get(0).getDoubleValue();
   stepTime += (1.0 - doubleSupportSplitFraction) * transferTimes.get(0).getDoubleValue();
   stepTime += doubleSupportSplitFraction * transferTimes.get(0 + 1).getDoubleValue();
   double exponentialTerm = Math.exp(-omega0 * stepTime);
   YoFramePoint cornerPoint = cornerPointsToPack.get(i);
   YoFramePoint initialCMP = constantCMPs.get(i);
   cornerPoint.interpolate(initialCMP, nextCornerPoint, exponentialTerm);
   nextCornerPoint = cornerPoint;
 }
}

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

YoFramePoint initialCMP = constantCMPs.get(i);
cornerPoint.interpolate(initialCMP, nextCornerPoint, exponentialTerm);

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

YoFramePoint entryCMP = entryCMPs.get(i);
exitCornerPoint.interpolate(exitCMP, nextEntryCornerPoint, exitExponentialTerm);
entryCornerPoint.interpolate(entryCMP, exitCornerPoint, entryExponentialTerm);

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

YoFramePoint entryCMP = entryCMPs.get(i);
exitCornerPoint.interpolate(exitCMP, nextEntryCornerPoint, exitExponentialTerm);
entryCornerPoint.interpolate(entryCMP, exitCornerPoint, entryExponentialTerm);

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

@Override
public void compute(double time)
{
 if (continuouslyUpdateFinalPosition.getBooleanValue())
 {
   updateFinalPosition();
 }
 this.currentTime.set(time);
 time = MathTools.clipToMinMax(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);
}

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