gpt4 book ai didi

us.ihmc.robotics.screwTheory.Wrench.getLinearPartIncludingFrame()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 04:53:05 27 4
gpt4 key购买 nike

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

Wrench.getLinearPartIncludingFrame介绍

暂无

代码示例

代码示例来源: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/CommonWalkingControlModules

public void compute(Map<RigidBody, Wrench> externalWrenches)
{
 for (int i = 0; i < contactablePlaneBodies.size(); i++)
 {
   ContactablePlaneBody contactablePlaneBody = contactablePlaneBodies.get(i);
   FramePoint2d cop = cops.get(contactablePlaneBody);
   YoFramePoint2d yoCop = yoCops.get(contactablePlaneBody);
   yoCop.getFrameTuple2d(cop);
   Wrench wrench = externalWrenches.get(contactablePlaneBody.getRigidBody());
   if (wrench != null)
   {
    wrench.getLinearPartIncludingFrame(tempForce);
    double normalTorque = centerOfPressureResolver.resolveCenterOfPressureAndNormalTorque(cop, wrench, contactablePlaneBody.getSoleFrame());
    centersOfPressure2d.get(contactablePlaneBody).set(cop);
    tempCoP3d.setXYIncludingFrame(cop);
    centersOfPressureWorld.get(contactablePlaneBody).setAndMatchFrame(tempCoP3d);
    groundReactionForceMagnitudes.get(contactablePlaneBody).set(tempForce.length());
    normalTorques.get(contactablePlaneBody).set(normalTorque);
   }
   else
   {
    groundReactionForceMagnitudes.get(contactablePlaneBody).set(0.0);
    centersOfPressureWorld.get(contactablePlaneBody).setToNaN();
    cop.setToNaN();
   }
   yoCop.set(cop);
   desiredCenterOfPressureDataHolder.setCenterOfPressure(cop, contactablePlaneBody.getRigidBody());
 }
}

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

tempWrench.getLinearPartIncludingFrame(tempForce); 
tempWrench.getAngularPartIncludingFrame(tempTorque); 
inputForces.get(forceSensorDefinition).set(tempForce);

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

private void updateWristMeasuredWrench(FrameVector measuredForceToPack, FrameVector measuredTorqueToPack)
{
 momentumBasedController.getWristMeasuredWrenchHandWeightCancelled(measuredWrench, robotSide);
 measuredWrench.getLinearPartIncludingFrame(tempForceVector);
 measuredWrench.getAngularPartIncludingFrame(tempTorqueVector);
 deadzoneMeasuredForce.update(tempForceVector);
 deadzoneMeasuredTorque.update(tempTorqueVector);
 filteredMeasuredForce.update();
 filteredMeasuredTorque.update();
 filteredMeasuredForce.getFrameTupleIncludingFrame(tempForceVector);
 filteredMeasuredTorque.getFrameTupleIncludingFrame(tempTorqueVector);
 measuredWrench.setLinearPart(tempForceVector);
 measuredWrench.setAngularPart(tempTorqueVector);
 measuredWrench.changeFrame(controlFrame);
 measuredWrench.getLinearPartIncludingFrame(measuredForceToPack);
 measuredWrench.getAngularPartIncludingFrame(measuredTorqueToPack);
}

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

private void readWristSensorData()
{
 if (wristForceSensors == null)
   return;
 for (RobotSide robotSide : RobotSide.values)
 {
   ForceSensorDataReadOnly wristForceSensor = wristForceSensors.get(robotSide);
   ReferenceFrame measurementFrame = wristForceSensor.getMeasurementFrame();
   wristForceSensor.getWrench(wristTempWrench);
   wristTempWrench.getLinearPartIncludingFrame(tempWristForce);
   wristTempWrench.getAngularPartIncludingFrame(tempWristTorque);
   wristRawMeasuredForces.get(robotSide).setAndMatchFrame(tempWristForce);
   wristRawMeasuredTorques.get(robotSide).setAndMatchFrame(tempWristTorque);
   cancelHandWeight(robotSide, wristTempWrench, measurementFrame);
   wristTempWrench.getLinearPartIncludingFrame(tempWristForce);
   wristTempWrench.getAngularPartIncludingFrame(tempWristTorque);
   wristForcesHandWeightCancelled.get(robotSide).setAndMatchFrame(tempWristForce);
   wristTorquesHandWeightCancelled.get(robotSide).setAndMatchFrame(tempWristTorque);
 }
}

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

private void calibrateFootForceSensors()
{
 for (RobotSide robotSide : RobotSide.values)
 {
   ForceSensorDataReadOnly footForceSensor = inputForceSensorDataHolder.get(footForceSensorDefinitions.get(robotSide));
   footForceSensor.getWrench(tempWrench);
   tempWrench.getLinearPartIncludingFrame(tempForce);
   tempWrench.getAngularPartIncludingFrame(tempTorque);
   footForceCalibrationOffsets.get(robotSide).setAndMatchFrame(tempForce);
   footTorqueCalibrationOffsets.get(robotSide).setAndMatchFrame(tempTorque);
 }
 calibrateFootForceSensors.set(false);
}

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

