se3labs.sdk.examples.straight_lineStraight Line Motion
Five 40 cm straight-line traversals out and back, using YAM MuJoCo IK.
MuJoCo and SciPy are SDK dependencies. The minimal YAM kinematic model is bundled with this package. Run it on a station::
se3labs eval run --station <id> --address <host:port> --request se3labs.sdk.examples.straight_line:STRAIGHT_LINE_REQUEST
The left arm moves along base-frame Y, ±0.20 m about the flange position at [0, 1.5, 1.5, 0, 0, 0] rad. Fixed orientation makes every rigidly attached tool point trace the same displacement. Other arms stay at zero, grippers open. Each cycle starts at -20 cm, reaches +20 cm, and returns in 10 s, with cosine easing at the ends. Five cycles take 50 s; then targets hold.
IK and joint-limit checks run before the start walk. These are kinematic checks, not the daemon's planned collision/workspace/speed safety layer.
STRAIGHT_LINE_REQUEST
STRAIGHT_LINE_REQUEST = JobRequest(tasks=(STRAIGHT_LINE_TASK,), policy=StraightLine())
STRAIGHT_LINE_TASK
STRAIGHT_LINE_TASK = Task_Spec(name='yam_straight_line', description='Move the left YAM arm along a 40 cm line and back five times, with fixed tool orientation.', reset_instruction="Clear the left arm's sweep and leave the gripper empty.", max_rollout_time=52.0, scoring=Task_ScoreSheet(success=Task_ScoreItem('straight_line', 'Did the arm complete five straight-line cycles?', Task_ScoreKind.Binary)))
YAM_MODEL
YAM_MODEL = str(Path(__file__).with_name('yam_kinematics.xml'))
StraightLine
StraightLine(*, arm_name: str = 'left')
Precompute bounded IK, then submit one complete station-clock trajectory.
No resume: the trajectory is fixed in advance, so a takeover is never handed back.
Attributes
RATE = 50.0#CYCLE_S = 10.0#CYCLES = 5#AMPLITUDE_M = 0.2#CENTER_Q = (0.0, 1.5, 1.5, 0.0, 0.0, 0.0)#arm_name#
Methods
initialize(station: Station_Spec, task: Task_Spec) -> Station_JointPose#plan() -> NDArray[np.float32]#infer(observation: Station_Observation) -> Station_ActionChunk | None#reset() -> None#