gpt4 book ai didi

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

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

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

YoVariableRegistry.getVariable介绍

暂无

代码示例

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

@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 = (DoubleYoVariable) registry.getVariable("LookAheadCoMHeightTrajectoryGenerator.desiredCoMHeight");
}

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

@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 = (DoubleYoVariable) registry.getVariable("LookAheadCoMHeightTrajectoryGenerator.desiredCoMHeight");
}

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

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/IHMCRobotDataLogger

private YoVariable<?> findVariableInRegistries(String variableName)
{
 YoVariable<?> ret = mainRegistry.getVariable(variableName);
 if(ret == null)
 {
   for(ImmutablePair<YoVariableRegistry, YoGraphicsListRegistry> v : variableData)
   {
    ret = v.getLeft().getVariable(variableName);
    if(ret != null)
    {
      return ret;
    }
   }
 }
 return ret;
}

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

public YoVariable<?> getVariable(String name)
{
 String matchedName = matchNameSpace(name);
 if (matchedName != null)
 {
   matchedName = matchedName.toLowerCase();
   YoVariable<?> variable = controlVarsHashMap.get(matchedName);
   if (variable != null)
    return variable;
 }
 for (YoVariableRegistry child : children)
 {
   YoVariable<?> variable = child.getVariable(name);
   if (variable != null)
    return variable;
 }
 return null;
}

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

public synchronized ArrayList<YoVariable<?>> getMatchingVariables(String[] names, String[] regularExpressions)
{
 ArrayList<YoVariable<?>> ret = new ArrayList<YoVariable<?>>();
 if (names != null)
 {
   for (int i = 0; i < names.length; i++)
   {
    if (names[i] != null)
    {
      String name = names[i];
      YoVariable<?> var = getVariable(name);
      if (var != null)
      {
       ret.add(var);
      }
    }
   }
 }
 recursivelyGetMatchingVariables(ret, regularExpressions);
 return ret;
}

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

public SingleAngleIMUKalmanFilter(YoVariableRegistry reg, YoVariableRegistry holder)
  {
//    K1 = new YoVariable("K1", reg);
   if (reg != null)
   {
     R_angle = (DoubleYoVariable)holder.getVariable("R_angle");
     Q_angle = (DoubleYoVariable)holder.getVariable("Q_angle");
     Q_gyro = (DoubleYoVariable)holder.getVariable("Q_gyro");

     if (R_angle == null)
     {
      R_angle = new DoubleYoVariable("R_angle", reg);
      Q_angle = new DoubleYoVariable("Q_angle", reg);
      Q_gyro = new DoubleYoVariable("Q_gyro", reg);
     }

     R_angle.set(R_angle_default);
     Q_angle.set(Q_angle_default);
     Q_gyro.set(Q_gyro_default);
   }

  }

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

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

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

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

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

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

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

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

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

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

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

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

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

final YoVariable<?> var = registry.getVariable(yoVariableName);
final JButton button = new JButton(yoVariableName);
final double newValue = buttons.get(yoVariableName);

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

final YoVariable<?> var = registry.getVariable(yoVariableName);
final JButton button = new JButton(yoVariableName);
final double newValue = buttons.get(yoVariableName);

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

sliderBoardConfigurationManager.setButton(1, registry.getVariable("PelvisICPBasedTranslationManager", "manualModeICPOffset"));
sliderBoardConfigurationManager.setSlider(1, "desiredICPOffsetX", registry, -0.3, 0.3);
sliderBoardConfigurationManager.setKnob(1, "desiredICPOffsetY", registry, -0.3, 0.3);
sliderBoardConfigurationManager.setButton(1, registry.getVariable("PelvisICPBasedTranslationManager", "manualModeICPOffset"));
sliderBoardConfigurationManager.setSlider(1, "desiredICPOffsetX", registry, -0.6, 0.6);
sliderBoardConfigurationManager.setKnob(1, "desiredICPOffsetY", registry, -0.6, 0.6);
sliderBoardConfigurationManager.setSlider(8, "offsetHeightAboveGround", registry, -0.20, 0.20);
sliderBoardConfigurationManager.setButton(1, registry.getVariable("MomentumBasedController", "FeetCoPControlIsActive"));

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

sliderBoardConfigurationManager.setButton(1, registry.getVariable("PelvisICPBasedTranslationManager", "manualModeICPOffset"));
sliderBoardConfigurationManager.setSlider(1, "desiredICPOffsetX", registry, -0.3, 0.3);
sliderBoardConfigurationManager.setKnob(1, "desiredICPOffsetY", registry, -0.3, 0.3);
sliderBoardConfigurationManager.setButton(1, registry.getVariable("PelvisICPBasedTranslationManager", "manualModeICPOffset"));
sliderBoardConfigurationManager.setSlider(1, "desiredICPOffsetX", registry, -0.6, 0.6);
sliderBoardConfigurationManager.setKnob(1, "desiredICPOffsetY", registry, -0.6, 0.6);
sliderBoardConfigurationManager.setSlider(8, "offsetHeightAboveGround", registry, -0.20, 0.20);
sliderBoardConfigurationManager.setButton(1, registry.getVariable("MomentumBasedController", "FeetCoPControlIsActive"));

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