gpt4 book ai didi

us.ihmc.yoVariables.registry.YoVariableRegistry.getVariable()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 13:46:40 29 4
gpt4 key购买 nike

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

YoVariableRegistry.getVariable介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/ihmc-robot-data-visualizer

@Override
public void setYoVariableRegistry(YoVariableRegistry registry)
{
 // To get the full name of a variable, right click on a variable in the logger and select "Copy Full Name to Clipboard".
 // Remove the "root.loggedMain"
 //
 // You only have to give the last part of the namespace, more might break if we rename parts of the name.
 desiredCoMHeight = (YoDouble) registry.getVariable("LookAheadCoMHeightTrajectoryGenerator.desiredCoMHeight");
}

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

public YoVariableStatusDisplay(String name, YoVariableRegistry parent, String currentStateVariableName)
{
 this(name, parent, (YoBoolean) parent.getVariable(currentStateVariableName));
}

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

public YoVariable<?> getYoVariable(String name)
{
 return registry.getVariable(name);
}

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

public void setChannel(int channel, String name, YoVariableRegistry holder, double min, double max, double exponent)
{
 if ((channel < 1) || (channel > 16))
 {
   System.err.println("Peavey PC1600X: Channel out of range.  Needs to be between 1 and 16");
   return;
 }
 this.holder = holder;
 variables[channel - 1] = holder.getVariable(name);
 names[channel - 1] = name;
 minVals[channel - 1] = min;
 maxVals[channel - 1] = max;
 exponents[channel - 1] = exponent;
}

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

public YoVariable<?> getVariable(String nameSpace, String name)
{
 if (name.contains("."))
   throw new RuntimeException(name + " contains a dot. It must not when calling getVariable(String nameSpace, String name)");
 return getVariable(nameSpace + "." + name);
}

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

private void setPelvisPoseHistoryCorrectorMaxVelocity(YoVariableRegistry registry, double maxTranslationVelocity, double maxRotationVelocity)
{
 YoDouble maxTranslationVelocityCap = (YoDouble) registry.getVariable("PelvisPoseHistoryCorrection", "maxTranslationVelocityClip");
 maxTranslationVelocityCap.set(maxTranslationVelocity);
 YoDouble maxRotationVelocityCap = (YoDouble) registry.getVariable("PelvisPoseHistoryCorrection", "maxRotationVelocityClip");
 maxRotationVelocityCap.set(maxRotationVelocity);
}

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

private void setPelvisPoseHistoryCorrectorAlphaBreakFreq(YoVariableRegistry registry, double translationBreakFrequency,double rotationBreakFrequency)
{
 YoDouble pelvisTranslationCorrectorAlphaFilterBF = (YoDouble) registry.getVariable("PelvisPoseHistoryCorrection",
    "interpolationTranslationAlphaFilterBreakFrequency");
 pelvisTranslationCorrectorAlphaFilterBF.set(translationBreakFrequency);
 
 YoDouble pelvisRotationCorrectorAlphaFilterBF = (YoDouble) registry.getVariable("PelvisPoseHistoryCorrection",
    "interpolationRotationAlphaFilterBreakFrequency");
 pelvisRotationCorrectorAlphaFilterBF.set(rotationBreakFrequency);
}

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

private void activatePelvisPoseHistoryCorrector(YoVariableRegistry registry, boolean activate)
{
 YoBoolean useExternalPelvisCorrector = (YoBoolean) registry.getVariable("DRCKinematicsBasedStateEstimator", "useExternalPelvisCorrector");
 useExternalPelvisCorrector.set(activate);
}

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

private void setPelvisPoseHistoryCorrectorAlphaBreakFreq(YoVariableRegistry registry, double breakFrequencyTranslation, double breakFrequencyRotation)
{
 YoDouble pelvisTranslationCorrectorAlphaFilterBF = (YoDouble) registry.getVariable("PelvisPoseHistoryCorrection",
    "interpolationTranslationAlphaFilterBreakFrequency");
 pelvisTranslationCorrectorAlphaFilterBF.set(breakFrequencyTranslation);
 YoDouble pelvisRotationCorrectorAlphaFilterBF = (YoDouble) registry.getVariable("PelvisPoseHistoryCorrection",
    "interpolationRotationAlphaFilterBreakFrequency");
 pelvisRotationCorrectorAlphaFilterBF.set(breakFrequencyRotation);
}

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

