本文整理了Java中us.ihmc.robotics.math.trajectories.YoTrajectory.getInitialTime()
方法的一些代码示例,展示了YoTrajectory.getInitialTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoTrajectory.getInitialTime()
方法的具体详情如下:
包路径:us.ihmc.robotics.math.trajectories.YoTrajectory
类名称:YoTrajectory
方法名:getInitialTime
暂无
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public double getInitialTime()
{
if (MathTools.epsilonCompare(xTrajectory.getInitialTime(), yTrajectory.getInitialTime(), Epsilons.ONE_THOUSANDTH)
&& MathTools.epsilonCompare(xTrajectory.getInitialTime(), zTrajectory.getInitialTime(), Epsilons.ONE_THOUSANDTH))
return xTrajectory.getInitialTime();
else
{
//PrintTools.warn("Trajectory initial times do not match. Using X trajectory times for computation");
return xTrajectory.getInitialTime();
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public double getInitialTime(Axis dir)
{
return getYoTrajectory(dir).getInitialTime();
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public double getInitialTime(int index)
{
return getYoTrajectory(index).getInitialTime();
}
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
private void calculateGeneralizedGammaPrimeOnCMPSegment(DenseMatrix64F generalizedGammaPrime, int gammaDerivativeOrder, YoTrajectory cmpPolynomial, double time, double omega0)
{
double timeSegmentTotal = cmpPolynomial.getFinalTime() - cmpPolynomial.getInitialTime();
double ddGamaPrimeValue = Math.pow(omega0, gammaDerivativeOrder)*Math.exp(omega0 * (time - timeSegmentTotal));
generalizedGammaPrime.set(0, 0, ddGamaPrimeValue);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public boolean timeIntervalContains(double timeToCheck, double EPSILON)
{
return MathTools.intervalContains(timeToCheck, getInitialTime(), getFinalTime(), EPSILON);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public boolean timeIntervalContains(double timeToCheck)
{
return MathTools.intervalContains(timeToCheck, getInitialTime(), getFinalTime(), Epsilons.ONE_MILLIONTH);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void getFramePositionInitial(FramePoint3D positionToPack)
{
compute(xTrajectory.getInitialTime());
PrintTools.debug("Initial time = " + xTrajectory.getInitialTime());
positionToPack.setToZero(referenceFrame);
positionToPack.set(getPosition());
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public boolean isValidTrajectory()
{
boolean retVal = (getInitialTime() < getFinalTime()) && Double.isFinite(getInitialTime()) && Double.isFinite(getFinalTime());
double[] coeffs = getCoefficients();
for(int i = 0; retVal && i < coeffs.length; i++)
retVal &= Double.isFinite(coeffs[i]);
return retVal;
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void set(YoTrajectory other)
{
polynomial.set(other.polynomial);
tInitial.set(other.getInitialTime());
tFinal.set(other.getFinalTime());
}
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
public double calculateICPLinearManual(YoTrajectory linear, double icpPositionDesiredFinal, double t, double omega0)
{
double icpManual = 0.0;
linear.compute(linear.getInitialTime());
double cmpRefInit = linear.getPosition();
linear.compute(linear.getFinalTime());
double cmpRefFinal = linear.getPosition();
double T = linear.getFinalTime();
double sigmat = calculateSigmaLinear(t, T, omega0);
double sigmaT = calculateSigmaLinear(T, T, omega0);
icpManual = (1 - sigmat - Math.exp(omega0*(t-T)) * (1 - sigmaT)) * cmpRefInit
+ (sigmat - Math.exp(omega0*(t-T)) * sigmaT) * cmpRefFinal
+ Math.exp(omega0*(t-T)) * icpPositionDesiredFinal;
return icpManual;
}
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
private void calculateGeneralizedBetaPrimeOnCMPSegment(DenseMatrix64F generalizedBetaPrime, int betaDerivativeOrder, YoTrajectory cmpPolynomial, double time, double omega0)
{
int numberOfCoefficients = cmpPolynomial.getNumberOfCoefficients();
double timeSegmentTotal = cmpPolynomial.getFinalTime() - cmpPolynomial.getInitialTime();
DenseMatrix64F tPowersDerivativeVector = new DenseMatrix64F(numberOfCoefficients, 1);
DenseMatrix64F tPowersDerivativeVectorTranspose = new DenseMatrix64F(1, numberOfCoefficients);
for(int i = 0; i < numberOfCoefficients; i++)
{
tPowersDerivativeVector.zero();
tPowersDerivativeVectorTranspose.zero();
tPowersDerivativeVector.set(cmpPolynomial.getXPowersDerivativeVector(i, timeSegmentTotal));
CommonOps.transpose(tPowersDerivativeVector, tPowersDerivativeVectorTranspose);
double scalar = Math.pow(omega0, betaDerivativeOrder-i) * Math.exp(omega0*(time-timeSegmentTotal));
CommonOps.addEquals(generalizedBetaPrime, scalar, tPowersDerivativeVectorTranspose);
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void getDerivative(YoTrajectory dervTraj, int order)
{
if (dervTraj.getMaximumNumberOfCoefficients() < this.getNumberOfCoefficients() - order)
return;
dervTraj.polynomial.reshape(getNumberOfCoefficients() - order);
for (int i = order; i < this.getNumberOfCoefficients(); i++)
{
dervTraj.polynomial.setDirectlyFast(i - order, this.polynomial.getDerivativeCoefficient(order, i) * this.polynomial.getCoefficient(i));
}
dervTraj.setInitialTime(this.getInitialTime());
dervTraj.setFinalTime(this.getFinalTime());
}
内容来源于网络,如有侵权,请联系作者删除!