gpt4 book ai didi

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

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

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

YoVariable.setValueFromDouble介绍

[英]Calls #setValueFromDouble(double,boolean) with (value, true).
[中]用(value,true)调用#setValueFromDouble(double,boolean)。

代码示例

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

@Override
  public void actionPerformed(ActionEvent e)
  {
   tareSensorsVar.setValueFromDouble(1.0);
  }
});

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

@Override
  public void actionPerformed(ActionEvent e)
  {
   updateOffsets.setValueFromDouble(1.0);
  }
});

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

protected void setYoVariableValueToDataAtIndex(int index)
{
 double doubleValue = data[index];
 variable.setValueFromDouble(doubleValue);
}

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

/**
* Calls {@link #setValueFromDouble(double, boolean)} with (value, true).
*
* @param value double to set this variable's value to
*/
public final void setValueFromDouble(double value)
{
 setValueFromDouble(value, true);
}

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

@Override
 public void actionPerformed(ActionEvent e)
 {
   var.setValueFromDouble(newValue);
 }
});

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

@Override
  public void notifyOfVariableChange(YoVariable<?> v)
  {
   motorPowerStateRequest.setValueFromDouble(-1);
  }
});

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

@Override
  public void actionPerformed(ActionEvent e)
  {
   tareSensorsVar.setValueFromDouble(1.0);
  }
});

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

private void randomizeVariables(ArrayList<YoVariable<?>> variablesToWrite)
{
 for (YoVariable<?> variable : variablesToWrite)
 {
   variable.setValueFromDouble(Math.random());
 }
}

代码示例来源:origin: us.ihmc/ihmc-whole-body-controller

public void restoreCorruptorVariableValues()
{
 for (int i=0; i<corruptorVariables.size(); i++)
 {
   corruptorVariables.get(i).setValueFromDouble(corruptorVariableValuesToRemember[i]);
 }
}

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

@Override
  public void actionPerformed(ActionEvent e)
  {
   logicPowerStateRequest.setValueFromDouble(-1);
   ThreadTools.sleep(250);
   motorPowerStateRequest.setValueFromDouble(-1);
  }
});

代码示例来源:origin: us.ihmc/ihmc-whole-body-controller

public void setCorruptorVariableValuesToOptimizeToZero()
{
 for (int i = 0; i < corruptorVariablesToOptimize.size(); i++)
 {
   YoVariable<?> variable = corruptorVariablesToOptimize.get(i);
   variable.setValueFromDouble(0.0);
 }
}

代码示例来源:origin: us.ihmc/ihmc-whole-body-controller

private void setCorruptorValues(ArrayList<YoVariable<?>> corruptorVariables, double[] corruptorVariableValues)
{ 
 for (int i = 0; i < corruptorVariables.size(); i++)
 {
   YoVariable<?> variable = corruptorVariables.get(i);
   variable.setValueFromDouble(corruptorVariableValues[i]);
 }
}

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

@Override
  public void actionPerformed(ActionEvent e)
  {
   logicPowerStateRequest.setValueFromDouble(-1);
   ThreadTools.sleep(250);
   motorPowerStateRequest.setValueFromDouble(-1);
  }
});

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

@Override
  public void actionPerformed(ActionEvent e)
  {
   btnPowerOn.setEnabled(false);
   logicPowerStateRequest.setValueFromDouble(1.0);
   ThreadTools.sleep(250);
   motorPowerStateRequest.setValueFromDouble(1.0);
  }
});

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

private void setupInitialRobot(double[] initialSetup)
{
 for (int i = 0; i < allVariables.length; i++)
 {
   double initialValue = initialSetup[i];
   YoVariable<?> variable = allVariables[i];
   System.out.println(variable.getName() + ": " + initialValue);
   variable.setValueFromDouble(initialValue);
 }
}

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

@Override
  public void notifyOfVariableChange(YoVariable<?> v)
  {
    if(v.getValueAsDouble()>currentLimit) v.setValueFromDouble(currentLimit);
    if(v.getValueAsDouble()<-currentLimit) v.setValueFromDouble(-currentLimit);        	 
  }
});

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

public static void readParameter(YoParameter<?> parameter, double doubleValue, ParameterLoadStatus loadStatus)
  {
   if (loadStatus == ParameterLoadStatus.UNLOADED)
   {
     throw new RuntimeException("Can not load parameter and set the status to unloaded.");
   }
   parameter.getVariable().setValueFromDouble(doubleValue);
   parameter.loadStatus = loadStatus;
  }
}

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

private void changeWrittenVariablesRandomly(YoWhiteBoard leftWhiteBoard)
{
 ArrayList<YoVariable<?>> variablesToWrite = new ArrayList<YoVariable<?>>();
 leftWhiteBoard.getAllVariablesToWrite(variablesToWrite);
 for (YoVariable<?> variable : variablesToWrite)
 {
   variable.setValueFromDouble(2.0 * Math.random());
 }
}

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

@Override
 public void notifyOfVariableChange(YoVariable<?> v)
 {
   if (v.getValueAsDouble() < minVelocityX)
     v.setValueFromDouble(minVelocityX, false);
   if (v.getValueAsDouble() > maxVelocityX)
     v.setValueFromDouble(maxVelocityX, false);
 }
});

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

private void updateChangedVariables(YoVariableRegistry rootRegistry)
{
 ConcurrentRingBuffer<VariableChangedMessage> buffer = variableChangeData.get(rootRegistry);
 buffer.poll();
 VariableChangedMessage msg;
 while ((msg = buffer.read()) != null)
 {
   msg.getVariable().setValueFromDouble(msg.getVal());
 }
 buffer.flush();
}

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