Skip to content

feat(world): the floor follows the chair's height (planner config ground) - #77

Draft
SwapnilPande wants to merge 1 commit into
devfrom
feature/ground-from-tf
Draft

SwapnilPande wants to merge 1 commit into
devfrom
feature/ground-from-tf

Conversation

@SwapnilPande

Copy link
Copy Markdown
Member

Summary

Seat elevation is coming (RAMMP-mib-fw #95/#96). The arm is mounted on the seat, so when the seat goes up the chair and occupant layers stay where they are in arm_mount, but the floor drops. This PR makes the floor layer follow TF.

  • Planner config: ground: {layer: floor, frame: base_footprint}. Off when absent, so every existing robot plans exactly as before.
  • Node: with ground, it starts a tf2_ros listener and, before every plan, looks up arm_mount <- base_footprint. It then moves the floor layer so the layer's top sits on that frame's z = 0.
  • The plan is refused when the transform is missing, when the ground is tilted more than 2° in arm_mount (we only move the floor up and down; tilt comes later with the MIB's pitch/roll), or when the planner refuses the moved floor (for example, the floor reaching the arm's base spheres).
  • Core: CuRoboPlanner.set_ground(z) re-places the floor in the installed world. The rest of the world is left alone, and anything an ignore= push excluded stays excluded. The new height carries into every later world (update_world, add_obstacles, reset). A change under 1 mm sends cuRobo nothing; a real change is an in-place update_world, so the CUDA graphs stay valid. geometry.ground_plane gives the plane's height under arm_mount and its tilt.

Scope, as agreed in #flatbot-support: scene objects pushed with set_world are not moved. They're perceived through TF at the current seat height and planned right away, so they're already correct. A scene perceived before a lift and reused after it is the case this leaves out.

Enabling it

Nothing in rammp-deployments turns this on yet. base_footprint doesn't exist until the MIB publishes odom -> base_footprint -> base_link (RAMMP-mib-fw #95). Until then, frame: base_link on gen_1_5 reproduces today's floor through TF: world.yaml puts arm_mount 0.5020 m above base_link, and the floor layer's top is at -0.5019. That makes it a way to check the plumbing on the robot first.

Open questions

  • No staleness check on the transform. The seat only moves through the MIB, so a silent MIB means a still seat. That assumption breaks if the MIB ever publishes the chassis pose on a schedule unrelated to the legs moving.

Tests

  • core/tests/test_planner_cpu.py: the floor moves and nothing else does; the height holds through a push with ignore=, add_obstacles and reset; a ground reaching the arm's base is refused and the old one kept; a ground without a frame is refused; ground_plane's height and tilt. 41 passed (CPU).
  • rammp_curobo_ros/test/test_ground.py: no lookup without ground, the floor goes where TF says, and a missing transform, a tilted ground or a planner refusal each refuse the plan. Full node suite in ros:humble-ros-base as CI runs it: 67 passed. The existing test fakes gained ground_frame = None.
  • Not run: the GPU suite, and nothing on the robot.

🤖 Generated with Claude Code

…ound`)

With `ground: {layer: floor, frame: base_footprint}` in the planner config,
the node looks up arm_mount <- base_footprint before every plan and moves the
floor layer's boxes so their top is on that frame's z = 0. The arm rides on
the seat, so the chair and occupant layers stay put in arm_mount; only the
floor moves when the seat elevates. No transform, a ground tilted more than
2 deg, or a moved floor the planner refuses (reaching the arm's base) refuses
the plan. Off unless configured.

Core: CuRoboPlanner.set_ground(z), applied to every later world (pushes,
add_obstacles, reset), and geometry.ground_plane. Node: tf2_ros listener,
created only with `ground`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant