Codota Logo
PairList.size
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: us.ihmc/SensorProcessing

  public void copy()
  {
   for(int i = 0; i < originalAndTarget.size(); i++)
   {
     RawJointSensorDataHolder original = originalAndTarget.first(i);
     RawJointSensorDataHolder target = originalAndTarget.second(i);
          target.set(original);
   }
  }
}
origin: us.ihmc/ihmc-whole-body-controller

@Override
public void initialize()
{
 for (int i = 0; i < controlledJoints.size(); i++)
 {
   OneDoFJointBasics state = controlledJoints.first(i);
   jointTrajectories.get(state).initialize(state.getQ(), 0.0);
 }
 startTime.set(yoTime.getDoubleValue());
 hasBeenInitialized = true;
}
origin: us.ihmc/ihmc-whole-body-controller

for (int i = 0; i < controlledJoints.size(); i++)
origin: us.ihmc/ihmc-whole-body-controller

positionTorqueMap = new LinkedHashMap<>();
for (int i = 0; i < jointStateAndData.size(); i++)
origin: us.ihmc/ihmc-whole-body-controller

private void doIdleControl()
{
 for (int i = 0; i < controlledJoints.size(); i++)
 {
   OneDoFJointBasics state = controlledJoints.first(i);
   JointDesiredOutputBasics output = controlledJoints.second(i);
   PDController jointPDController = jointPDControllerMap.get(state);
   OneDoFJointQuinticTrajectoryGenerator jointTrajectory = jointTrajectories.get(state);
   jointTrajectory.compute(trajectoryTimeProvider.getValue());
   YoDouble jointDesiredPosition = jointDesiredPositionMap.get(state);
   YoDouble jointDesiredVelocity = jointDesiredVelocityMap.get(state);
   jointDesiredPosition.set(jointTrajectory.getValue());
   jointDesiredVelocity.set(0.0);
   double q = state.getQ();
   double qDesired = jointDesiredPosition.getDoubleValue();
   double qd = state.getQd();
   double qdDesired = jointDesiredVelocity.getDoubleValue();
   double tauDesired = jointPDController.compute(q, qDesired, qd, qdDesired);
   double qdMax = qdMaxIdle.getDoubleValue();
   double qddMax = qddMaxIdle.getDoubleValue();
   double tauMax = tauMaxIdle.getDoubleValue();
   qDesired = q + MathTools.clamp(qDesired - q, qdMax * controlDT);
   qdDesired = qd + MathTools.clamp(qdDesired - qd, qddMax * controlDT);
   tauDesired = MathTools.clamp(tauDesired, tauMax);
   output.setDesiredTorque(tauDesired);
   output.setDesiredPosition(qDesired);
   output.setDesiredVelocity(qdDesired);
   jointDesiredTauMap.get(state).set(tauDesired);
 }
}
origin: us.ihmc/ihmc-whole-body-controller

@Override
public void processAfterController(long timestamp)
 for (int i = 0; i < jointStateAndData.size(); i++)
origin: us.ihmc/ihmc-whole-body-controller

for (int i = 0; i < jointTorquesSmoothedAtStateChange.size(); i++)
origin: us.ihmc/valkyrie

@Override
public void onEntry()
{
  for (int i = 0; i < jointsData.size(); i++)
  {
   OneDoFJointBasics joint = jointsData.get(i).getLeft();
   TrajectoryData trajectoryData = jointsData.get(i).getRight();
   YoDouble initialPosition = trajectoryData.getInitialPosition();
   YoPolynomial trajectory = trajectoryData.getTrajectory();
   double startAngle = jointTorqueOffsetEstimatorController.getJointCalibrationPosition(joint);
   double startVelocity = 0.0;
   double finalAngle = initialPosition.getDoubleValue();
   double finalVelocity = 0.0;
   trajectory.setCubic(0.0, timeToMoveForCalibration.getDoubleValue(), startAngle, startVelocity, finalAngle, finalVelocity);
  }
}
origin: us.ihmc/ihmc-whole-body-controller

DiagnosticTask currentTask = diagnosticTaskExecutor.getCurrentTask();
for (int i = 0; i < controlledJoints.size(); i++)
origin: us.ihmc/ihmc-whole-body-controller

@Override
public void processAfterController(long timestamp)
{
 for (int i = 0; i < torqueOffsetList.size(); i++)
 {
   JointDesiredOutputBasics jointData = torqueOffsetList.first(i);
   YoDouble torqueOffsetVariable = torqueOffsetList.second(i);
   double desiredAcceleration = jointData.hasDesiredAcceleration() ? jointData.getDesiredAcceleration() : 0.0;
   if (resetTorqueOffsets.getBooleanValue())
    torqueOffsetVariable.set(0.0);
   double offsetTorque = torqueOffsetVariable.getDoubleValue();
   double ditherTorque = 0.0;
   double alpha = alphaTorqueOffset.getDoubleValue();
   offsetTorque = alpha * (offsetTorque + desiredAcceleration * updateDT) + (1.0 - alpha) * offsetTorque;
   torqueOffsetVariable.set(offsetTorque);
   double desiredTorque = jointData.hasDesiredTorque() ? jointData.getDesiredTorque() : 0.0;
   jointData.setDesiredTorque(desiredTorque + offsetTorque + ditherTorque);
 }
 if (drcOutputWriter != null)
 {
   drcOutputWriter.processAfterController(timestamp);
 }
}
origin: us.ihmc/valkyrie

