robots
robots copied to clipboard
feat: mobile-base action contract (velocity commands) for lerobot_local
Summary
Define and implement a velocity / base-command action contract for wheeled mobile
bases (LeKiwi, EarthRover) so lerobot_local and hardware_robot.py can drive
them, distinct from the joint-position contract used by arms.
Motivation
The Policy ABC returns per-step dicts keyed by joint/actuator name with position-style targets - correct for arms and humanoids. Wheeled mobile bases are commanded in base velocities (vx, vy, omega) or wheel velocities, not joint positions. Without an explicit contract, mobile robots either misbehave or rely on undocumented coercion. This is the gap surfaced by the HW lane (issue #H).
Scope
- Define the mobile-base action schema (e.g. well-known keys
base_velocity: [vx, vy, omega]and/or per-wheel velocities) and document it on the Policy ABC alongside the existingtarget_pose/target_jointswell-known kwargs. - Adapter in
lerobot_local(and/orhardware_robot.py) that maps these to the corresponding LeRobot mobile action space forlekiwi/earthrover. - Reject silently-dropped mobile commands on arm robots and vice-versa (raise, per the "no silent drops" project rule).
Acceptance criteria
- [ ] Mobile-base action schema documented on the Policy ABC.
- [ ]
lerobot_localdrives alekiwi(sim-stub or real) with base-velocity commands. - [ ] Sending base-velocity to a joint-position arm raises a clear error (and vice-versa).
- [ ] Unit tests for the adapter mapping + the cross-type rejection.
- [ ]
hatch run format && lint && testclean. README/docs updated.
Dependencies
- Pairs with issue #H (HW-in-the-loop lane). #H exercises it on real hardware.
References
- Policy ABC:
strands_robots/policies/base.py. strands_robots/hardware_robot.py,policies/lerobot_local/.