gpt4 book ai didi

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

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

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

YoFrameVector.getZ介绍

暂无

代码示例

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

public double getLinearPartZ()
{
 return linearPart.getZ();
}

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

public double getAngularPartZ()
{
 return angularPart.getZ();
}

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

@Override
public double computeFootLoadPercentage()
{
 updateMeasurement();
 return Math.abs(yoMeasuredForceWorld.getZ()) / totalRobotWeight;
}

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

private boolean isForceMagnitudePastThreshold()
{
 readSensorData(footWrench);
 //TODO: We switched to just z and made sure it was positive.
 //TODO: Check which reference frames all this stuff is in.
 //TODO: Make SCS and Gazebo consistent if possible.
 return (yoFootForceInFoot.getZ() > contactThresholdForce.getDoubleValue());
 //      return (footFootMagnitude.getDoubleValue() > contactTresholdForce);
 //      return (footFootMagnitude.getDoubleValue() > MathTools.square(contactTresholdForce));
}

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

@Override
public boolean hasFootHitGround()
{
 updateMeasurement();
 hasFootHitGround.set(Math.abs(yoMeasuredForceWorld.getZ()) > forceThreshold.getDoubleValue());
 return hasFootHitGround.getBooleanValue();
}

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

@Override
public boolean getForceMagnitudePastThreshhold()
{
 updateMeasurement();
 hasFootHitGround.set(Math.abs(yoMeasuredForceWorld.getZ()) > forceThreshold.getDoubleValue());
 return hasFootHitGround.getBooleanValue();
}

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

private void computeTotalGroundReactionForce()
{
 totalGroundReactionForce.setToZero();
 for (int i = 0; i < feet.size(); i++)
 {
   RigidBody foot = feet.get(i);
   Wrench footWrench = footWrenches.get(foot);
   footSwitches.get(foot).computeAndPackFootWrench(footWrench);
   footWrench.getLinearPartIncludingFrame(tempFootForce);
   tempFootForce.changeFrame(worldFrame);
   totalGroundReactionForce.add(tempFootForce);
 }
 totalGroundReactionForce.getFrameTuple(tempCoMAcceleration);
 comAcceleration.set(tempCoMAcceleration);
 comAcceleration.setZ(comAcceleration.getZ() - robotMass.getDoubleValue() * gravitationalAcceleration);
}

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

private void updateCenterOfMass()
  {
   distalMassCalc.compute();
   distalMass.set(distalMassCalc.getTotalMass());
   distalMassForceInWorld.set(0.0, 0.0, Math.abs(GRAVITY) * distalMass.getDoubleValue());

   FramePoint distalCoMinWorld = distalMassCalc.getCenterOfMass();
   distalCoMInWorld.set(distalCoMinWorld);
   
   lowPassSensorForceZ.update(yoSensorForce.getZ());
  }
}

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

desiredCenterOfMassHeightPoint.changeFrame(worldFrame);
if (unachievedSwingTranslation.getZ() < 0.0)
  unachievedSwingTranslationFiltered.update(unachievedSwingTranslation.getZ());
  desiredCenterOfMassHeightPoint.setZ(desiredCenterOfMassHeightPoint.getZ() + unachievedSwingTranslationFiltered.getDoubleValue());
  if (USE_UNREACHABLE_FOOTSTEP_CORRECTION_ON_POSITION)
if (unachievedSwingVelocity.getZ() < 0.0)
  unachievedSwingVelocityFiltered.update(unachievedSwingVelocity.getZ());
  comHeightDataToCorrect.setComHeightVelocity(comHeightDataToCorrect.getComHeightVelocity() + unachievedSwingVelocityFiltered.getDoubleValue());
if (unachievedSwingAcceleration.getZ() < 0.0)
  unachievedSwingAccelerationFiltered.update(unachievedSwingAcceleration.getZ());
  comHeightDataToCorrect
     .setComHeightAcceleration(comHeightDataToCorrect.getComHeightAcceleration() + unachievedSwingAccelerationFiltered.getDoubleValue());

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

