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

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

Best Java code snippets using us.ihmc.tools.lists.PairList.first (Showing top 11 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

OneDoFJointBasics joint = controlledJoints.first(i);
String jointName = joint.getName();
origin: us.ihmc/ihmc-whole-body-controller

final OneDoFJointBasics jointState = jointStateAndData.first(i);
final JointDesiredOutputBasics jointData = jointStateAndData.second(i);
origin: us.ihmc/ihmc-whole-body-controller

OneDoFJointBasics jointState = jointStateAndData.first(i);
YoDouble qd_d_joint = desiredVelocities.get(jointData);
YoDouble q_d_joint = desiredPositions.get(jointData);
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

JointDesiredOutputBasics jointData = jointTorquesSmoothedAtStateChange.first(i);
double tau = jointData.hasDesiredTorque() ? jointData.getDesiredTorque() : 0.0;
AlphaFilteredYoVariable smoothedJointTorque = jointTorquesSmoothedAtStateChange.second(i);
origin: us.ihmc/ihmc-whole-body-controller

OneDoFJointBasics state = controlledJoints.first(i);
JointDesiredOutputBasics output = controlledJoints.second(i);
PDController jointPDController = jointPDControllerMap.get(state);
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/ihmc-whole-body-controller

 if (controlledJoints.first(i).getName().equals(jointToIgnore))
   controlledJoints.remove(i);
OneDoFJointBasics joint = controlledJoints.first(i);
String name = joint.getName();
OneDoFJointQuinticTrajectoryGenerator jointTrajectory = new OneDoFJointQuinticTrajectoryGenerator(name, joint, trajectoryTimeProvider, registry);
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());
   }
 }
}
us.ihmc.tools.listsPairListfirst

Popular methods of PairList

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

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
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