us.ihmc.robotics.robotSide.RobotSide.toByte()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(102)

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

RobotSide.toByte介绍

暂无

代码示例

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

public void receivedPacket(HandDesiredConfigurationMessage ihmcMessage)
{
 if (this.robotSide == null)
   messageQueue.add(ihmcMessage);
 else if (ihmcMessage.getRobotSide() == this.robotSide.toByte())
   messageQueue.add(ihmcMessage);
}

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

public static ObjectWeightPacket nextObjectWeightPacket(Random random)
{
 ObjectWeightPacket next = new ObjectWeightPacket();
 next.setWeight(random.nextDouble());
 next.setRobotSide(random.nextBoolean() ? RobotSide.LEFT.toByte() : RobotSide.RIGHT.toByte());
 return next;
}

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

public static final void convertHandConfiguration(RobotSide robotSide, HandConfiguration desiredHandConfiguration,
                         ValkyrieHandFingerTrajectoryMessage messageToPack)
{
 messageToPack.setRobotSide(robotSide.toByte());
 convertHandConfiguration(desiredHandConfiguration, messageToPack);
}

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

public static AtlasWristSensorCalibrationRequestPacket nextAtlasWristSensorCalibrationRequestPacket(Random random)
{
 AtlasWristSensorCalibrationRequestPacket next = new AtlasWristSensorCalibrationRequestPacket();
 next.setRobotSide(RandomNumbers.nextEnum(random, RobotSide.class).toByte());
 return next;
}

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

public static ObjectWeightPacket createObjectWeightPacket(RobotSide robotSide, double weight)
{
 ObjectWeightPacket message = new ObjectWeightPacket();
 message.setRobotSide(robotSide.toByte());
 message.setWeight(weight);
 return message;
}

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

public static LegCompliancePacket createLegCompliancePacket(float[] maxVelocityDeltas, RobotSide robotSide)
{
 LegCompliancePacket message = new LegCompliancePacket();
 message.getMaxVelocityDeltas().add(maxVelocityDeltas);
 message.setRobotSide(robotSide.toByte());
 return message;
}

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

public static FootTrajectoryMessage createFootTrajectoryMessage(RobotSide robotSide, SE3TrajectoryMessage trajectoryMessage)
{
 FootTrajectoryMessage message = new FootTrajectoryMessage();
 message.getSe3Trajectory().set(trajectoryMessage);
 message.setRobotSide(robotSide.toByte());
 return message;
}

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

public static HandTrajectoryMessage nextHandTrajectoryMessage(Random random)
{
 HandTrajectoryMessage next = new HandTrajectoryMessage();
 next.setRobotSide(RandomNumbers.nextEnum(random, RobotSide.class).toByte());
 next.getSe3Trajectory().set(nextSE3TrajectoryMessage(random));
 return next;
}

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

public static FootTrajectoryMessage nextFootTrajectoryMessage(Random random)
{
 FootTrajectoryMessage next = new FootTrajectoryMessage();
 next.setRobotSide(RandomNumbers.nextEnum(random, RobotSide.class).toByte());
 next.getSe3Trajectory().set(nextSE3TrajectoryMessage(random));
 return next;
}

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

public static HandHybridJointspaceTaskspaceTrajectoryMessage createHandHybridJointspaceTaskspaceTrajectoryMessage(RobotSide robotSide,
                                                         SE3TrajectoryMessage taskspaceTrajectoryMessage,
                                                         JointspaceTrajectoryMessage jointspaceTrajectoryMessage)
{
 HandHybridJointspaceTaskspaceTrajectoryMessage message = new HandHybridJointspaceTaskspaceTrajectoryMessage();
 message.setRobotSide(robotSide.toByte());
 message.getTaskspaceTrajectoryMessage().set(taskspaceTrajectoryMessage);
 message.getJointspaceTrajectoryMessage().set(jointspaceTrajectoryMessage);
 return message;
}

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

public static ArmTrajectoryMessage nextArmTrajectoryMessage(Random random)
{
 ArmTrajectoryMessage next = new ArmTrajectoryMessage();
 next.getJointspaceTrajectory().set(RandomHumanoidMessages.nextJointspaceTrajectoryMessage(random));
 next.setRobotSide(RandomNumbers.nextEnum(random, RobotSide.class).toByte());
 return next;
}

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