private void setPelvisPoseHistoryCorrectorMaxVelocity(YoVariableRegistry registry, double maxVelocityTranslation, double maxVelocityRotation)
{
 YoDouble maxTranslationVelocityCap = (YoDouble) registry.getVariable("PelvisPoseHistoryCorrection", "maxTranslationVelocityClip");
 maxTranslationVelocityCap.set(maxVelocityTranslation);
 YoDouble maxRotationVelocityCap = (YoDouble) registry.getVariable("PelvisPoseHistoryCorrection", "maxRotationVelocityClip");
 maxRotationVelocityCap.set(maxVelocityRotation);
}

代码示例来源:origin: us.ihmc/ihmc-robot-data-logger

private YoVariable<?> findVariableInRegistries(String variableName)
{
 for (RegistrySendBufferBuilder buffer : registeredBuffers)
 {
   YoVariableRegistry registry = buffer.getYoVariableRegistry();
   YoVariable<?> ret = registry.getVariable(variableName);
   if (ret != null)
   {
    return ret;
   }
 }
 return null;
}

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

private void assertMatrixYoVariablesAreNaN(String name, int maxNumberOfRows, int maxNumberOfColumns, YoVariableRegistry registry)
{
 for (int row = 0; row < maxNumberOfRows; row++)
 {
   for (int column = 0; column < maxNumberOfColumns; column++)
   {
    YoDouble variable = (YoDouble) registry.getVariable(name + "_" + row + "_" + column);
    assertTrue(Double.isNaN(variable.getDoubleValue()));
   }
 }
}

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

@Override
  public YoGraphicPosition duplicate(YoVariableRegistry newRegistry)
  {
   YoDouble x = (YoDouble) newRegistry.getVariable(this.x.getFullNameWithNameSpace());
   YoDouble y = (YoDouble) newRegistry.getVariable(this.y.getFullNameWithNameSpace());
   YoDouble z = (YoDouble) newRegistry.getVariable(this.z.getFullNameWithNameSpace());
   return new YoGraphicPosition(getName(), x, y, z, scale, appearance, type);
  }
}

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

public YoVariableToggler(String name, YoVariableRegistry parent, YoVariableToggleContainer parentContainer, YoBoolean currentStateVariable)
{
 if (currentStateVariable != null)
   this.currentState = currentStateVariable;
 this.parentContainer = parentContainer;
 toggleMode = (YoEnum<ToggleMode>) parent.getVariable(name);
 toggleMode.set(ToggleMode.NO_CHANGE);
 if (currentState != null)
   currentStateValue = currentState.getBooleanValue();
}

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

@Override
 public void notifyOfVariableChange(YoVariable<?> v)
 {
   alphaFilteredHeadYawPercentage.update(headYawPercentage.getDoubleValue());
   NeckJointName headYaw = NeckJointName.DISTAL_NECK_YAW;
   double neckYawJointRange = sliderBoardControlledNeckJointsWithLimits.get(headYaw).getRight()
      - sliderBoardControlledNeckJointsWithLimits.get(headYaw).getLeft();
   YoDouble desiredAngle = (YoDouble) registry.getVariable(drcRobotModel.getJointMap().getNeckJointName(headYaw) + "_unconstrained"
      + CommonNames.q_d);
   desiredAngle.set(alphaFilteredHeadYawPercentage.getDoubleValue() * neckYawJointRange + sliderBoardControlledNeckJointsWithLimits.get(headYaw).getLeft());
 }
});

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

