gpt4 book ai didi

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

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

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

Wrench.<init>介绍

[英]Default constructor. Sets reference frames to null and angular and linear parts to zero.
[中]默认构造函数。将参考帧设置为空,将角度部分和线性部分设置为零。

代码示例

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

private Wrench createEmptyWrench()
{
 return new Wrench(bodyFrame, expressedInFrame);
}

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

public static void addExternalWrenches(Map<RigidBody, Wrench> externalWrenches, Map<RigidBody, Wrench> wrenchMapToAdd)
{
 for (RigidBody rigidBody : wrenchMapToAdd.keySet())
 {
   Wrench externalWrenchToCompensateFor = wrenchMapToAdd.get(rigidBody);
   Wrench externalWrench = externalWrenches.get(rigidBody);
   if (externalWrench == null)
   {
    externalWrenches.put(rigidBody, new Wrench(externalWrenchToCompensateFor));
   }
   else
   {
    externalWrench.add(externalWrenchToCompensateFor);
   }
 }
}

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

public Wrench computeTotalExternalWrench(ReferenceFrame referenceFrame)
{
 Wrench totalGroundReactionWrench = new Wrench(referenceFrame, referenceFrame);
 Wrench temporaryWrench = new Wrench();
 for (int i = 0; i < listOfBodiesWithExternalWrenches.size(); i++)
 {
   Wrench externalWrench = externalWrenches.get(listOfBodiesWithExternalWrenches.get(i));
   temporaryWrench.set(externalWrench);
   temporaryWrench.changeFrame(referenceFrame);
   temporaryWrench.changeBodyFrameAttachedToSameBody(referenceFrame);
   totalGroundReactionWrench.add(temporaryWrench);
 }
 return totalGroundReactionWrench;
}

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

@Override
public void setSuccessor(RigidBody successor)
{
 this.successor = successor;
 setMotionSubspace();
 ReferenceFrame successorFrame = successor.getBodyFixedFrame();
 this.successorWrench = new Wrench(successorFrame, successorFrame);
}

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

@Override
public void setSuccessor(RigidBody successor)
{
 this.successor = successor;
 setMotionSubspace();
 ReferenceFrame successorFrame = successor.getBodyFixedFrame();
 this.successorWrench = new Wrench(successorFrame, successorFrame);
}

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

netWrenches.put(currentBody, new Wrench(bodyFixedFrame, bodyFixedFrame));
if (externalWrenches.get(currentBody) == null)
  externalWrenches.put(currentBody, new Wrench(bodyFixedFrame, bodyFixedFrame));
     jointWrenches.put(joint, new Wrench());
     morgue.add(successor);

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

public void setExternalWrenchToCompensateFor(RigidBody rigidBody, Wrench wrench)
{
 boolean containsRigidBody = externalWrenchesToCompensateFor.get(rigidBody) != null;
 if (!containsRigidBody)
 {
   externalWrenches.put(rigidBody, new Wrench(rigidBody.getBodyFixedFrame(), rigidBody.getBodyFixedFrame()));
   externalWrenchesToCompensateFor.put(rigidBody, new Wrench(rigidBody.getBodyFixedFrame(), rigidBody.getBodyFixedFrame()));
   externalWrenchesToCompensateForList.add(externalWrenchesToCompensateFor.get(rigidBody));
   rigidBodiesWithWrenchToCompensateFor.add(rigidBody);
 }
 ReferenceFrame bodyFixedFrame = rigidBody.getBodyFixedFrame();
 wrench.getBodyFrame().checkReferenceFrameMatch(bodyFixedFrame);
 wrench.getExpressedInFrame().checkReferenceFrameMatch(bodyFixedFrame);
 externalWrenchesToCompensateFor.get(rigidBody).set(wrench);
}

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

footForcesZInPercentOfTotalForce.put(foot, footForceZInPercentOfTotalForce);
footWrenches.put(foot, new Wrench());

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

public ExternalWrenchHandler(double gravityZ, ReferenceFrame centerOfMassFrame, InverseDynamicsJoint rootJoint,
   List<? extends ContactablePlaneBody> contactablePlaneBodies)
{
 this.centerOfMassFrame = centerOfMassFrame;
 MathTools.checkIfInRange(gravityZ, 0.0, Double.POSITIVE_INFINITY);
 this.contactablePlaneBodies = new ArrayList<>(contactablePlaneBodies);
 gravitationalWrench = new SpatialForceVector(centerOfMassFrame);
 double totalMass = TotalMassCalculator.computeMass(ScrewTools.computeSupportAndSubtreeSuccessors(rootJoint.getSuccessor()));
 gravitationalWrench.setLinearPartZ(-gravityZ * totalMass);
 totalWrenchAlreadyApplied = new SpatialForceVector(centerOfMassFrame);
 for (int i = 0; i < contactablePlaneBodies.size(); i++)
 {
   RigidBody rigidBody = this.contactablePlaneBodies.get(i).getRigidBody();
   externalWrenches.put(rigidBody, new Wrench(rigidBody.getBodyFixedFrame(), rigidBody.getBodyFixedFrame()));
 }
}

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

