Tabnine Logo
us.ihmc.sensorProcessing.model
Code IndexAdd Tabnine to your IDE (free)

How to use us.ihmc.sensorProcessing.model

Best Java code snippets using us.ihmc.sensorProcessing.model (Showing top 20 results out of 315)

origin: us.ihmc/IHMCHumanoidRobotics

public void copyFromController()
{
 controllerDataHolder.updateFromModel();
 for(int i = 0; i < controllerDataHolder.getJoints().length; i++)
 {
   intermediateDesiredJointData[i].set(controllerDataHolder.get(i));
 }
 
}
origin: us.ihmc/IHMCHumanoidRobotics

  public void readIntoEstimator()
  {
   for(int i = 0; i < estimatorDataHolder.getJoints().length; i++)
   {
     estimatorDataHolder.get(i).set(intermediateDesiredJointData[i]);
   }
  }
}
origin: us.ihmc/ihmc-whole-body-controller

  @Override
  public void robotMotionStatusHasChanged(RobotMotionStatus newStatus, double time)
  {
   controllerRobotMotionStatusHolder.setCurrentRobotMotionStatus(newStatus);
  }
};
origin: us.ihmc/IHMCWholeBodyController

estimatorRawJointSensorDataHolderMap = new RawJointSensorDataHolderMap(estimatorFullRobotModel);
estimatorContactSensorHolder = new ContactSensorHolder(Arrays.asList(estimatorFullRobotModel.getContactSensorDefinitions()));
estimatorRobotMotionStatusHolder = new RobotMotionStatusHolder();
estimatorDesiredJointDataHolder = new DesiredJointDataHolder(estimatorFullRobotModel.getOneDoFJoints());
origin: us.ihmc/SensorProcessing

public void set(DesiredJointData desiredJointData)
{
  setTauDesired(desiredJointData.getTauDesired());
  setQddDesired(desiredJointData.getQddDesired());
  setPositionDesired(desiredJointData.getPositionDesired());
}
origin: us.ihmc/IHMCWholeBodyController

public void writeControllerDataFromController()
{
 for (int i = 0; i < controllerFeet.size(); i++)
 {
   RigidBody foot = controllerFeet.get(i);
   controllerCenterOfPressureDataHolder.getCenterOfPressureByName(centerOfPressure.get(foot.getName()), foot);
 }
 robotMotionStatus.set(controllerRobotMotionStatusHolder.getCurrentRobotMotionStatus());
 intermediateDesiredJointDataHolder.copyFromController();
}
origin: us.ihmc/IHMCHumanoidRobotics

public IntermediateDesiredJointDataHolder(DesiredJointDataHolder estimatorDataHolder, DesiredJointDataHolder controllerDataHolder)
{
 this.estimatorDataHolder = estimatorDataHolder;
 this.controllerDataHolder = controllerDataHolder;
 
 for(int i = 0; i < estimatorDataHolder.getJoints().length; i++)
 {
   if(estimatorDataHolder.getJoints()[i].getName() != controllerDataHolder.getJoints()[i].getName())
   {
    throw new RuntimeException("Models do not match");
   }
 }
 intermediateDesiredJointData = new DesiredJointData[estimatorDataHolder.getJoints().length];
 for(int i = 0; i < estimatorDataHolder.getJoints().length; i++)
 {
   intermediateDesiredJointData[i] = new DesiredJointData();
 }      
}
origin: us.ihmc/ihmc-humanoid-robotics

