- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中us.ihmc.yoVariables.dataBuffer.YoVariableHolder.getVariable()
方法的一些代码示例,展示了YoVariableHolder.getVariable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoVariableHolder.getVariable()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.dataBuffer.YoVariableHolder
类名称: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));
}
}
本文整理了Java中us.ihmc.yoVariables.dataBuffer.YoVariableHolder.getVariable()方法的一些代码示例,展示了YoVariableHolder
我是一名优秀的程序员,十分优秀!