Skip to content

Fix README CLI-flag docs and markdown syntax#52

Merged
nu-jliu merged 2 commits into
mainfrom
fix/readme-cli-flag-docs
Jun 15, 2026
Merged

Fix README CLI-flag docs and markdown syntax#52
nu-jliu merged 2 commits into
mainfrom
fix/readme-cli-flag-docs

Conversation

@nu-jliu

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

Copy link
Copy Markdown
Contributor

Summary

Corrects documentation defects across the repo's READMEs that were found by auditing every documented CLI command/flag against the actual arg parsers, plus two markdown-rendering/link fixes. Also makes one small source change so the viser tool rejects an arm choice that produces a degenerate (dead-IK) session. Several of these were hard breaks — documented commands that fail outright (wrong flag name, wrong script path, broken Python import).

Changes

  • devices/pi_setup.md: split two malformed single-line code fences (```bash ... ```) into proper multi-line blocks; the unclosed fence made the rest of the doc render as one code block
  • examples/bimanual_lead_follower/README.md: repoint broken link from the moved guide ../../doc/set_persist_id_socket_can.md to ../../docs/guides/set-persistent-can-ids.md
  • i2rt/flow_base/README.md: fix speed/accel source link anchor #L500-L501 -> #L742-L743 (the actual max_vel/max_accel definitions)
  • README.md: fix CLI flag --gripper_type -> --gripper (motor_chain_robot defines --gripper); fix Python API import to i2rt.robots.get_robot and pass GripperType.LINEAR_4310 (a string raised AttributeError via gripper_type.get_xml_path()); use the canonical tyro flag --bilateral-kp
  • examples/control_with_mujoco/README.md: add no_arm to --arm and flexible_4310 to --gripper (choices are built from the full enums); correct --site (default is auto-detected from gripper, not grasp_site)
  • examples/control_with_viser/control_with_viser.py: exclude ArmType.NO_ARM from --arm choices; the viewer's IK and arm-joint modes are degenerate with no arm (_n_arm=0)
  • examples/control_with_viser/README.md: add flexible_4310 to --gripper; keep --arm at the four supported variants to match the restricted choices
  • examples/single_motor_position_pd_control/README.md: correct script path to examples/single_motor_position_pd_control/single_motor_position_pd_control.py (was a non-existent i2rt/scripts/single_motor_pd_pos_control.py)

Test Plan

  • Markdown render (GitHub): open devices/pi_setup.md in the PR diff and confirm sections 4 & 5 render as real code blocks (not one giant block); confirm the bimanual link and the flow_base #L742-L743 anchor both resolve.
  • viser choices (no hardware): python examples/control_with_viser/control_with_viser.py --help shows --arm {yam,yam_pro,yam_ultra,big_yam} and flexible_4310 in --gripper; python examples/control_with_viser/control_with_viser.py --arm no_arm --sim exits with error: argument --arm: invalid choice: 'no_arm'.
  • mujoco choices (no hardware): python examples/control_with_mujoco/control_with_mujoco.py --help shows no_arm in --arm and flexible_4310 in --gripper.
  • minimum_gello flag (no hardware): python examples/minimum_gello/minimum_gello.py --help lists --bilateral-kp (and accepts it).
  • single_motor path: examples/single_motor_position_pd_control/single_motor_position_pd_control.py exists and defines --channel, --motor_id, --kd.
  • Python API (full env): python -c "from i2rt.robots.get_robot import get_yam_robot; from i2rt.robots.utils import GripperType; get_yam_robot(channel='can0', gripper_type=GripperType.LINEAR_4310, sim=True)" runs with no ImportError/AttributeError.
  • Hardware (optional): on a station with CAN, python i2rt/robots/motor_chain_robot.py --channel can0 --gripper linear_4310 starts in zero-gravity mode.

🤖 Generated with Claude Code

nu-jliu and others added 2 commits June 11, 2026 16:50
- devices/pi_setup.md: split two malformed single-line code fences (```bash ... ```) into proper multi-line blocks; the unclosed fence made the rest of the doc render as one code block
- examples/bimanual_lead_follower/README.md: repoint broken link to the moved guide (../../doc/set_persist_id_socket_can.md -> ../../docs/guides/set-persistent-can-ids.md)
- i2rt/flow_base/README.md: fix speed/accel link anchor #L500-L501 -> #L742-L743 (the actual max_vel/max_accel definitions)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ices

- README.md: fix CLI flag --gripper_type -> --gripper (motor_chain_robot defines --gripper); fix Python API import to i2rt.robots.get_robot and pass GripperType.LINEAR_4310 enum (a string raised AttributeError); use canonical tyro flag --bilateral-kp
- examples/control_with_mujoco/README.md: add no_arm to --arm and flexible_4310 to --gripper (choices are built from the full enums); correct --site (default is auto-detected, not grasp_site)
- examples/control_with_viser/control_with_viser.py: exclude ArmType.NO_ARM from --arm choices; the viewer's IK and arm-joint modes are degenerate with no arm (_n_arm=0)
- examples/control_with_viser/README.md: add flexible_4310 to --gripper; keep --arm at the four supported variants to match the restricted choices
- examples/single_motor_position_pd_control/README.md: correct script path to examples/single_motor_position_pd_control/single_motor_position_pd_control.py

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nu-jliu nu-jliu merged commit 78b1ba1 into main Jun 15, 2026
2 checks passed
@nu-jliu nu-jliu deleted the fix/readme-cli-flag-docs branch June 15, 2026 05:09
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