跳转到内容

正在加载搜索…

motion

此内容尚不支持你的语言。

Bounded arm and gripper motions: planned and retimed paths, arrival checks, home.

  • Layer: base
  • Needs: –
  • Requires: –
  • Conflicts with: –
  • Never dropped: yes
  • Mixin: skills.motion:Motion
  • Manifest: skills/motion/skill.toml
def move_joints(arm, joints, speed=None, max_seconds=None, region=None, until=None)

speed: rad/s of the fastest joint; None keeps the planner’s timing.

def move_eef(arm, pose, speed=None, max_seconds=None, region=None, until=None)

speed: m/s of link6 from its current position to the target; None keeps the planner’s timing.

def open_gripper(arm, width=1.0, max_seconds=1.5)

Command the gripper of arm to width (1 open, 0 closed) and wait, at most max_seconds, until the opening settles (without a measured opening: for the gripper’s full stroke time). Returns the trace; running out of time is COMPLETED.

def close_gripper(arm, max_seconds=1.5)

Close the gripper; the trace’s event detail gives the measured opening and whether something is between the fingers (holding).

def holding(arm)

True when the gripper of arm is closed on something: it was last commanded closed and its measured opening is clearly above the empty closed reading of this embodiment (without a measured opening: the vision model sees an object between the fingers in the wrist camera’s view, asked once per robot state).

def hold(seconds)

Keep the current targets for a number of seconds (sim time).

def home(arms=ARMS, speed=HOME_SPEED)

Move the arms back to the joints they started the episode at (grippers as they are): the pose a learned policy’s demonstrations start from. All arms move at once in one execution, at speed rad/s of the fastest joint (None: the planner’s slower timing). Returns one trace per arm.

From the RoboDojo prompt pack (prompts/robodojo/), with every skill and feature on:

move_joints(arm, joints6, speed=None, max_seconds=None, region=None, until=None)
move_eef(arm, pose, speed=None, max_seconds=None, region=None, until=None)
open_gripper(arm, width=1.0, max_seconds=1.5)
close_gripper(arm, max_seconds=1.5) trace.event.detail has "opening" and "holding"
holding(arm) -> bool the gripper is closed on something (opening clearly above
the empty reading); check it after closing and after lifting
hold(seconds)
home(arms=("left_arm", "right_arm"), speed=2.5) -> [Trace, Trace] moves the arms back to
their start joints, both at once (grippers as they are).