gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-16 12:03:31 41 4
gpt4 key购买 nike

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

YoVariableHolder.getVariable介绍

[英]Gets a YoVariable with the given name if it is in this YoVariableHolder, otherwise returns null. If name contains a ".", then the YoVariable's nameSpace ending must match that of name. If there is more than one YoVariable that matches, then throws a RuntimeException.
[中]获取具有给定名称的YoVariableHolder,否则返回null。如果名称包含“.”,然后变量的名称空间结尾必须与name的名称空间结尾匹配。如果有多个变量匹配,则抛出RuntimeException。

代码示例

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

public StandPrepVariables(StepprStandPrepSetpoints setpoint, YoVariableHolder variableHolder)
{
  String prefix = setpoint.getName();
  tau_d = (YoDouble) variableHolder.getVariable("StepprStandPrep", prefix + "_tau_d");
  damping = (YoDouble) variableHolder.getVariable("StepprStandPrep", prefix + "_damping");
}

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

public StandPrepVariables(StepprStandPrepSetpoints setpoint, YoVariableHolder variableHolder)
{
  String prefix = setpoint.getName();
  String ajoint = setpoint.getJoints()[0].getSdfName();
  q_d = (YoDouble) variableHolder.getVariable("StepprStandPrep", prefix + "_q_d");
  kp = (YoDouble) variableHolder.getVariable("StepprStandPrep", prefix + "_kp");
  kd = (YoDouble) variableHolder.getVariable("StepprStandPrep", prefix + "_kd");
  damping = (YoDouble) variableHolder.getVariable("StepprStandPrep", prefix + "_damping");
  positionerror = (YoDouble) variableHolder.getVariable("StepprStandPrep", "positionError_" + ajoint);
}

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

public StandPrepVariables(WandererStandPrepSetpoints setpoint, YoVariableHolder variableHolder)
{
  String prefix = setpoint.getName();
  String ajoint = setpoint.getJoints()[0].getSdfName();
  q_d = (YoDouble) variableHolder.getVariable("WandererStandPrep", prefix + "_q_d");
  kp = (YoDouble) variableHolder.getVariable("WandererStandPrep", prefix + "_kp");
  kd = (YoDouble) variableHolder.getVariable("WandererStandPrep", prefix + "_kd");
  damping = (YoDouble) variableHolder.getVariable("WandererStandPrep", prefix + "_damping");
  positionerror = (YoDouble) variableHolder.getVariable("WandererStandPrep", "positionError_" + ajoint);
}

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

public void setButton(int channel, String varName, String buttonName, YoVariableHolder holder)
{
 setButton(channel, holder.getVariable(varName), buttonName);
}

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

public void setKnobButton(int channel, String varName, String buttonName, YoVariableHolder holder)
{
 setKnobButton(channel, holder.getVariable(varName), buttonName);
}

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

public void setButton(int channel, String name, YoVariableHolder holder)
{
 setButton(channel, holder.getVariable(name));
}

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

public void setSliderEnum(int channel, String name, YoVariableHolder holder)
{
 setSliderEnum(channel, (YoEnum<?>) holder.getVariable(name));
}

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

public void setSliderBoolean(int channel, String name, YoVariableHolder holder)
{
 setSliderBoolean(channel, holder.getVariable(name));
}

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

public void setKnobButton(int channel, String name, YoVariableHolder holder)
{
 setKnobButton(channel, holder.getVariable(name));
}

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

public void setSliderBoolean(int channel, String varName, String sliderName, YoVariableHolder holder)
{
 setSliderBoolean(channel, holder.getVariable(varName), sliderName);
}

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

public void mapBooleanVariableToComponent(YoVariableHolder holder, SaitekX52Mapping mapping, String variableName, boolean toggle, boolean invert)
{
 YoBoolean yoVariable = (YoBoolean) holder.getVariable(variableName);
 if (yoVariable != null)
 {
   mapBooleanVariableToComponent(mapping, yoVariable, toggle, invert);
 }
 else
 {
   PrintTools.warn(this, "Variable " + variableName + " could not be found!");
 }
}

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

