congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
PairList.add
Code IndexAdd Tabnine to your IDE (free)

How to use
add
method
in
us.ihmc.tools.lists.PairList

Best Java code snippets using us.ihmc.tools.lists.PairList.add (Showing top 10 results out of 315)

origin: us.ihmc/IHMCJavaToolkit

public void add(T first, V second)
{
 add(new ImmutablePair<T, V>(first, second));
}
origin: us.ihmc/ihmc-avatar-interfaces

public void add(L leftObjectToAdd, R rightObjectToAdd)
{
 PairList<L, R> existingList = getCopyForReading();
 PairList<L, R> updatedList = getCopyForWriting();
 updatedList.clear();
 if (existingList != null)
   updatedList.addAll(existingList);
 updatedList.add(new ImmutablePair<>(leftObjectToAdd, rightObjectToAdd));
 this.commit();
}
origin: us.ihmc/ihmc-java-toolkit

public void add(T first, V second)
{
 add(new ImmutablePair<T, V>(first, second));
}
origin: us.ihmc/SensorProcessing

public RawJointSensorDataHolderMapCopier(RawJointSensorDataHolderMap originalMap, RawJointSensorDataHolderMap targetMap)
{
 List<RawJointSensorDataHolder> originals = new ArrayList<RawJointSensorDataHolder>(originalMap.values());
 List<RawJointSensorDataHolder> targets = new ArrayList<RawJointSensorDataHolder>(targetMap.values());
 
 if(originals.size() != targets.size())
 {
   throw new RuntimeException("Original and Target are not of equal length");
 }
 
 for(int i = 0; i < originals.size(); i++)
 {
   RawJointSensorDataHolder original = originals.get(i);
   RawJointSensorDataHolder target = targets.get(i); 
   if(!original.getName().equals(target.getName()))
   {
    throw new RuntimeException("Original and Target don't match. Got: " + target.getName() + ", expected: " + original.getName());
   }
      originalAndTarget.add(original, target);
 }
}
origin: us.ihmc/ihmc-avatar-interfaces

@Override
public void setJointDesiredOutputList(JointDesiredOutputList lowLevelDataHolder)
{
 revoluteJoints.clear();
 for (int i = 0; i < lowLevelDataHolder.getNumberOfJointsWithDesiredOutput(); i++)
 {
   OneDoFJointBasics revoluteJoint = lowLevelDataHolder.getOneDoFJoint(i);
   JointDesiredOutputReadOnly data = lowLevelDataHolder.getJointDesiredOutput(i);
   String name = revoluteJoint.getName();
   OneDegreeOfFreedomJoint oneDoFJoint = robot.getOneDegreeOfFreedomJoint(name);
   ImmutablePair<OneDegreeOfFreedomJoint, JointDesiredOutputReadOnly> jointPair = new ImmutablePair<OneDegreeOfFreedomJoint, JointDesiredOutputReadOnly>(oneDoFJoint, data);
   this.revoluteJoints.add(jointPair);
 }
}
origin: us.ihmc/ihmc-whole-body-controller

@Override
public void setLowLevelControllerCoreOutput(FullHumanoidRobotModel controllerRobotModel,
                      JointDesiredOutputList lowLevelControllerCoreOutput,
                      RawJointSensorDataHolderMap rawJointSensorDataHolderMap)
{
 if (drcOutputWriter != null)
 {
   drcOutputWriter.setLowLevelControllerCoreOutput(controllerRobotModel, lowLevelControllerCoreOutput, rawJointSensorDataHolderMap);
 }
 torqueOffsetList = new PairList<>();
 torqueOffsetMap = new HashMap<>();
 for (int i = 0; i < lowLevelControllerCoreOutput.getNumberOfJointsWithDesiredOutput(); i++)
 {
   JointDesiredOutputBasics jointData = lowLevelControllerCoreOutput.getJointDesiredOutput(i);
   final YoDouble torqueOffset = new YoDouble("tauOffset_" + lowLevelControllerCoreOutput.getJointName(i), registry);
   torqueOffsetList.add(jointData, torqueOffset);
   torqueOffsetMap.put(lowLevelControllerCoreOutput.getOneDoFJoint(i), torqueOffset);
 }
}
origin: us.ihmc/ihmc-whole-body-controller