public static RobotConfigurationData nextRobotConfigurationData(Random random)
{
 RobotConfigurationData next = new RobotConfigurationData();
 int size = random.nextInt(10000);
 next.setTimestamp(random.nextLong());
 next.setSensorHeadPpsTimestamp(random.nextLong());
 next.setJointNameHash(random.nextInt(10000));
 next.getJointAngles().add(RandomNumbers.nextFloatArray(random, size, 1.0f));
 next.getJointVelocities().add(RandomNumbers.nextFloatArray(random, size, 1.0f));
 next.getJointTorques().add(RandomNumbers.nextFloatArray(random, size, 1.0f));
 next.getRootTranslation().set(EuclidCoreRandomTools.nextVector3D32(random));
 next.getPelvisLinearVelocity().set(EuclidCoreRandomTools.nextVector3D32(random));
 next.getPelvisAngularVelocity().set(EuclidCoreRandomTools.nextVector3D32(random));
 next.getRootOrientation().set(EuclidCoreRandomTools.nextQuaternion32(random));
 next.getPelvisLinearAcceleration().set(EuclidCoreRandomTools.nextVector3D32(random));
 size = Math.abs(random.nextInt(1000));
 for (int i = 0; i < next.getForceSensorData().size(); i++)
   next.getForceSensorData().add().set(nextSpatialVectorMessage(random));
 for (IMUPacket imuPacket : nextIMUPackets(random))
   next.getImuSensorData().add().set(imuPacket);
 next.setRobotMotionStatus(RandomNumbers.nextEnum(random, RobotMotionStatus.class).toByte());
 next.setLastReceivedPacketTypeId(random.nextInt(1000));
 next.setLastReceivedPacketUniqueId(random.nextLong());
 next.setLastReceivedPacketRobotTimestamp(random.nextLong());
 return next;
}
origin: us.ihmc/SensorProcessing

public void updateFromModel()
{
 
 for (int i = 0; i < desiredJointDataList.size(); i++)
 {
   ImmutablePair<OneDoFJoint, DesiredJointData> desiredJointData = desiredJointDataList.get(i);
   OneDoFJoint joint = desiredJointData.getLeft();
   DesiredJointData data = desiredJointData.getRight();
   data.setQddDesired(joint.getQddDesired());
   data.setTauDesired(joint.getTau());
   data.setPositionDesired(joint.getqDesired());
 }
}
origin: us.ihmc/IHMCWholeBodyController

@Override
public void publishControllerData()
{      
 controllerDesiredJointDataHolder.updateFromModel();
}
origin: us.ihmc/SensorProcessing

public DesiredJointDataHolder(OneDoFJoint[] joints)
{
 this.joints = joints;
 for (int i = 0; i < joints.length; i++)
 {
   DesiredJointData value = new DesiredJointData();
   desiredJointDataList.add(new ImmutablePair<OneDoFJoint, DesiredJointDataHolder.DesiredJointData>(joints[i], value));
   desiredJointData.put(joints[i], value);
 }
}
origin: us.ihmc/CommonWalkingControlModules

public void reportChangeOfRobotMotionStatus(RobotMotionStatus newStatus)
{
 for (int i = 0; i < robotMotionStatusChangedListeners.size(); i++)
 {
   robotMotionStatusChangedListeners.get(i).robotMotionStatusHasChanged(newStatus, yoTime.getDoubleValue());
 }
}
origin: us.ihmc/IHMCWholeBodyController

estimatorRawJointSensorDataHolderMap = new RawJointSensorDataHolderMap(estimatorFullRobotModel);
estimatorContactSensorHolder = new ContactSensorHolder(Arrays.asList(estimatorFullRobotModel.getContactSensorDefinitions()));
estimatorRobotMotionStatusHolder = new RobotMotionStatusHolder();
estimatorDesiredJointDataHolder = new DesiredJointDataHolder(estimatorFullRobotModel.getOneDoFJoints());
controllerContactSensorHolder = new ContactSensorHolder(Arrays.asList(controllerFullRobotModel.getContactSensorDefinitions()));
controllerRawJointSensorDataHolderMap = new RawJointSensorDataHolderMap(controllerFullRobotModel);
controllerRobotMotionStatusHolder = new RobotMotionStatusHolder();
controllerDesiredJointDataHolder = new DesiredJointDataHolder(controllerFullRobotModel.getOneDoFJoints());
origin: us.ihmc/ihmc-whole-body-controller

public void writeControllerDataFromController()
{
 for (int i = 0; i < controllerFeet.size(); i++)
 {
   RigidBodyBasics foot = controllerFeet.get(i);
   controllerCenterOfPressureDataHolder.getCenterOfPressureByName(centerOfPressure.get(foot.getName()), foot);
 }
 robotMotionStatus.set(controllerRobotMotionStatusHolder.getCurrentRobotMotionStatus());
 intermediateDesiredJointDataHolder.copyFromController();
}
origin: us.ihmc/IHMCWholeBodyController

  @Override
  public void robotMotionStatusHasChanged(RobotMotionStatus newStatus, double time)
  {
   controllerRobotMotionStatusHolder.setCurrentRobotMotionStatus(newStatus);
  }
};
origin: us.ihmc/ihmc-avatar-interfaces