@Override
public void onEntry()
{
  for (int i = 0; i < jointsData.size(); i++)
  {
   OneDoFJointBasics joint = jointsData.get(i).getLeft();
   TrajectoryData trajectoryData = jointsData.get(i).getRight();
   YoDouble initialPosition = trajectoryData.getInitialPosition();
   YoPolynomial trajectory = trajectoryData.getTrajectory();
   JointDesiredOutputReadOnly jointDesiredOutput = highLevelControlOutput.getJointDesiredOutput(joint);
   double startAngle = jointDesiredOutput != null && jointDesiredOutput.hasDesiredPosition() ? jointDesiredOutput.getDesiredPosition() : joint.getQ();
   double startVelocity = 0.0;
   double finalAngle = jointTorqueOffsetEstimatorController.getJointCalibrationPosition(joint);
   double finalVelocity = 0.0;
   initialPosition.set(startAngle);
   trajectory.setCubic(0.0, timeToMoveForCalibration.getDoubleValue(), startAngle, startVelocity, finalAngle, finalVelocity);
  }
  jointTorqueOffsetEstimatorController.initialize();
}
origin: us.ihmc/ihmc-whole-body-controller

  for (int i = controlledJoints.size() - 1; i >= 0; i--)
submitDiagnostic(new WaitDiagnosticTask(trajectoryTimeProvider.getValue()));
for (int i = 0; i < controlledJoints.size(); i++)
origin: us.ihmc/ihmc-avatar-interfaces

protected void write()
{
 for (int i = 0; i < revoluteJoints.size(); i++)
 {
   OneDegreeOfFreedomJoint pinJoint = revoluteJoints.first(i);
   JointDesiredOutputReadOnly data = revoluteJoints.second(i);
   if(data.hasDesiredTorque())
   {
    pinJoint.setTau(data.getDesiredTorque());
   }
   if (data.hasStiffness())
   {
    pinJoint.setKp(data.getStiffness());
   }
   if (data.hasDamping())
   {
    pinJoint.setKd(data.getDamping());
   }
   if (data.hasDesiredPosition())
   {
    pinJoint.setqDesired(data.getDesiredPosition());
   }
   if (data.hasDesiredVelocity())
   {
    pinJoint.setQdDesired(data.getDesiredVelocity());
   }
 }
}
origin: us.ihmc/valkyrie

@Override
public void doAction(double timeInState)
{
  double timeInTrajectory = MathTools.clamp(timeInState, 0.0, timeToMoveForCalibration.getDoubleValue());
  for (int jointIndex = 0; jointIndex < jointsData.size(); jointIndex++)
  {
   OneDoFJointBasics joint = jointsData.get(jointIndex).getLeft();
   TrajectoryData trajectoryData = jointsData.get(jointIndex).getRight();
   YoPolynomial trajectory = trajectoryData.getTrajectory();
   trajectory.compute(timeInTrajectory);
   double desiredPosition = trajectory.getPosition();
   JointDesiredOutputBasics lowLevelJointData = lowLevelOneDoFJointDesiredDataHolder.getJointDesiredOutput(joint);
   lowLevelJointData.clear();
   lowLevelJointData.setDesiredPosition(desiredPosition);
   lowLevelJointData.setDesiredVelocity(trajectory.getVelocity());
   lowLevelJointData.setDesiredAcceleration(trajectory.getAcceleration());
   JointDesiredOutputReadOnly estimatorOutput = jointTorqueOffsetEstimatorController.getOutputForLowLevelController().getJointDesiredOutput(joint);
   if (estimatorOutput != null && estimatorOutput.hasDesiredTorque())
   {
     double desiredTorque = estimatorOutput.getDesiredTorque();
     desiredTorque *= 1.0 - timeInTrajectory / timeToMoveForCalibration.getDoubleValue();
     lowLevelJointData.setDesiredTorque(desiredTorque);
   }
  }
  lowLevelOneDoFJointDesiredDataHolder.completeWith(getStateSpecificJointSettings());
}
origin: us.ihmc/valkyrie

@Override
public void doAction(double timeInState)
{
  double timeInTrajectory = MathTools.clamp(timeInState, 0.0, timeToMoveForCalibration.getDoubleValue());
  jointTorqueOffsetEstimatorController.doControl();
  for (int jointIndex = 0; jointIndex < jointsData.size(); jointIndex++)
  {
   OneDoFJointBasics joint = jointsData.get(jointIndex).getLeft();
   TrajectoryData trajectoryData = jointsData.get(jointIndex).getRight();
   YoPolynomial trajectory = trajectoryData.getTrajectory();
   trajectory.compute(timeInTrajectory);
   double desiredPosition = trajectory.getPosition();
   JointDesiredOutputBasics lowLevelJointData = lowLevelOneDoFJointDesiredDataHolder.getJointDesiredOutput(joint);
   lowLevelJointData.clear();
   lowLevelJointData.setDesiredPosition(desiredPosition);
   lowLevelJointData.setDesiredVelocity(trajectory.getVelocity());
   lowLevelJointData.setDesiredAcceleration(trajectory.getAcceleration());
   JointDesiredOutputReadOnly estimatorOutput = jointTorqueOffsetEstimatorController.getOutputForLowLevelController().getJointDesiredOutput(joint);
   if (estimatorOutput != null && estimatorOutput.hasDesiredTorque())
   {
     double desiredTorque = estimatorOutput.getDesiredTorque();
     desiredTorque *= timeInTrajectory / timeToMoveForCalibration.getDoubleValue();
     lowLevelJointData.setDesiredTorque(desiredTorque);
   }
  }
  lowLevelOneDoFJointDesiredDataHolder.completeWith(getStateSpecificJointSettings());
}
us.ihmc.tools.listsPairListsize

Popular methods of PairList

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Path (java.nio.file)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • JComboBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now