private void calibrateWristForceSensors()
{
 for (RobotSide robotSide : RobotSide.values)
 {
   ForceSensorDataReadOnly wristForceSensor = inputForceSensorDataHolder.get(wristForceSensorDefinitions.get(robotSide));
   ReferenceFrame measurementFrame = wristForceSensor.getMeasurementFrame();
   wristForceSensor.getWrench(tempWrench);
   cancelHandWeight(robotSide, tempWrench, measurementFrame);
   tempWrench.getLinearPartIncludingFrame(tempForce);
   tempWrench.getAngularPartIncludingFrame(tempTorque);
   wristForceCalibrationOffsets.get(robotSide).setAndMatchFrame(tempForce);
   wristTorqueCalibrationOffsets.get(robotSide).setAndMatchFrame(tempTorque);
 }
 calibrateWristForceSensors.set(false);
}

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

residualRootJointWrench.getLinearPartIncludingFrame(residualRootJointForce);
yoResidualRootJointForce.setAndMatchFrame(residualRootJointForce);
yoResidualRootJointTorque.setAndMatchFrame(residualRootJointTorque);

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

private DenseMatrix64F computeSingleRhoCoPJacobian(FramePoint basisVectorOrigin, FrameVector basisVector)
{
 wrenchFromRho.getLinearPartIncludingFrame(forceFromRho);
 forceFromRho.changeFrame(planeFrame);
 if (forceFromRho.getZ() > 1.0e-1)
 {
   basisVectorOrigin.changeFrame(planeFrame);
   basisVector.changeFrame(planeFrame);
      unitSpatialForceVector.setIncludingFrame(basisVector, basisVectorOrigin);
      singleRhoCoPJacobian.set(0, 0, -unitSpatialForceVector.getAngularPartY() / forceFromRho.getZ());
   singleRhoCoPJacobian.set(1, 0, unitSpatialForceVector.getAngularPartX() / forceFromRho.getZ());
 }
 else
 {
   singleRhoCoPJacobian.zero();
 }
 return singleRhoCoPJacobian;
}

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

private void updateWristForceSensorState()
{
 if (requestWristForceSensorCalibrationSubscriber != null && requestWristForceSensorCalibrationSubscriber.checkForNewCalibrationRequest())
   calibrateWristForceSensors.set(true);
 if (calibrateWristForceSensors.getBooleanValue())
   calibrateWristForceSensors();
 for (RobotSide robotSide : RobotSide.values)
 {
   ForceSensorDefinition wristForceSensorDefinition = wristForceSensorDefinitions.get(robotSide);
   ForceSensorDataReadOnly wristForceSensor = inputForceSensorDataHolder.get(wristForceSensorDefinition);
   ReferenceFrame measurementFrame = wristForceSensor.getMeasurementFrame();
   RigidBody measurementLink = wristForceSensorDefinition.getRigidBody();
   wristForceSensor.getWrench(tempWrench);
   wristForceCalibrationOffsets.get(robotSide).getFrameTupleIncludingFrame(tempForce);
   wristTorqueCalibrationOffsets.get(robotSide).getFrameTupleIncludingFrame(tempTorque);
   tempWrench.subLinearPart(tempForce);
   tempWrench.subAngularPart(tempTorque);
   outputForceSensorDataHolder.setForceSensorValue(wristForceSensorDefinition, tempWrench);
   tempWrench.getLinearPartIncludingFrame(tempForce);
   tempWrench.getAngularPartIncludingFrame(tempTorque);
   cancelHandWeight(robotSide, tempWrench, measurementFrame);
   tempWrench.getLinearPartIncludingFrame(tempForce);
   tempWrench.getAngularPartIncludingFrame(tempTorque);
   wristForcesSubtreeWeightCancelled.get(robotSide).setAndMatchFrame(tempForce);
   wristTorquesSubtreeWeightCancelled.get(robotSide).setAndMatchFrame(tempTorque);
   if (wrenches != null)
    wrenches.get(measurementLink).set(tempWrench);
   outputForceSensorDataHolderWithGravityCancelled.setForceSensorValue(wristForceSensorDefinition, tempWrench);
 }
}

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

residualRootJointWrench.getLinearPartIncludingFrame(residualRootJointForce);
yoResidualRootJointForce.setAndMatchFrame(residualRootJointForce);
yoResidualRootJointTorque.setAndMatchFrame(residualRootJointTorque);

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

footWrench.getLinearPartIncludingFrame(footForceVector);
footForceVector.changeFrame(ReferenceFrame.getWorldFrame());

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