@Override
 public void notifyOfVariableChange(YoVariable<?> v)
 {
   alphaFilteredUpperHeadPitchPercentage.update(upperHeadPitchPercentage.getDoubleValue());
   NeckJointName upperHeadPitch = NeckJointName.DISTAL_NECK_PITCH;
   double jointRange = sliderBoardControlledNeckJointsWithLimits.get(upperHeadPitch).getRight()
      - sliderBoardControlledNeckJointsWithLimits.get(upperHeadPitch).getLeft();
   YoDouble desiredAngle = (YoDouble) registry.getVariable(drcRobotModel.getJointMap().getNeckJointName(upperHeadPitch)
      + "_unconstrained" + CommonNames.q_d);
   desiredAngle.set(alphaFilteredUpperHeadPitchPercentage.getDoubleValue() * jointRange + sliderBoardControlledNeckJointsWithLimits.get(upperHeadPitch).getLeft());
 }
});

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

@Override
 public void notifyOfVariableChange(YoVariable<?> v)
 {
   alphaFilteredLowerHeadPitchYawPercentage.update(lowerHeadPitchPercentage.getDoubleValue());
   NeckJointName lowerHeadPitch = NeckJointName.PROXIMAL_NECK_PITCH;
   double jointRange = sliderBoardControlledNeckJointsWithLimits.get(lowerHeadPitch).getRight()
      - sliderBoardControlledNeckJointsWithLimits.get(lowerHeadPitch).getLeft();
   YoDouble desiredAngle = (YoDouble) registry.getVariable(drcRobotModel.getJointMap().getNeckJointName(lowerHeadPitch)
      + "_unconstrained" + CommonNames.q_d);
   desiredAngle.set(alphaFilteredLowerHeadPitchYawPercentage.getDoubleValue() * jointRange + sliderBoardControlledNeckJointsWithLimits.get(lowerHeadPitch).getLeft());
 }
});

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

@Test// timeout=300000
public void testCompareVarLists()
{
 YoVariableRegistry registry1 = createRegistryAndFillWithVariables();
 YoVariableRegistry registry2 = createRegistryAndFillWithVariables();
 
 ArrayList<String> exceptions = new ArrayList<String>();
 exceptions.add(new String("exceptional"));
 
 ArrayList<VariableDifference> variableDifferences = StateFileComparer.compareVarLists(registry1.createVarList(), registry2.createVarList(), 1e-7, false, exceptions);
 assertEquals(0, variableDifferences.size());
 ((YoDouble) registry1.getVariable("exceptionalVariable")).set(5678.0);
 
 variableDifferences = StateFileComparer.compareVarLists(registry1.createVarList(), registry2.createVarList(), 1e-7, false, exceptions);
 assertEquals(0, variableDifferences.size());
 
 ((YoDouble) registry1.getVariable("variable1")).set(3.5);
 
 variableDifferences = StateFileComparer.compareVarLists(registry1.createVarList(), registry2.createVarList(), 1e-7, false, exceptions);
 assertEquals(1, variableDifferences.size());
}

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

private void createSliderBoard(final SimulationConstructionSet scs, YoVariableRegistry registry)
{
 SliderBoardConfigurationManager sliderBoardConfigurationManager = new SliderBoardConfigurationManager(scs);
 sliderBoardConfigurationManager.setButton(1, registry.getVariable("PelvisICPBasedTranslationManager", "manualModeICPOffset"));
 sliderBoardConfigurationManager.setSlider(1, "desiredICPOffsetX", registry, -0.3, 0.3);
 sliderBoardConfigurationManager.setSlider(2, "desiredICPOffsetY", registry, -0.3, 0.3);
 sliderBoardConfigurationManager.setSlider(8, "offsetHeightAboveGround", registry, 0.0, 0.20);
}

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

@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout = 30000)
public void testYoVariables()
{
 int dimensions = 3;
 YoVariableRegistry registry = new YoVariableRegistry("");
 new TrajectoryPointOptimizer(dimensions, registry);
 YoDouble timeGain = (YoDouble) registry.getVariable("TimeGain");
 assertTrue(timeGain.getDoubleValue() != 0.0);
}

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