public static TrajectoryPoint1DMessage nextTrajectoryPoint1DMessage(Random random) { TrajectoryPoint1DMessage next = new TrajectoryPoint1DMessage(); next.setTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.01)); next.setPosition(RandomNumbers.nextDoubleWithEdgeCases(random, 0.01)); next.setVelocity(RandomNumbers.nextDoubleWithEdgeCases(random, 0.01)); return next; }
public static WeightMatrix3DMessage nextWeightMatrix3DMessage(Random random) { WeightMatrix3DMessage next = new WeightMatrix3DMessage(); next.setWeightFrameId(random.nextLong()); next.setXWeight(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setYWeight(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setZWeight(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); return next; }
private static FootstepDataListMessage nextFootstepDataListMessage(Random random) { FootstepDataListMessage next = new FootstepDataListMessage(); MessageTools.copyData(nextFootstepDataMessages(random), next.getFootstepDataList()); next.setExecutionTiming(RandomNumbers.nextEnum(random, ExecutionTiming.class).toByte()); next.setDefaultSwingDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setDefaultTransferDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setFinalTransferDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setTrustHeightOfFootsteps(random.nextBoolean()); next.setAreFootstepsAdjustable(random.nextBoolean()); next.setOffsetFootstepsWithExecutionError(random.nextBoolean()); return next; }
public static QueueableMessage nextQueueableMessage(Random random) { QueueableMessage next = new QueueableMessage(); next.setExecutionMode(RandomNumbers.nextEnum(random, ExecutionMode.class).toByte()); next.setPreviousMessageId(random.nextLong()); next.setExecutionDelayTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); return next; }
private static FootstepDataMessage nextFootstepDataMessage(Random random) { FootstepDataMessage next = new FootstepDataMessage(); next.setRobotSide(RobotSide.generateRandomRobotSide(random).toByte()); next.getLocation().set(EuclidCoreRandomTools.nextPoint3D(random)); next.getOrientation().set(EuclidCoreRandomTools.nextQuaternion(random)); IntStream.range(0, random.nextInt(10)).forEach(i -> next.getPredictedContactPoints2d().add().set(EuclidCoreRandomTools.nextPoint2D(random))); next.setTrajectoryType(RandomNumbers.nextEnum(random, TrajectoryType.class).toByte()); next.setSwingHeight(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setSwingTrajectoryBlendDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setSwingDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setTransferDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setTouchdownDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setExecutionDelayTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); return next; }
public static FootstepDataListMessage nextFootstepDataListMessage(Random random) { FootstepDataListMessage next = new FootstepDataListMessage(); MessageTools.copyData(nextFootstepDataMessages(random), next.getFootstepDataList()); next.setExecutionTiming(RandomNumbers.nextEnum(random, ExecutionTiming.class).toByte()); next.setDefaultSwingDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setDefaultTransferDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setFinalTransferDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setTrustHeightOfFootsteps(random.nextBoolean()); next.setAreFootstepsAdjustable(random.nextBoolean()); next.setOffsetFootstepsWithExecutionError(random.nextBoolean()); next.getQueueingProperties().set(nextQueueableMessage(random)); return next; }
public SO3TrajectoryControllerCommand(Random random) { int randomNumberOfPoints = random.nextInt(16) + 1; for (int i = 0; i < randomNumberOfPoints; i++) { trajectoryPointList.addTrajectoryPoint(RandomNumbers.nextDoubleWithEdgeCases(random, 0.01), RandomGeometry.nextQuaternion(random), RandomGeometry.nextVector3D(random)); } trajectoryFrame = EuclidFrameRandomTools.nextReferenceFrame("trajectoryFrame", random, ReferenceFrame.getWorldFrame()); controlFramePoseInBodyFrame.set(RandomGeometry.nextQuaternion(random), RandomGeometry.nextVector3D(random)); useCustomControlFrame = random.nextBoolean(); }
public EuclideanTrajectoryControllerCommand(Random random) { int randomNumberOfPoints = random.nextInt(16) + 1; for (int i = 0; i < randomNumberOfPoints; i++) { trajectoryPointList.addTrajectoryPoint(RandomNumbers.nextDoubleWithEdgeCases(random, 0.01), RandomGeometry.nextPoint3D(random, -1.0, 1.0), RandomGeometry.nextVector3D(random)); } trajectoryFrame = EuclidFrameRandomTools.nextReferenceFrame("trajectoryFrame", random, ReferenceFrame.getWorldFrame()); controlFramePoseInBodyFrame.set(RandomGeometry.nextQuaternion(random), RandomGeometry.nextVector3D(random)); useCustomControlFrame = random.nextBoolean(); }
public static OneDoFJointTrajectoryMessage nextOneDoFJointTrajectoryMessage(Random random) { OneDoFJointTrajectoryMessage next = new OneDoFJointTrajectoryMessage(); MessageTools.copyData(nextTrajectoryPoint1DMessages(random), next.getTrajectoryPoints()); next.setWeight(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); return next; }
public SE3TrajectoryControllerCommand(Random random) { int randomNumberOfPoints = random.nextInt(16) + 1; for (int i = 0; i < randomNumberOfPoints; i++) { trajectoryPointList.addTrajectoryPoint(RandomNumbers.nextDoubleWithEdgeCases(random, 0.01), RandomGeometry.nextPoint3D(random, -1.0, 1.0), RandomGeometry.nextQuaternion(random), RandomGeometry.nextVector3D(random), RandomGeometry.nextVector3D(random)); } trajectoryFrame = EuclidFrameRandomTools.nextReferenceFrame("trajectoryFrame", random, ReferenceFrame.getWorldFrame()); controlFramePoseInBodyFrame.set(RandomGeometry.nextQuaternion(random), RandomGeometry.nextVector3D(random)); useCustomControlFrame = random.nextBoolean(); }
public static AdjustFootstepMessage nextAdjustFootstepMessage(Random random) { AdjustFootstepMessage next = new AdjustFootstepMessage(); next.setRobotSide(RandomNumbers.nextEnum(random, RobotSide.class).toByte()); next.getLocation().set(EuclidCoreRandomTools.nextPoint3D(random)); next.getOrientation().set(EuclidCoreRandomTools.nextQuaternion(random)); IntStream.range(0, random.nextInt(10)).mapToObj(i -> EuclidCoreRandomTools.nextPoint2D(random)).forEach(next.getPredictedContactPoints2d().add()::set); next.setExecutionDelayTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); return next; }
public static LoadBearingMessage nextLoadBearingMessage(Random random) { LoadBearingMessage next = new LoadBearingMessage(); next.setLoad(random.nextBoolean()); next.setCoefficientOfFriction(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.getBodyFrameToContactFrame().set(EuclidGeometryRandomTools.nextPose3D(random)); next.getContactNormalInWorldFrame().set(EuclidCoreRandomTools.nextVector3D(random)); return next; }
public static SO3TrajectoryPointMessage nextSO3TrajectoryPointMessage(Random random) { SO3TrajectoryPointMessage next = new SO3TrajectoryPointMessage(); next.setTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.01)); next.getOrientation().set(RandomGeometry.nextQuaternion(random)); next.getAngularVelocity().set(RandomGeometry.nextVector3D(random)); return next; }
public static EuclideanTrajectoryPointMessage nextEuclideanTrajectoryPointMessage(Random random) { EuclideanTrajectoryPointMessage next = new EuclideanTrajectoryPointMessage(); next.setTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.01)); next.getPosition().set(RandomGeometry.nextPoint3D(random, 1.0, 1.0, 1.0)); next.getLinearVelocity().set(RandomGeometry.nextVector3D(random)); return next; }
public static FootstepDataMessage nextFootstepDataMessage(Random random) { FootstepDataMessage next = new FootstepDataMessage(); next.setRobotSide(RobotSide.generateRandomRobotSide(random).toByte()); next.getLocation().set(EuclidCoreRandomTools.nextPoint3D(random)); next.getOrientation().set(EuclidCoreRandomTools.nextQuaternion(random)); IntStream.range(0, random.nextInt(10)).forEach(i -> next.getPredictedContactPoints2d().add().set(EuclidCoreRandomTools.nextPoint2D(random))); next.setTrajectoryType(RandomNumbers.nextEnum(random, TrajectoryType.class).toByte()); next.setSwingHeight(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); if (next.getTrajectoryType() == TrajectoryType.CUSTOM.toByte()) { next.getCustomPositionWaypoints().add().set(RandomGeometry.nextPoint3D(random, -10.0, 10.0)); next.getCustomPositionWaypoints().add().set(RandomGeometry.nextPoint3D(random, -10.0, 10.0)); } else if (next.getTrajectoryType() == TrajectoryType.WAYPOINTS.toByte()) { MessageTools.copyData(nextSE3TrajectoryPointMessages(random), next.getSwingTrajectory()); } next.setSwingTrajectoryBlendDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setSwingDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setTransferDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setTouchdownDuration(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setExecutionDelayTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); return next; }
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; }
public static FootLoadBearingMessage nextFootLoadBearingMessage(Random random) { FootLoadBearingMessage next = new FootLoadBearingMessage(); next.setRobotSide(RobotSide.generateRandomRobotSide(random).toByte()); next.setExecutionDelayTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.1)); next.setLoadBearingRequest(RandomNumbers.nextEnum(random, LoadBearingRequest.class).toByte()); return next; }
public static GoHomeMessage nextGoHomeMessage(Random random) { GoHomeMessage next = new GoHomeMessage(); next.setHumanoidBodyPart(RandomNumbers.nextEnum(random, HumanoidBodyPart.class).toByte()); next.setRobotSide(RandomNumbers.nextEnum(random, RobotSide.class).toByte()); next.setTrajectoryTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.01)); return next; }
public static SE3TrajectoryPointMessage nextSE3TrajectoryPointMessage(Random random) { SE3TrajectoryPointMessage next = new SE3TrajectoryPointMessage(); next.setTime(RandomNumbers.nextDoubleWithEdgeCases(random, 0.01)); next.getPosition().set(RandomGeometry.nextPoint3D(random, 1.0, 1.0, 1.0)); next.getOrientation().set(RandomGeometry.nextQuaternion(random)); next.getLinearVelocity().set(RandomGeometry.nextVector3D(random)); next.getAngularVelocity().set(RandomGeometry.nextVector3D(random)); return next; }