gpt4 book ai didi

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

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

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

YoFrameVector3D.<init>介绍

[英]Creates a new YoFrameVector3D.
[中]创建新的YoFrameVector3D。

代码示例

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

public YoVelocityProvider(String name, ReferenceFrame referenceFrame, YoVariableRegistry registry)
{
 this.frameVector = new YoFrameVector3D(name, referenceFrame, registry);
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

private static YoFrameVector3D createDirectionVector(String name, YoVariableRegistry registry)
{
 YoFrameVector3D directionVector = new YoFrameVector3D(name, "Direction", ReferenceFrame.getWorldFrame(), registry);
 return directionVector;
}

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

public YoParabolicTrajectoryGenerator(String namePrefix, ReferenceFrame referenceFrame, YoVariableRegistry parentRegistry)
{
 this.registry = new YoVariableRegistry(namePrefix + nameSuffix);
 this.referenceFrame = referenceFrame;
 c0 = new YoFrameVector3D("c0", "", referenceFrame, registry);
 c1 = new YoFrameVector3D("c1", "", referenceFrame, registry);
 c2 = new YoFrameVector3D("c2", "", referenceFrame, registry);
 tempInitialize = new FrameVector3D(referenceFrame);
 tempPackPosition = new FramePoint3D(referenceFrame);
 parentRegistry.addChild(registry);
}

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

public YoIMUMahonyFilter(String imuName, String namePrefix, String nameSuffix, double updateDT, ReferenceFrame sensorFrame,
            YoVariableRegistry parentRegistry)
{
 this.updateDT = updateDT;
 this.sensorFrame = sensorFrame;
 YoVariableRegistry registry = new YoVariableRegistry(imuName + "MahonyFilter");
 parentRegistry.addChild(registry);
 estimatedOrientation = new YoFrameQuaternion(namePrefix, nameSuffix, sensorFrame, registry);
 estimatedAngularVelocity = new YoFrameVector3D(namePrefix, nameSuffix, sensorFrame, registry);
 yoErrorTerm = new YoFrameVector3D("ErrorTerm", nameSuffix, sensorFrame, registry);
 yoIntegralTerm = new YoFrameVector3D("IntegralTerm", nameSuffix, sensorFrame, registry);
 proportionalGain = new YoDouble("ProportionalGain" + nameSuffix, registry);
 integralGain = new YoDouble("IntegralGain" + nameSuffix, registry);
 hasBeenInitialized = new YoBoolean("HasBeenInitialized" + nameSuffix, registry);
}

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

public EuclideanPositionController(String prefix, ReferenceFrame bodyFrame, double dt, YoPID3DGains gains, YoVariableRegistry parentRegistry)
{
 this.dt = dt;
 this.bodyFrame = bodyFrame;
 registry = new YoVariableRegistry(prefix + getClass().getSimpleName());
 if (gains == null)
   gains = new DefaultYoPID3DGains(prefix, GainCoupling.NONE, true, registry);
 this.gains = gains;
 positionError = new YoFrameVector3D(prefix + "PositionError", bodyFrame, registry);
 positionErrorCumulated = new YoFrameVector3D(prefix + "PositionErrorCumulated", bodyFrame, registry);
 velocityError = new YoFrameVector3D(prefix + "LinearVelocityError", bodyFrame, registry);
 proportionalTerm = new FrameVector3D(bodyFrame);
 derivativeTerm = new FrameVector3D(bodyFrame);
 integralTerm = new FrameVector3D(bodyFrame);
 feedbackLinearAction = new YoFrameVector3D(prefix + "FeedbackLinearAction", bodyFrame, registry);
 rateLimitedFeedbackLinearAction = new RateLimitedYoFrameVector(prefix + "RateLimitedFeedbackLinearAction", "", registry, gains.getYoMaximumFeedbackRate(),
                                 dt, feedbackLinearAction);
 parentRegistry.addChild(registry);
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public YoGraphicCylinder(String name, YoDouble baseX, YoDouble baseY, YoDouble baseZ, YoDouble x, YoDouble y, YoDouble z, AppearanceDefinition appearance,
            double lineThickness)
{
 super(name);
 base = new YoFramePoint3D(baseX, baseY, baseZ, ReferenceFrame.getWorldFrame());
 vector = new YoFrameVector3D(x, y, z, ReferenceFrame.getWorldFrame());
 this.lineThickness = lineThickness;
 this.appearance = appearance;
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public YoGraphicVector(String name, YoDouble baseX, YoDouble baseY, YoDouble baseZ, YoDouble x, YoDouble y, YoDouble z, double scaleFactor,
           AppearanceDefinition appearance, boolean drawArrowhead)
{
 super(name);
 base = new YoFramePoint3D(baseX, baseY, baseZ, ReferenceFrame.getWorldFrame());
 vector = new YoFrameVector3D(x, y, z, ReferenceFrame.getWorldFrame());
 this.drawArrowhead = drawArrowhead;
 this.scaleFactor = scaleFactor;
 this.appearance = appearance;
}

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

public GroundContactPointsSlipper(String registryPrefix)
{
 registry = new YoVariableRegistry(registryPrefix + getClass().getSimpleName());
 groundContactPointsToSlip = new ArrayList<GroundContactPoint>();
 slipAmount = new YoFrameVector3D("slipAmount", ReferenceFrame.getWorldFrame(), registry);
 slipRotation = new YoFrameYawPitchRoll("slipRotation", ReferenceFrame.getWorldFrame(), registry);
 percentToSlipPerTick = new YoDouble("percentToSlipPerTick", registry);
 doSlip = new YoBoolean("doSlip", registry);
}

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

public FilteredVelocityYoFrameVector(String namePrefix, String nameSuffix, DoubleProvider alpha, double dt, YoVariableRegistry registry,
                  ReferenceFrame referenceFrame)
{
 super(namePrefix, nameSuffix, referenceFrame, registry);
 this.alphaProvider = alpha;
 this.dt = dt;
 hasBeenCalled = new YoBoolean(namePrefix + nameSuffix + "HasBeenCalled", registry);
 currentPosition = null;
 lastPosition = new YoFrameVector3D(namePrefix + "_lastPosition", nameSuffix, getReferenceFrame(), registry);
 reset();
}

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

public RandomExternalForceApplier(ForcePerturbable perturbable, double maximalDisturbanceMagnitude, String name)
{
 this.perturbable = perturbable;
 this.name = name;
 this.maximalDisturbanceMagnitude = new YoDouble("maximalDisturbanceMagnitude", registry);
 this.maximalDisturbanceMagnitude.set(maximalDisturbanceMagnitude);
 this.currentDisturbanceForce = new YoFrameVector3D("currentDisturbanceForce", "", ReferenceFrame.getWorldFrame(), registry);
}

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

public AngularMomentumSpy(DRCSimulationTestHelper simulationTestHelper)
{
  YoVariableRegistry scsRegistry = drcSimulationTestHelper.getYoVariableRegistry();
  drcSimulationTestHelper.addRobotControllerOnControllerThread(this);
  floatingRootJointModel = drcSimulationTestHelper.getRobot();
  rootJoint = floatingRootJointModel.getRootJoint();
  comAngularMomentum = new YoFrameVector3D("CoMAngularMomentum", worldFrame, scsRegistry);
  comEstimatedAngularMomentum = new YoFrameVector3D("CoMEstimatedAngularMomentum", worldFrame, scsRegistry);
  scs = drcSimulationTestHelper.getSimulationConstructionSet();
  swTraj = new YoPolynomial3D("SwingFootTraj", 4, scsRegistry);
  comTraj = new YoPolynomial3D("CoMTraj", 4, scsRegistry);
}

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

public FilteredVelocityYoFrameVector(String namePrefix, String nameSuffix, DoubleProvider alpha, double dt, YoVariableRegistry registry,
                  FrameTuple3DReadOnly frameTuple3DToDifferentiate)
{
 super(namePrefix, nameSuffix, frameTuple3DToDifferentiate.getReferenceFrame(), registry);
 this.alphaProvider = alpha;
 this.dt = dt;
 hasBeenCalled = new YoBoolean(namePrefix + nameSuffix + "HasBeenCalled", registry);
 currentPosition = frameTuple3DToDifferentiate;
 lastPosition = new YoFrameVector3D(namePrefix + "_lastPosition", nameSuffix, getReferenceFrame(), registry);
 reset();
}

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

public YoIMUMahonyFilter(String imuName, String nameSuffix, double updateDT, ReferenceFrame sensorFrame, YoFrameQuaternion estimatedOrientation,
            YoFrameVector3D estimatedAngularVelocity, YoVariableRegistry parentRegistry)
{
 this.updateDT = updateDT;
 this.sensorFrame = sensorFrame;
 YoVariableRegistry registry = new YoVariableRegistry(imuName + "MahonyFilter");
 parentRegistry.addChild(registry);
 estimatedOrientation.checkReferenceFrameMatch(sensorFrame);
 if (estimatedAngularVelocity != null)
   estimatedAngularVelocity.checkReferenceFrameMatch(sensorFrame);
 this.estimatedOrientation = estimatedOrientation;
 this.estimatedAngularVelocity = estimatedAngularVelocity;
 yoErrorTerm = new YoFrameVector3D("ErrorTerm", nameSuffix, sensorFrame, registry);
 yoIntegralTerm = new YoFrameVector3D("IntegralTerm", nameSuffix, sensorFrame, registry);
 proportionalGain = new YoDouble("ProportionalGain" + nameSuffix, registry);
 integralGain = new YoDouble("IntegralGain" + nameSuffix, registry);
 hasBeenInitialized = new YoBoolean("HasBeenInitialized" + nameSuffix, registry);
}

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

public ParabolicWithFinalVelocityConstrainedPositionTrajectoryGenerator(String name, ReferenceFrame referenceFrame, YoVariableRegistry parentRegistry)
{
 registry = new YoVariableRegistry(name);
 
 initialPosition = new YoFramePoint3D(name + "InitialPosition", referenceFrame, registry);
 intermediateZPosition = new YoDouble(name + "IntermediateZPosition", registry);
 
 finalPosition = new YoFramePoint3D(name + "FinalPosition", referenceFrame, registry);
 finalVelocity = new YoFrameVector3D(name + "FinalVelocity", referenceFrame, registry);
 currentPosition = new YoFramePoint3D(name + "CurrentPosition", referenceFrame, registry);
 currentVelocity = new YoFrameVector3D(name + "CurrentVelocity", referenceFrame, registry);
 currentAcceleration = new YoFrameVector3D(name + "CurrentAcceleration", referenceFrame, registry);
 currentTime = new YoDouble(name + "CurrentTime", registry);
 trajectoryTime = new YoDouble(name + "TrajectoryTime", registry);
 xPolynomial = new YoPolynomial(name + "PolynomialX", 3, registry);
 yPolynomial = new YoPolynomial(name + "PolynomialY", 3, registry);
 zPolynomial = new YoPolynomial(name + "PolynomialZ", 4, registry);
 parentRegistry.addChild(registry);
}

代码示例来源:origin: us.ihmc/ihmc-humanoid-behaviors

public TaskSpaceStiffnessCalculator(String namePrefix, double controlDT, YoVariableRegistry registry)
{
 alphaLowPass = new YoDouble(namePrefix + "Alpha", registry);
 alphaLowPass.set(AlphaFilteredYoVariable.computeAlphaGivenBreakFrequencyProperly(lowPassCutoffFreq_Hz, controlDT));
 yoForcePointPosition = new YoFramePoint3D(namePrefix + "Position", world, registry);
 yoForcePointForce = new YoFrameVector3D(namePrefix + "Force", world, registry);
 yoForcePointVelocity = FilteredVelocityYoFrameVector.createFilteredVelocityYoFrameVector(namePrefix + "Velocity", "", alphaLowPass, controlDT, registry,
    yoForcePointPosition);
 yoForcePointForceRateOfChange = FilteredVelocityYoFrameVector.createFilteredVelocityYoFrameVector(namePrefix + "ForceRateOfChange", "", alphaLowPass,
    controlDT, registry, yoForcePointForce);
 yoForceAlongDirectionOfMotion = new YoDouble(namePrefix + "ForceAlongDirOfMotion", registry);
 yoForceRateOfChangeAlongDirectionOfMotion = new YoDouble(namePrefix + "DeltaForceAlongDirOfMotion", registry);
    
 yoStiffnessAlongDirectionOfMotion = new YoDouble(namePrefix + "StiffnessAlongDirOfMotion", registry);
 yoMaxStiffness = new YoDouble(namePrefix + "MaxStiffness", registry);
 yoCrossProductOfCurrentVelWithForce = new YoFrameVector3D(namePrefix + "VelocityCrossForce", world, registry);
 yoDirectionOfFreeMotion = new YoFrameVector3D(namePrefix + "DirOfFreeMotion", world, registry);
 addSimulatedSensorNoise = new YoBoolean(namePrefix + "AddSimulatedNoise", registry);
 addSimulatedSensorNoise.set(false);
}

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

public YoFrameVector3D findYoFrameVector(String vectorPrefix, String vectorSuffix, ReferenceFrame vectorFrame)
{
 YoDouble x = (YoDouble) scs.getVariable(createXName(vectorPrefix, vectorSuffix));
 YoDouble y = (YoDouble) scs.getVariable(createYName(vectorPrefix, vectorSuffix));
 YoDouble z = (YoDouble) scs.getVariable(createZName(vectorPrefix, vectorSuffix));
 if (x == null || y == null || z == null)
   return null;
 else
   return new YoFrameVector3D(x, y, z, vectorFrame);
}

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

public PushRobotTestConductor(SimulationConstructionSet scs, String jointName)
{
 this.jointName = jointName;
 
 pushDuration = (YoDouble) scs.getVariable(jointName + "_pushDuration");
 pushMagnitude = (YoDouble) scs.getVariable(jointName + "_pushMagnitude");
 pushTimeSwitch = (YoDouble) scs.getVariable(jointName + "_pushTimeSwitch");
 pushNumber = (YoInteger) scs.getVariable(jointName + "_pushNumber");
 pushDelay = (YoDouble) scs.getVariable(jointName + "_pushDelay");
 yoTime = (YoDouble) scs.getVariable("t");
 
 pushDirection = new YoFrameVector3D((YoDouble) scs.getVariable(jointName + "_pushDirectionX"),
                  (YoDouble) scs.getVariable(jointName + "_pushDirectionY"),
                  (YoDouble) scs.getVariable(jointName + "_pushDirectionZ"), ReferenceFrame.getWorldFrame());
 pushForce = new YoFrameVector3D((YoDouble) scs.getVariable(jointName + "_pushForceX"),
                (YoDouble) scs.getVariable(jointName + "_pushForceY"),
                (YoDouble) scs.getVariable(jointName + "_pushForceZ"), ReferenceFrame.getWorldFrame());
}

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

/**
  * Creates a copy of {@code this} by finding the duplicated {@code YoVariable}s in the given
  * {@link YoVariableRegistry}.
  * <p>
  * This method does not duplicate {@code YoVariable}s. Assuming the given registry is a duplicate
  * of the registry that was used to create {@code this}, this method searches for the duplicated
  * {@code YoVariable}s and use them to duplicate {@code this}.
  * </p>
  *
  * @param newRegistry YoVariableRegistry to duplicate {@code this} to.
  * @return the duplicate of {@code this}.
  */
  public YoFrameVector3D duplicate(YoVariableRegistry newRegistry)
  {
   YoDouble x = (YoDouble) newRegistry.getVariable(getYoX().getFullNameWithNameSpace());
   YoDouble y = (YoDouble) newRegistry.getVariable(getYoY().getFullNameWithNameSpace());
   YoDouble z = (YoDouble) newRegistry.getVariable(getYoZ().getFullNameWithNameSpace());
   return new YoFrameVector3D(x, y, z, getReferenceFrame());
  }
}

代码示例来源:origin: us.ihmc/ihmc-footstep-planning

public static void addGoalViz(FramePose3D goalPose, YoVariableRegistry registry, YoGraphicsListRegistry graphicsListRegistry)
  {
   YoFramePoint3D yoGoal = new YoFramePoint3D("GoalPosition", worldFrame, registry);
   yoGoal.set(goalPose.getPosition());
   graphicsListRegistry.registerYoGraphic("viz", new YoGraphicPosition("GoalViz", yoGoal, 0.05, YoAppearance.Yellow()));
   YoFramePoint3D yoStart = new YoFramePoint3D("StartPosition", worldFrame, registry);
   graphicsListRegistry.registerYoGraphic("viz", new YoGraphicPosition("StartViz", yoStart, 0.05, YoAppearance.Blue()));
   PoseReferenceFrame goalFrame = new PoseReferenceFrame("GoalFrame", goalPose);
   FrameVector3D goalOrientation = new FrameVector3D(goalFrame, 0.5, 0.0, 0.0);
   goalOrientation.changeFrame(worldFrame);
   YoFrameVector3D yoGoalOrientation = new YoFrameVector3D("GoalVector", worldFrame, registry);
   yoGoalOrientation.set(goalOrientation);
//      graphicsListRegistry.registerYoGraphic("vizOrientation", new YoGraphicVector("GoalOrientationViz", yoGoal, yoGoalOrientation, 1.0, YoAppearance.White()));
  }

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

public SlipOnNextStepPerturber(HumanoidFloatingRootJointRobot robot, RobotSide robotSide)
{
 super(robotSide.getCamelCaseNameForStartOfExpression() + "SlipOnEachStepPerturber");
 String sideString = robotSide.getCamelCaseNameForStartOfExpression();
 this.robot = robot;
 this.touchdownTimeForSlip = new YoDouble(sideString + "TouchdownTimeForSlip", registry);
 this.slipAfterTimeDelta = new YoDouble(sideString + "SlipAfterTimeDelta", registry);
 this.slipNextStep = new YoBoolean(sideString + "SlipNextStep", registry);
 amountToSlipNextStep = new YoFrameVector3D(sideString + "AmountToSlipNextStep", ReferenceFrame.getWorldFrame(), registry);
 rotationToSlipNextStep = new YoFrameYawPitchRoll(sideString + "RotationToSlipNextStep", ReferenceFrame.getWorldFrame(), registry);
 slipState = new YoEnum<SlipState>(sideString + "SlipState", registry, SlipState.class);
 slipState.set(SlipState.NOT_SLIPPING);
 groundContactPoints = robot.getFootGroundContactPoints(robotSide);
 
 groundContactPointsSlipper = new GroundContactPointsSlipper(robotSide.getLowerCaseName());
 groundContactPointsSlipper.addGroundContactPoints(groundContactPoints);
 groundContactPointsSlipper.setPercentToSlipPerTick(0.05);
 this.addRobotController(groundContactPointsSlipper);
}

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