@Override
public void setLowLevelControllerCoreOutput(FullHumanoidRobotModel controllerRobotModel, JointDesiredOutputList lowLevelControllerCoreOutput, RawJointSensorDataHolderMap rawJointSensorDataHolderMap)
{
 if(drcOutputProcessor != null)
 {
   drcOutputProcessor.setLowLevelControllerCoreOutput(controllerRobotModel, lowLevelControllerCoreOutput, rawJointSensorDataHolderMap);
 }
 for (int i = 0; i < lowLevelControllerCoreOutput.getNumberOfJointsWithDesiredOutput(); i++)
 {
   JointDesiredOutputBasics jointData = lowLevelControllerCoreOutput.getJointDesiredOutput(i);
   String jointName = lowLevelControllerCoreOutput.getOneDoFJoint(i).getName();
   AlphaFilteredYoVariable jointTorqueSmoothedAtStateChange = new AlphaFilteredYoVariable("smoothed_tau_" + jointName, registry, alphaForJointTorqueForStateChanges);
   jointTorquesSmoothedAtStateChange.add(jointData, jointTorqueSmoothedAtStateChange);
 }
}
origin: us.ihmc/ihmc-whole-body-controller

  jointStateAndData.add(controllerRobotModel.getLegJoint(robotSide, jointName), lowLevelControllerCoreOutput.getJointDesiredOutput(controllerRobotModel.getLegJoint(robotSide, jointName)));
for (ArmJointName jointName : armJointsForIntegratingAcceleration)
  jointStateAndData.add(controllerRobotModel.getArmJoint(robotSide, jointName), lowLevelControllerCoreOutput.getJointDesiredOutput(controllerRobotModel.getArmJoint(robotSide, jointName)));
jointStateAndData.add(controllerRobotModel.getSpineJoint(jointName), lowLevelControllerCoreOutput.getJointDesiredOutput(controllerRobotModel.getSpineJoint(jointName)));
jointStateAndData.add(lowLevelControllerCoreOutput.getOneDoFJoint(i), lowLevelControllerCoreOutput.getJointDesiredOutput(lowLevelControllerCoreOutput.getOneDoFJoint(i)));
origin: us.ihmc/ihmc-whole-body-controller

controlledJoints.add(joint, lowLevelOutput.getJointDesiredOutput(joint));
origin: us.ihmc/valkyrie

public ValkyrieCalibrationControllerState(HighLevelHumanoidControllerToolbox highLevelControllerToolbox,
                     HighLevelControllerParameters highLevelControllerParameters,
                     JointDesiredOutputListReadOnly highLevelControlOutput,
                     ValkyrieCalibrationParameters calibrationParameters, TorqueOffsetPrinter torqueOffsetPrinter)
{
 super(controllerState, highLevelControllerParameters, MultiBodySystemTools.filterJoints(highLevelControllerToolbox.getControlledJoints(), OneDoFJoint.class));
 this.highLevelControlOutput = highLevelControlOutput;
 for (OneDoFJointBasics controlledJoint : controlledJoints)
 {
   String jointName = controlledJoint.getName();
   YoPolynomial trajectory = new YoPolynomial(jointName + "_CalibrationTrajectory", 4, registry);
   YoDouble initialPosition = new YoDouble(jointName + "_CalibrationInitialPosition", registry);
   jointsData.add(controlledJoint, new TrajectoryData(initialPosition, trajectory));
 }
 timeToMoveForCalibration.set(timeToMove);
 timeForEstimatingOffset.set(highLevelControllerParameters.getCalibrationDuration());
 jointTorqueOffsetEstimatorController = new JointTorqueOffsetEstimatorController(calibrationParameters, highLevelControllerToolbox, torqueOffsetPrinter);
 registry.addChild(jointTorqueOffsetEstimatorController.getYoVariableRegistry());
 lowLevelOneDoFJointDesiredDataHolder.registerJointsWithEmptyData(controlledJoints);
 
 StateMachineFactory<CalibrationStates, CalibrationState> factory = new StateMachineFactory<>(CalibrationStates.class);
 factory.setNamePrefix("calibrationState").setRegistry(registry).buildYoClock(highLevelControllerToolbox.getYoTime());
 factory.addStateAndDoneTransition(CalibrationStates.ENTRY, new CalibrationEntry(), CalibrationStates.CALIBRATE);
 factory.addStateAndDoneTransition(CalibrationStates.CALIBRATE, new Calibration(), CalibrationStates.EXIT);
 factory.addState(CalibrationStates.EXIT, new CalibrationExit());
 stateMachine = factory.build(CalibrationStates.ENTRY);
}
us.ihmc.tools.listsPairListadd

Popular methods of PairList

  • size
  • first
  • get
  • second
  • remove
  • <init>
  • addAll
  • clear
  • isEmpty
  • sort

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JTable (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now