public void sendMockRobotConfiguration(long totalNsecs)
{
 IMUDefinition[] imuDefinitions = fullRobotModel.getIMUDefinitions();
 RobotConfigurationData robotConfigurationData = RobotConfigurationDataFactory.create(FullRobotModelUtils.getAllJointsExcludingHands(fullRobotModel),
                                            forceSensorDefinitions, imuDefinitions);
 for (int sensorNumber = 0; sensorNumber < imuDefinitions.length; sensorNumber++)
 {
   robotConfigurationData.getImuSensorData().add();
 }
 robotConfigurationData.setRobotMotionStatus(RobotMotionStatus.STANDING.toByte());
 robotConfigurationData.setTimestamp(totalNsecs);
 Vector3D translation = new Vector3D();
 Quaternion orientation = new Quaternion();
 robotConfigurationData.getRootTranslation().set(translation);
 robotConfigurationData.getRootOrientation().set(orientation);
 publisher.publish(robotConfigurationData);
}
origin: us.ihmc/SensorProcessing

state.setRobotMotionStatus(robotMotionStatusFromController.getCurrentRobotMotionStatus());
origin: us.ihmc/IHMCWholeBodyController

public void readControllerDataIntoEstimator()
{
 for (int i = 0; i < estimatorFeet.size(); i++)
 {
   RigidBody foot = estimatorFeet.get(i);
   estimatorCenterOfPressureDataHolder.setCenterOfPressure(centerOfPressure.get(foot.getName()), foot);
 }
 if (robotMotionStatus.get() != null)
   estimatorRobotMotionStatusHolder.setCurrentRobotMotionStatus(robotMotionStatus.getAndSet(null));
 
 intermediateDesiredJointDataHolder.readIntoEstimator();
}
origin: us.ihmc/ihmc-avatar-interfaces

public void receivedClockMessage(long totalNsecs)
{
 RigidBodyTransform pelvisPoseInMocapFrame = atomicPelvisPose.get();
 IMUDefinition[] imuDefinitions = fullRobotModel.getIMUDefinitions();
 RobotConfigurationData robotConfigurationData = RobotConfigurationDataFactory.create(fullRobotModel.getOneDoFJoints(), forceSensorDefinitions, imuDefinitions);
 for(int sensorNumber = 0; sensorNumber <  imuDefinitions.length; sensorNumber++)
 {
   IMUPacket imuPacket = robotConfigurationData.getImuSensorData().add();
   imuPacket.getLinearAcceleration().set(RandomGeometry.nextVector3D32(random));
   imuPacket.getOrientation().set(RandomGeometry.nextQuaternion32(random));
   imuPacket.getAngularVelocity().set(RandomGeometry.nextVector3D32(random));
 }
 
 robotConfigurationData.setRobotMotionStatus(RobotMotionStatus.STANDING.toByte());
 
 robotConfigurationData.setTimestamp(totalNsecs);
 if(pelvisPoseInMocapFrame != null)
 {
   Vector3D translation = new Vector3D();
   Quaternion orientation = new Quaternion();
   pelvisPoseInMocapFrame.getTranslation(translation);
   pelvisPoseInMocapFrame.getRotation(orientation);
   robotConfigurationData.getRootTranslation().set(translation);
   robotConfigurationData.getRootOrientation().set(orientation);
 }
 fullRobotModel.updateFrames();
 packetCommunicator.send(robotConfigurationData);
}
origin: us.ihmc/ihmc-whole-body-controller

public void readControllerDataIntoEstimator()
{
 for (int i = 0; i < estimatorFeet.size(); i++)
 {
   RigidBodyBasics foot = estimatorFeet.get(i);
   estimatorCenterOfPressureDataHolder.setCenterOfPressure(centerOfPressure.get(foot.getName()), foot);
 }
 if (robotMotionStatus.get() != null)
   estimatorRobotMotionStatusHolder.setCurrentRobotMotionStatus(robotMotionStatus.getAndSet(null));
 
 intermediateDesiredJointDataHolder.readIntoEstimator();
}
us.ihmc.sensorProcessing.model

Most used classes

  • RobotMotionStatusHolder
  • RobotMotionStatus
  • DesiredJointDataHolder$DesiredJointData
  • DesiredJointDataHolder
  • RobotMotionStatusChangedListener
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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