private void initializePolynomials()
{
 xPolynomial.setInitialPositionVelocityZeroFinalHighOrderDerivatives(0.0, trajectoryTime.getDoubleValue(), initialPosition.getX(), initialVelocity.getX(), finalPosition.getX(), finalVelocity.getX());
 yPolynomial.setInitialPositionVelocityZeroFinalHighOrderDerivatives(0.0, trajectoryTime.getDoubleValue(), initialPosition.getY(), initialVelocity.getY(), finalPosition.getY(), finalVelocity.getY());
 zPolynomial.setInitialPositionVelocityZeroFinalHighOrderDerivatives(0.0, trajectoryTime.getDoubleValue(), initialPosition.getZ(), initialVelocity.getZ(), finalPosition.getZ(), finalVelocity.getZ());
}

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

translationPhase.setZ(translationPhase.getZ() + 2.0  * Math.PI * translationFreqHz[2] * deltaT);
rotationPhaseEuler.setZ(rotationPhaseEuler.getZ() + 2.0  * Math.PI * rotationFreqHzYawPitchRoll[0] * deltaT);
nextTranslationToSlip.setX(nextTranslationToSlip.getX() * (2.0 * Math.PI * translationFreqHz[0] * Math.sin(translationPhase.getX()) * deltaT));
nextTranslationToSlip.setY(nextTranslationToSlip.getY() * (2.0 * Math.PI * translationFreqHz[1] * Math.sin(translationPhase.getY()) * deltaT));
nextTranslationToSlip.setZ(nextTranslationToSlip.getZ() * (2.0 * Math.PI * translationFreqHz[2] * Math.sin(translationPhase.getZ()) * deltaT));
nextRotationToSlipEulerAngles.setX(nextRotationToSlipEulerAngles.getX() * (2.0 * Math.PI * rotationFreqHzYawPitchRoll[2] * Math.sin(rotationPhaseEuler.getX()) * deltaT));
nextRotationToSlipEulerAngles.setY(nextRotationToSlipEulerAngles.getY() * (2.0 * Math.PI * rotationFreqHzYawPitchRoll[1] * Math.sin(rotationPhaseEuler.getY()) * deltaT));
nextRotationToSlipEulerAngles.setZ(nextRotationToSlipEulerAngles.getZ() * (2.0 * Math.PI * rotationFreqHzYawPitchRoll[0] * Math.sin(rotationPhaseEuler.getZ()) * deltaT));

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

translationPhase.setZ(translationPhase.getZ() + 2.0  * Math.PI * translationFreqHz[2] * deltaT);
rotationPhaseEuler.setZ(rotationPhaseEuler.getZ() + 2.0  * Math.PI * rotationFreqHzYawPitchRoll[0] * deltaT);
nextTranslationToSlip.setX(nextTranslationToSlip.getX() * (2.0 * Math.PI * translationFreqHz[0] * Math.sin(translationPhase.getX()) * deltaT));
nextTranslationToSlip.setY(nextTranslationToSlip.getY() * (2.0 * Math.PI * translationFreqHz[1] * Math.sin(translationPhase.getY()) * deltaT));
nextTranslationToSlip.setZ(nextTranslationToSlip.getZ() * (2.0 * Math.PI * translationFreqHz[2] * Math.sin(translationPhase.getZ()) * deltaT));
nextRotationToSlipEulerAngles.setX(nextRotationToSlipEulerAngles.getX() * (2.0 * Math.PI * rotationFreqHzYawPitchRoll[2] * Math.sin(rotationPhaseEuler.getX()) * deltaT));
nextRotationToSlipEulerAngles.setY(nextRotationToSlipEulerAngles.getY() * (2.0 * Math.PI * rotationFreqHzYawPitchRoll[1] * Math.sin(rotationPhaseEuler.getY()) * deltaT));
nextRotationToSlipEulerAngles.setZ(nextRotationToSlipEulerAngles.getZ() * (2.0 * Math.PI * rotationFreqHzYawPitchRoll[0] * Math.sin(rotationPhaseEuler.getZ()) * deltaT));

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