public DifferentialIDMassMatrixCalculator(ReferenceFrame inertialFrame, RigidBody rootBody)
{
 twistCalculator = new TwistCalculator(inertialFrame, rootBody);
 LinkedHashMap<RigidBody, Wrench> zeroExternalWrench = new LinkedHashMap<RigidBody, Wrench>();
 ArrayList<InverseDynamicsJoint> zeroJointToIgnore = new ArrayList<InverseDynamicsJoint>();
 SpatialAccelerationVector zeroRootAcceleration = ScrewTools.createGravitationalSpatialAcceleration(rootBody, 0.0);
 
 idCalculator = new InverseDynamicsCalculator(inertialFrame, zeroRootAcceleration, zeroExternalWrench, zeroJointToIgnore, false, true, twistCalculator);
 jointsInOrder = ScrewTools.computeSubtreeJoints(rootBody);
 totalNumberOfDoFs = ScrewTools.computeDegreesOfFreedom(jointsInOrder);
 massMatrix = new DenseMatrix64F(totalNumberOfDoFs, totalNumberOfDoFs);
 
 storedJointDesiredAccelerations = new DenseMatrix64F(totalNumberOfDoFs, 1);
 storedJointVelocities = new DenseMatrix64F(totalNumberOfDoFs, 1);
 tmpDesiredJointAccelerationsMatrix = new DenseMatrix64F(totalNumberOfDoFs, 1);
 tmpTauMatrix = new DenseMatrix64F(totalNumberOfDoFs, 1);
 
 for (InverseDynamicsJoint joint : jointsInOrder)
 {
   ReferenceFrame bodyFixedFrame = joint.getSuccessor().getBodyFixedFrame();
   Wrench jointWrench = new Wrench(bodyFixedFrame, bodyFixedFrame);
   storedJointWrenches.put(joint, jointWrench);
 }
}

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

Wrench wrench = new Wrench(bodyFixedFrame, bodyFixedFrame);
wrenchesFromRho.put(rigidBody, wrench);

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

wrench = new Wrench(centerOfMassFrame, centerOfMassFrame, momentumObjective);
else
  wrench = new Wrench(centerOfMassFrame, centerOfMassFrame, new DenseMatrix64F(Wrench.SIZE, 1));

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

wristSensorWrench = new Wrench();
forceSensorData.getWrench(wristSensorWrench);

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

public ForceSensorDistalMassCompensator(ForceSensorDefinition forceSensorDefinition, double dtForLowpassFilter, YoVariableRegistry registry)
{
 String sensorName = forceSensorDefinition.getSensorName();
 InverseDynamicsJoint parentJointOfSensorBody = forceSensorDefinition.getRigidBody().getParentJoint();
 sensorFrame = forceSensorDefinition.getSensorFrame();
 sensorPose = new FramePose(world);
 yoSensorPositionInWorld = new YoFramePoint(sensorName + "Position", world, registry);
 distalMassCalc = new CenterOfMassCalculator(ScrewTools.computeRigidBodiesAfterThisJoint(parentJointOfSensorBody), world);
 distalMass = new DoubleYoVariable(sensorName + "DistalMass", registry);
 lowPassSensorForceZ = new AlphaFilteredYoVariable(sensorName + "LowPassFz", registry, AlphaFilteredYoVariable.computeAlphaGivenBreakFrequencyProperly(0.0001, dtForLowpassFilter));
 distalMassForceInWorld = new YoFrameVector(sensorName + "DistalWeight", world, registry);
 distalCoMInWorld = new YoFramePoint(sensorName + "DistalCoM", world, registry);
 yoSensorToDistalCoMvectorInWorld = new YoFrameVector(sensorName + "ToDistalCoM", world, registry);
 distalMassWrench = new Wrench(sensorFrame, world);
 // Put sensor values in world frame since it's easy to interpret from looking at GUI
 yoSensorForce = new YoFrameVector(sensorName + "Force", world, registry);
 yoSensorTorque = new YoFrameVector(sensorName + "Torque", world, registry);
 yoSensorForceFromDistalMass = new YoFrameVector(sensorName + "ForceDueToDistalMass", world, registry);
 yoSensorTorqueFromDistalMass = new YoFrameVector(sensorName + "TorqueDueToDistalMass", world, registry);
 yoSensorForceMassCompensated = new YoFrameVector(sensorName + "ForceMassCompensated", world, registry);
 yoSensorTorqueMassCompensated = new YoFrameVector(sensorName + "TorqueMassCompensated", world, registry);
 
 addSimulatedSensorNoise = new BooleanYoVariable(sensorName + "AddSimulatedNoise", registry);
 addSimulatedSensorNoise.set(false);
}

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

wrenches.put(measurementLink, new Wrench());

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

if (hand != null)
 handWrenches.put(robotSide, new Wrench());

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

this.footSwitchCoPThresholdFraction.set(footSwitchCoPThresholdFraction);
this.footWrench = new Wrench(forceSensorData.getMeasurementFrame(), null);

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

Wrench footWrench = new Wrench();
ForceSensorDataReadOnly forceSensorData = ankleForceSensors.get(robotSide);
ReferenceFrame measurementFrame = forceSensorData.getMeasurementFrame();

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