gpt4 book ai didi

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

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

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

YoFrameVector3D.length介绍

暂无

代码示例

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

public boolean checkComputedRootJointWrenchIsZero(double epsilon)
{
 if (computedRootJointForces.length() > epsilon)
   return false;
 if (computedRootJointTorques.length() > epsilon)
   return false;
 return true;
}

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

@Override
public boolean isInContact()
{
 double force = forcePoint.getYoForce().length();
 isInContact.set(force >= contactForceThreshold.getDoubleValue());
 return isInContact.getBooleanValue();
}

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

private void computeProportionalTerm(FramePoint3D desiredPosition)
{
 desiredPosition.changeFrame(bodyFrame);
 positionError.set(desiredPosition);
 // Limit the maximum position error considered for control action
 double maximumError = gains.getMaximumProportionalError();
 double errorMagnitude = positionError.length();
 proportionalTerm.set(positionError);
 if (errorMagnitude > maximumError)
 {
   proportionalTerm.scale(maximumError / errorMagnitude);
 }
 gains.getProportionalGainMatrix(tempGainMatrix);
 tempGainMatrix.transform(proportionalTerm);
}

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

/**
* Computes the new derivative gains to use that reduces the amount of damping in the direction with the most position error.
* This prevents a high desired correcting velocity from being penalized when it deviates from the objective motion.
* @param positionError current position error being used by the feedback control
* @param derivativeGainsToPack derivative gain matrix to use with less damping in the main direction of motion
*/
public void compute(YoFrameVector3D positionError, Matrix3D derivativeGainsToPack)
{
 this.positionError.setIncludingFrame(positionError);
 if (positionError.length() > tangentialDampingGains.getParallelDampingDeadband())
 {
   bodyFrameTangentToControl.update();
   double alpha = computeDampingReductionRatioParallelToMotion(positionError.length());
   transformedGains.setToZero(bodyFrame);
   transformedGains.set(derivativeGainsToPack);
   transformedGains.changeFrame(bodyFrameTangentToControl);
   transformedGains.setElement(0, 0, alpha * transformedGains.getElement(0, 0));
   transformedGains.setElement(1, 0, alpha * transformedGains.getElement(1, 0));
   transformedGains.setElement(2, 0, alpha * transformedGains.getElement(2, 0));
   transformedGains.changeFrame(bodyFrame);
   transformedGains.getMatrix(derivativeGainsToPack);
 }
}

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

@Override
public void initialize()
{
 currentTime.set(0.0);
 initialAngularVelocityMagnitude.set(initialAngularVelocity.length());
 finalAngularVelocityMagnitude.set(finalAngularVelocity.length());
 maxAngularVelocityMagnitudeAtLimits.set(PI / trajectoryTime.getDoubleValue());
 initialDriftSaturated.set(initialAngularVelocityMagnitude.getDoubleValue() > maxAngularVelocityMagnitudeAtLimits.getDoubleValue());
 finalDriftSaturated.set(finalAngularVelocityMagnitude.getDoubleValue() > maxAngularVelocityMagnitudeAtLimits.getDoubleValue());
 parameterPolynomial.setQuintic(0, trajectoryTime.getDoubleValue(), 0.0, 0.0, 0.0, 1.0, 0.0, 0.0);
 if (initialOrientation.dot(finalOrientation) < 0.0)
   finalOrientation.negate();
 currentOrientation.set(initialOrientation);
 currentAngularVelocity.set(initialAngularVelocity);
 currentAngularAcceleration.setToZero();
}

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

private void applyForce()
{
 double length = pushDirection.length();
 if (length > 1e-5)
 {
   pushForce.set(pushDirection);
   pushForce.normalize();
   pushForce.scale(pushForceMagnitude.getDoubleValue());
   if (pushCondition == null)
   {
    pushTimeSwitch.set(yoTime.getDoubleValue());
   }
 }
 else
 {
   pushForce.setToZero();
   pushTimeSwitch.set(Double.NEGATIVE_INFINITY);
 }
 pushNumber.increment();
}

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

private void computeIntegralTerm()
{
 if (gains.getMaximumIntegralError() < 1e-5)
 {
   integralTerm.setToZero(bodyFrame);
   return;
 }
 double errorIntegratedX = positionError.getX() * dt;
 double errorIntegratedY = positionError.getY() * dt;
 double errorIntegratedZ = positionError.getZ() * dt;
 positionErrorCumulated.add(errorIntegratedX, errorIntegratedY, errorIntegratedZ);
 double errorMagnitude = positionErrorCumulated.length();
 if (errorMagnitude > gains.getMaximumIntegralError())
 {
   positionErrorCumulated.scale(gains.getMaximumIntegralError() / errorMagnitude);
 }
 integralTerm.set(positionErrorCumulated);
 gains.getIntegralGainMatrix(tempGainMatrix);
 tempGainMatrix.transform(integralTerm);
}

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

private void computeIntegralTerm()
{
 if (gains.getMaximumIntegralError() < 1e-5)
 {
   integralTerm.setToZero(bodyFrame);
   return;
 }
 double integratedErrorAngle = errorAngleAxis.getAngle() * dt;
 double errorIntegratedX = errorAngleAxis.getX() * integratedErrorAngle;
 double errorIntegratedY = errorAngleAxis.getY() * integratedErrorAngle;
 double errorIntegratedZ = errorAngleAxis.getZ() * integratedErrorAngle;
 rotationErrorCumulated.add(errorIntegratedX, errorIntegratedY, errorIntegratedZ);
 double errorMagnitude = rotationErrorCumulated.length();
 if (errorMagnitude > gains.getMaximumIntegralError())
 {
   rotationErrorCumulated.scale(gains.getMaximumIntegralError() / errorMagnitude);
 }
 integralTerm.set(rotationErrorCumulated);
 gains.getIntegralGainMatrix(tempGainMatrix);
 tempGainMatrix.transform(integralTerm);
}

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

public void applyForce(Vector3D direction, double magnitude, double duration)
  {
   PrintTools.info("\nPushing " + jointName + " direction: " + direction + " magnitude: " + magnitude + "(N) for " + duration + "(s)");
   
   pushDuration.set(duration);
   pushDelay.set(0.0);
   pushDirection.set(direction);
   pushMagnitude.set(magnitude);
   
   if (pushDirection.length() > 1e-5)
   {
     pushForce.set(pushDirection);
     pushForce.normalize();
     pushForce.scale(pushMagnitude.getDoubleValue());
     pushTimeSwitch.set(yoTime.getDoubleValue());
   }
   else
   {
     pushForce.setToZero();
     pushTimeSwitch.set(Double.NEGATIVE_INFINITY);
   }

   pushNumber.increment();
  }
}

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