public static HandJointAnglePacket createHandJointAnglePacket(RobotSide robotSide, boolean connected, boolean calibrated, double[] jointAngles)
{
 HandJointAnglePacket message = new HandJointAnglePacket();
 message.setRobotSide(robotSide == null ? -1 : robotSide.toByte());
 message.getJointAngles().add(jointAngles);
 message.setConnected(connected);
 message.setCalibrated(calibrated);
 return message;
}

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

public static HandLoadBearingMessage nextHandLoadBearingMessage(Random random)
{
 HandLoadBearingMessage next = new HandLoadBearingMessage();
 next.setRobotSide(RobotSide.generateRandomRobotSide(random).toByte());
 next.setUseJointspaceCommand(random.nextBoolean());
 next.getJointspaceTrajectory().set(nextJointspaceTrajectoryMessage(random));
 next.setExecutionDelayTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1));
 next.getLoadBearingMessage().set(nextLoadBearingMessage(random));
 return next;
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

private void addFootstep(Point3D stepLocation, Quaternion orient, RobotSide robotSide, FootstepDataListMessage message)
{
 FootstepDataMessage footstepData = new FootstepDataMessage();
 footstepData.getLocation().set(stepLocation);
 footstepData.getOrientation().set(orient);
 footstepData.setRobotSide(robotSide.toByte());
 message.getFootstepDataList().add().set(footstepData);
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

private void addFootstep(Point3D stepLocation, Quaternion orient, RobotSide robotSide, FootstepDataListMessage message)
{
 FootstepDataMessage footstepData = new FootstepDataMessage();
 footstepData.getLocation().set(stepLocation);
 footstepData.getOrientation().set(orient);
 footstepData.setRobotSide(robotSide.toByte());
 message.getFootstepDataList().add().set(footstepData);
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

private FootstepDataMessage createFootstepDataMessage(RobotSide robotSide, FramePoint3D placeToStep)
{
 FootstepDataMessage footstepData = new FootstepDataMessage();
 FramePoint3D placeToStepInWorld = new FramePoint3D(placeToStep);
 placeToStepInWorld.changeFrame(worldFrame);
 footstepData.getLocation().set(placeToStepInWorld);
 footstepData.getOrientation().set(new Quaternion(0.0, 0.0, 0.0, 1.0));
 footstepData.setRobotSide(robotSide.toByte());
 return footstepData;
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

private void addFootstep(Point3D stepLocation, Quaternion orient, RobotSide robotSide, FootstepDataListMessage message)
{
 FootstepDataMessage footstepData = new FootstepDataMessage();
 footstepData.getLocation().set(stepLocation);
 footstepData.getOrientation().set(orient);
 footstepData.setRobotSide(robotSide.toByte());
 message.getFootstepDataList().add().set(footstepData);
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test

private void addFootstep(Point3D stepLocation, Quaternion orient, RobotSide robotSide, FootstepDataListMessage message)
{
 FootstepDataMessage footstepData = new FootstepDataMessage();
 footstepData.getLocation().set(stepLocation);
 footstepData.getOrientation().set(orient);
 footstepData.setRobotSide(robotSide.toByte());
 message.getFootstepDataList().add().set(footstepData);
}

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

public static FootstepStatusMessage createFootstepStatus(FootstepStatus status, int footstepIndex, RobotSide robotSide)
{
 FootstepStatusMessage message = new FootstepStatusMessage();
 message.setFootstepStatus(status.toByte());
 message.setFootstepIndex(footstepIndex);
 message.getDesiredFootPositionInWorld().setToNaN();
 message.getDesiredFootOrientationInWorld().setToNaN();
 message.getActualFootPositionInWorld().setToNaN();
 message.getActualFootOrientationInWorld().setToNaN();
 message.setRobotSide(robotSide.toByte());
 return message;
}

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

public static HandHybridJointspaceTaskspaceTrajectoryMessage nextHandHybridJointspaceTaskspaceTrajectoryMessage(Random random)
{
 HandHybridJointspaceTaskspaceTrajectoryMessage next = new HandHybridJointspaceTaskspaceTrajectoryMessage();
 next.setRobotSide(RandomNumbers.nextEnum(random, RobotSide.class).toByte());
 next.getTaskspaceTrajectoryMessage().set(RandomHumanoidMessages.nextSE3TrajectoryMessage(random));
 next.getJointspaceTrajectoryMessage().set(RandomHumanoidMessages.nextJointspaceTrajectoryMessage(random));
 next.getJointspaceTrajectoryMessage().getQueueingProperties().set(next.getTaskspaceTrajectoryMessage().getQueueingProperties());
 return next;
}

相关文章