public void set(YoFramePoint base, YoFrameVector vector)
{
 this.baseX.set(base.getX());
 this.baseY.set(base.getY());
 this.baseZ.set(base.getZ());
 this.x.set(vector.getX());
 this.y.set(vector.getY());
 this.z.set(vector.getZ());
}

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

momentumRateCommand.setWeights(angularMomentumRateWeight.getX(), angularMomentumRateWeight.getY(), angularMomentumRateWeight.getZ(),
   linearMomentumRateWeight.getX(), linearMomentumRateWeight.getY(), linearMomentumRateWeight.getZ());

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

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);
 }
 positionErrorCumulated.getFrameTuple(integralTerm);
 integralGainMatrix.transform(integralTerm.getVector());
}

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

private void computeIntegralTerm(ReferenceFrame baseFrame)
{
 if (gains.getMaximumIntegralError() < 1e-5)
 {
   integralTerm.setToZero(baseFrame);
   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);
 }
 positionErrorCumulated.getFrameTupleIncludingFrame(integralTerm);
 integralTerm.changeFrame(baseFrame);
 integralGainMatrix.transform(integralTerm.getVector());
}

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

public boolean hasFootHitGround()
{
 isForceMagnitudePastThreshold.set(isForceMagnitudePastThreshold());
 filteredIsForceMagnitudePastThreshold.update();
 isForceMagnitudePastSecondThreshold.set(yoFootForceInFoot.getZ() > secondContactThresholdForce.getDoubleValue());
 isCoPPastThreshold.set(isCoPPastThreshold());
 hasFootHitGround.set(
    (filteredIsForceMagnitudePastThreshold.getBooleanValue() && isCoPPastThreshold.getBooleanValue()) ||
       isForceMagnitudePastSecondThreshold.getBooleanValue());
 //      hasFootHitGround.set(isForceMagnitudePastThreshold.getBooleanValue());
 filteredHasFootHitGround.update();
 if (trustFootSwitch.getBooleanValue())
   return filteredHasFootHitGround.getBooleanValue();
 else
   return controllerDetectedTouchdown.getBooleanValue();
}

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

@Override
public void initialize()
{
 currentTime.set(0.0);
 double tIntermediate = trajectoryTime.getDoubleValue() / 2.0;
 xPolynomial.setQuadraticWithFinalVelocityConstraint(0.0,trajectoryTime.getDoubleValue(), initialPosition.getX(), finalPosition.getX(), finalVelocity.getX());
 yPolynomial.setQuadraticWithFinalVelocityConstraint(0.0,trajectoryTime.getDoubleValue(), initialPosition.getY(), finalPosition.getY(), finalVelocity.getY());
 zPolynomial.setCubicWithIntermediatePositionAndFinalVelocityConstraint(0.0,  tIntermediate, trajectoryTime.getDoubleValue(), initialPosition.getZ(), intermediateZPosition.getDoubleValue(), finalPosition.getZ(), finalVelocity.getZ());
 currentPosition.set(initialPosition);
 currentAcceleration.setToZero();
}

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

linearMomentumRateWeight.set(defaultLinearMomentumRateWeight);
momentumRateCommand.setWeights(0.0, 0.0, 0.0, linearMomentumRateWeight.getX(), linearMomentumRateWeight.getY(), linearMomentumRateWeight.getZ());

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

measuredTorqueAtControlFrame.set(measuredTorque.getVector());
errorForce.setIncludingFrame(controlFrame, desiredForce.getX(), desiredForce.getY(), desiredForce.getZ());
errorForce.sub(measuredForce);
errorTorque.setIncludingFrame(controlFrame, desiredTorque.getX(), desiredTorque.getY(), desiredTorque.getZ());
errorTorque.sub(measuredTorque);

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