public void mapDoubleVariableToComponent(YoVariableHolder holder, SaitekX52Mapping mapping, String variableName, double minValue, double maxValue, double deadZone, boolean invert)
{
 YoDouble yoVariable = (YoDouble) holder.getVariable(variableName);
 if (yoVariable != null)
 {
   mapDoubleVariableToComponent(mapping, yoVariable, minValue, maxValue, deadZone, invert);
 }
 else
 {
   PrintTools.warn(this, "Variable " + variableName + " could not be found!");
 }
}

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

public void setSlider(int channel, String varName, String sliderName, YoVariableHolder holder, double min, double max, double exponent)
{
 if (!holder.hasUniqueVariable(varName))
 {
   PrintTools.warn("Trying to add yovariable to slider, but it does not exist, or more than 1 exists: " + varName);
 }
 YoVariable<?> variable = holder.getVariable(varName);
 if (variable == null)
 {
   PrintTools.error("Ahhhhhhhhh, yoVariable name " + varName + " was not found in the registry. It's not getting added to the sliderboard");
   return;
 }
 setSlider(channel, holder.getVariable(varName), sliderName, min, max, exponent);
}

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

public void setKnob(int channel, String varName, String knobName, YoVariableHolder holder, double min, double max, double exponent, double hires)
{
 if (!holder.hasUniqueVariable(varName))
 {
   PrintTools.warn("Trying to add yovariable to knob, but it does not exist, or more than 1 exists: " + varName);
 }
 setKnob(channel, holder.getVariable(varName), knobName, min, max, exponent, hires);
}

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

public void setKnob(int channel, String name, YoVariableHolder holder, double min, double max, double exponent, double hires)
{
 if (!holder.hasUniqueVariable(name))
 {
   PrintTools.warn("Trying to add yovariable to knob, but it does not exist, or more than 1 exists: " + name);
 }
 setKnob(channel, holder.getVariable(name), min, max, exponent, hires);
}

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

public void setSlider(int channel, String name, YoVariableHolder holder, double min, double max, double exponent, double hires)
{
 if (!holder.hasUniqueVariable(name))
 {
   PrintTools.warn("Trying to add yovariable to slider, but it does not exist, or more than 1 exists: " + name);
 }
 setSlider(channel, holder.getVariable(name), min, max, exponent, hires);
}

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

public void setSlider(int channel, String varName, String sliderName, YoVariableHolder holder, double min, double max, double exponent, double hires)
{
 if (!holder.hasUniqueVariable(varName))
 {
   PrintTools.warn("Trying to add yovariable to slider, but it does not exist, or more than 1 exists: " + varName);
 }
 setSlider(channel, holder.getVariable(varName), sliderName, min, max, exponent, hires);
}

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

public void setKnob(int channel, String name, YoVariableHolder holder, double min, double max, double exponent)
{
 if (!holder.hasUniqueVariable(name))
 {
   PrintTools.warn("Trying to add yovariable to knob, but it does not exist, or more than 1 exists: " + name);
 }
 setKnob(channel, holder.getVariable(name), min, max, exponent);
}

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

public void setKnob(int channel, String varName, String knobName, YoVariableHolder holder, double min, double max, double exponent)
{
 if (!holder.hasUniqueVariable(varName))
 {
   PrintTools.warn("Trying to add yovariable to knob, but it does not exist, or more than 1 exists: " + varName);
 }
 setKnob(channel, holder.getVariable(varName), knobName, min, max, exponent);
}

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

public DRCRobotSteeringWheelJoystickController(YoVariableHolder holder) throws IOException
  {
   joystick = new Joystick();
   joystick.setPollInterval(pollIntervalMillis);

   YoDouble desiredSteeringWheelAngle = (YoDouble) holder.getVariable("desiredSteeringWheelAngle");
   joystick.addJoystickEventListener(new DoubleYoVariableJoystickEventListener(desiredSteeringWheelAngle, joystick.findComponent(Component.Identifier.Axis.X), -maxSteeringAngle, maxSteeringAngle,
       deadZone, false));
  }
}

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