Skip to content

[ROB-1511] feat(flow_base): expose all motor pos/vel/torque in observation#58

Merged
nu-jliu merged 1 commit into
mainfrom
dev/flowbase-obs
Jun 25, 2026
Merged

[ROB-1511] feat(flow_base): expose all motor pos/vel/torque in observation#58
nu-jliu merged 1 commit into
mainfrom
dev/flowbase-obs

Conversation

@nu-jliu

@nu-jliu nu-jliu commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Extend the flow_base observation so a client gets full per-motor state — position, velocity, and torque — for all 8 base motors plus the 9th (linear rail) motor when enabled. Previously the observation carried only wheel velocities (no position, no torque) and the linear rail reported no torque, leaving the data schema misaligned with the gello/yam motor-chain nodes. The data was already read every control cycle (MotorInfo.eff); this change just stops discarding it. Closes ROB-1511.

Changes

  • i2rt/flow_base/flow_base_controller.py: renamed Vehicle.get_wheel_speedsget_wheel_states and rewrote it to return full per-motor state (pos/vel/eff) for the 8 base motors via a single cached read_states() call, grouped steer/drive; added an eff (torque, Nm) field to LinearRailVehicle.get_linear_rail_state so the 9th motor's torque is reported; updated server.bind to "get_wheel_states".
  • i2rt/flow_base/flow_base_client.py: renamed FlowBaseClient.get_wheel_speedsget_wheel_states (method, RPC call, CLI command, docstring) and switched get_observation to the wheel_states key, so get_observation() now returns pos/vel/torque for all 8/9 motors.
  • i2rt/flow_base/README.md: documented the new wheel_states observation key + get_wheel_states output, and added the rail eff (torque) field to the get_linear_rail_state output example.

How to Test

8-motor base (no linear rail)

  • Start controller: python -m i2rt.flow_base.flow_base_controller --channel <can_channel>
  • python -m i2rt.flow_base.flow_base_client --command get_wheel_states prints steer and drive, each with pos/vel/eff arrays of length 4.
  • python -m i2rt.flow_base.flow_base_client --command get_observation includes a wheel_states key and no linear_rail key.
  • Back-drive / load a wheel by hand and confirm the matching eff value moves off ~0 (torque is live).

9-motor base (with linear rail)

  • Start controller with rail: python -m i2rt.flow_base.flow_base_controller --channel <can_channel> --linear-rail
  • python -m i2rt.flow_base.flow_base_client --command get_linear_rail_state --with-linear-rail output now includes an eff field; push/hold the rail and confirm it changes.
  • python -m i2rt.flow_base.flow_base_client --command get_observation --with-linear-rail contains full wheel_states (8 motors) + linear_rail (9th, incl. eff) = all 9 motors' pos/vel/torque.

Regression

  • python -m i2rt.flow_base.flow_base_client --command get_odometry is unchanged.
  • Controller logs no new "Step time … ms" warnings (the extra cached read_states in the RPC handlers doesn't disturb the control loop).

🤖 Generated with Claude Code

- flow_base/flow_base_controller.py: rename Vehicle.get_wheel_speeds → get_wheel_states and return full per-motor state (pos/vel/eff) for the 8 base motors via a single read_states() call, grouped steer/drive; surface the 9th (linear rail) motor's torque by adding an eff field to get_linear_rail_state; update server.bind to "get_wheel_states"
- flow_base/flow_base_client.py: rename get_wheel_speeds → get_wheel_states (method, RPC call, CLI command, docstring) and switch get_observation to the wheel_states key so it now carries all 8/9 motors' pos/vel/torque
- flow_base/README.md: document the new wheel_states observation key/output and the rail eff (torque) field

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nu-jliu nu-jliu merged commit 570ef66 into main Jun 25, 2026
4 checks passed
@nu-jliu nu-jliu deleted the dev/flowbase-obs branch June 25, 2026 11:48
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