diff --git a/docs/concepts/architecture.md b/docs/concepts/architecture.md index 51c096c..d44c2f4 100644 --- a/docs/concepts/architecture.md +++ b/docs/concepts/architecture.md @@ -249,7 +249,7 @@ The shipping configuration is a **two-machine tethered split**. The same colcon workspace is installed (and built from the same pixi lock file) on both machines; each launch boots only the subset of nodes that belongs on its side. Single-machine sim/dev paths -(`bar_bringup_lite/mujoco.launch.py`, `bar_description_lite/view_lite.launch.py`, +(`bar_bringup_lite/mujoco.launch.py`, `bar_bringup_lite/view_lite.launch.py`, `bar_bringup_lite/calibrate.launch.py`) are unaffected — they collapse both sides into one process tree. diff --git a/docs/concepts/mit_command_surface.md b/docs/concepts/mit_command_surface.md index 44831c1..24ad140 100644 --- a/docs/concepts/mit_command_surface.md +++ b/docs/concepts/mit_command_surface.md @@ -83,7 +83,7 @@ projects. Three properties make it the right primitive: The five command interfaces and three state interfaces are declared per-joint inside each `` block. From -`bar_description_lite/urdf/lite.ros2_control.xacro`: +`lite_description/robots/lite_dummy/xacro/lite_dummy.ros2_control.xacro`: ```xml diff --git a/docs/getting_started/installation.md b/docs/getting_started/installation.md index 217caaa..f1b172e 100644 --- a/docs/getting_started/installation.md +++ b/docs/getting_started/installation.md @@ -81,7 +81,7 @@ platforms = ["linux-64", "linux-aarch64"] # `view` / `viz` launches. ros-jazzy-ros-base = "*" # The whole Lite bringup: bar_controllers (ONNX-enabled), bar_msgs, -# bar_description_lite, bar_robstride, bar_socketcan, bar_common, bar_policy. +# lite_description, bar_robstride, bar_socketcan, bar_common, bar_policy. ros-jazzy-bar-bringup-lite = "*" # Optional: the `bar` diagnostic CLI (run via `ros2 run bar_cli bar ...`). ros-jazzy-bar-cli = "*" @@ -227,7 +227,7 @@ ros2 control list_hardware_interfaces 2>/dev/null \ || echo "(no controller_manager running yet — expected)" ``` -The 12 `bar_ros2` packages: +The 11 `bar_ros2` packages (Lite's `lite_description` comes separately, via `bar.repos`): ``` bar_bringup_lite @@ -235,7 +235,6 @@ bar_bringup_prime bar_cli bar_common bar_controllers -bar_description_lite bar_description_prime bar_robstride bar_sito diff --git a/docs/getting_started/lite_101.md b/docs/getting_started/lite_101.md index 310867f..3cfa8db 100644 --- a/docs/getting_started/lite_101.md +++ b/docs/getting_started/lite_101.md @@ -35,7 +35,7 @@ The simplest possible launch: `robot_state_publisher` + a the kinematic chain. ```sh -ros2 launch bar_description_lite view_lite.launch.py +ros2 launch bar_bringup_lite view_lite.launch.py ``` What you'll see: @@ -225,7 +225,7 @@ Four moving pieces, all worth recognising for the rest of the docs: | Piece | What it does | |---|---| -| **URDF** (`bar_description_lite`) | Kinematic + dynamic description. Same file across mock / sim / real — the `` `` is the only difference. | +| **URDF** (`lite_description`) | Kinematic + dynamic description. Same file across mock / sim / real — the `` `` is the only difference. | | **`controller_manager`** | Hosts the hardware plugin + every controller. The "tick loop" of the system. Update rate 50 Hz here. | | **Mode-FSM controllers** (`bar_controllers`) | Five plugins, one active at a time. `zero_torque` (safe default), `damping` (compliant fail-safe), `standby` (interpolate to a pose), `rl_policy` (in-process ONNX — the System 0 learned-policy tier), `remote_policy` (System 1/2 external-command ingress for non-real-time `MITCommand` sources). | | **MuJoCo / Robstride** (the simulation / real backend) | Where the MIT torque actually gets applied. Same five command interfaces in both. | diff --git a/docs/how_to/add_new_joint.md b/docs/how_to/add_new_joint.md index 8b18696..e3d5575 100644 --- a/docs/how_to/add_new_joint.md +++ b/docs/how_to/add_new_joint.md @@ -15,12 +15,21 @@ Five files in three packages: | File | Purpose | |---|---| -| `bar_description_lite/urdf/lite.urdf.xacro` | Kinematic chain: link, joint axis, limits, mass, mesh | -| `bar_description_lite/urdf/lite.ros2_control.xacro` | `` block — which CAN bus, model, direction, command/state interfaces | -| `bar_description_lite/mjcf/lite.xml` | MuJoCo model (if you want sim parity) | +| `lite_description/robots/lite_dummy/xacro/lite_dummy.urdf.xacro` | Kinematic chain: link, joint axis, limits, mass, mesh | +| `lite_description/robots/lite_dummy/xacro/lite_dummy.ros2_control.xacro` | `` block — which CAN bus, model, direction, command/state interfaces | +| `lite_description/robots/lite_dummy/mjcf/lite_dummy.xml` | MuJoCo model (if you want sim parity) | | `bar_controllers/config/bar_lite_controllers.yaml` | `joints:` list for every controller + per-joint K/D / standby pose entries | | `bar_bringup_lite/config/calibration.yaml` | `homing_offset` for the new joint (created via [Calibrate the zero pose](./calibrate_zero_pose.md)) | +> **Heads-up — the Lite description is generated.** The three `lite_description` +> files above are build artifacts of the external +> [`Lite-Description`](https://github.com/Berkeley-Humanoids/Lite-Description) repo, +> produced from Onshape CAD. The canonical way to add a joint is to edit +> `robots/lite_dummy/cad/*` there, run `robot-assets-generate lite_dummy`, and bump +> the `lite_description` pin in `bar.repos` — **not** to hand-edit the committed +> `xacro` / `urdf` / `mjcf`. The steps below describe the URDF changes the +> generator ultimately produces. + ## Step 1 — Add the link + joint to `lite.urdf.xacro` ```xml @@ -53,16 +62,16 @@ separate `can_interface_neck`). The neck case wants a third block: ```xml - - + - - @@ -76,7 +85,7 @@ macro inside the existing combined block. Verify the URDF expands cleanly (inside `pixi shell`): ```bash -xacro $(ros2 pkg prefix bar_description_lite)/share/bar_description_lite/urdf/lite.urdf.xacro \ +xacro $(ros2 pkg prefix lite_description)/share/lite_description/robots/lite_dummy/xacro/lite_dummy.urdf.xacro \ use_fake_hardware:=false use_sim:=false calibration_file:='' \ > /tmp/expanded.urdf ``` diff --git a/docs/how_to/live_viz.md b/docs/how_to/live_viz.md index d562fcb..51b3bd1 100644 --- a/docs/how_to/live_viz.md +++ b/docs/how_to/live_viz.md @@ -102,7 +102,7 @@ per-`/lite/joint_states` callback + a tf update. | Symptom | Cause | |---|---| -| Window opens but robot is blank / collapsed | Mesh `package://` URLs not resolving. Make sure `bar_description_lite`'s install is on `AMENT_PREFIX_PATH` (pixi activation does this automatically once you `pixi shell` into `bar_ws/`). | +| Window opens but robot is blank / collapsed | Mesh `package://` URLs not resolving. Make sure `lite_description`'s install is on `AMENT_PREFIX_PATH` (pixi activation does this automatically once you `pixi shell` into `bar_ws/`). | | `rerun_viz` says `ModuleNotFoundError: No module named 'rerun'` | The pixi env wasn't entered — run `cd bar_ws && pixi shell` first, then `ros2 run bar_bringup_lite rerun_viz`. | | `viser_viz` complains about a missing `scipy` symbol | Stale env. Re-run `pixi install` to resync against `pixi.lock`. | | Browser at `:8080` shows "this site can't be reached" | `viser_viz` not running — start it via `ros2 launch bar_bringup_lite viz.launch.py` (default viewer is `viser`), or wrong host in the URL. | diff --git a/docs/how_to/use_pixi_tasks.md b/docs/how_to/use_pixi_tasks.md index 56f7448..24bbe57 100644 --- a/docs/how_to/use_pixi_tasks.md +++ b/docs/how_to/use_pixi_tasks.md @@ -53,7 +53,7 @@ extra arguments after the alias are forwarded unchanged. | Alias | Equivalent | Side | |---|---|---| -| `pixi run view` | `ros2 launch bar_description_lite view_lite.launch.py` | dev — URDF inspector | +| `pixi run view` | `ros2 launch bar_bringup_lite view_lite.launch.py` | dev — URDF inspector | | `pixi run launch-mujoco` | `ros2 launch bar_bringup_lite mujoco.launch.py` | dev — full Lite controller stack in MuJoCo | | `pixi run launch-real` | `ros2 launch bar_bringup_lite real.launch.py` | robot — real-hardware Lite bringup | | `pixi run launch-viz` | `ros2 launch bar_bringup_lite viz.launch.py` | host — live URDF + joint-state viewer (`viewer:=viser\|rerun`) | diff --git a/docs/reference/hardware_specs.md b/docs/reference/hardware_specs.md index 7542cce..bb51b10 100644 --- a/docs/reference/hardware_specs.md +++ b/docs/reference/hardware_specs.md @@ -44,13 +44,16 @@ policy is trained against this order, it is frozen — see "Frozen schemas" in `neck_pitch`, all rs-00-class with `K_p ≈ 30`, `K_d ≈ 1`.) :::tip[Where these numbers come from] -Per-joint static config (CAN id, model, direction, position limits, torque -cap, current cap) is the **single source of truth** in -[`bar_description_lite/urdf/lite.ros2_control.xacro`](https://github.com/T-K-233/bar_ros2/blob/main/bar_description_lite/urdf/lite.ros2_control.xacro). -Each value appears once, as a xacro arg on the `lite_joint` macro call: +Per-joint hardware facts (CAN id, model, direction, torque cap, current cap) +live in the CAD input +[`robots/lite_dummy/cad/ros2_control.json`](https://github.com/Berkeley-Humanoids/Lite-Description/blob/main/robots/lite_dummy/cad/ros2_control.json); +position limits come from the URDF (also from CAD). The generator expands both +into the ``s of the **generated** `lite_dummy.ros2_control.xacro` — each +value appears as a xacro arg on a `lite_dummy_joint` macro call (don't hand-edit +the generated file): ```xml - @@ -62,7 +65,7 @@ xacro expands those into `` children on the `` element, which the Robstride parameter IDs `0x700B` and `0x7018` — same writes the upstream `T-K-233/Lite-Lowlevel-Python`'s `humanoid_control/control.py` performs). Initial values were mirrored from that repo's `configs/bimanual.yaml`; if -upstream retunes, edit them here in lockstep. +upstream retunes, edit `ros2_control.json` and regenerate (see below). Default stiffness / damping reflects a conservative MIT-mode setting suitable for first activation; tune per deployment. @@ -76,26 +79,32 @@ them, regardless of what a policy publishes. They're an upper bound, not a target. Lower them when bringing up a new policy on the bench; raise them once the motion envelope is verified. -**Edit-rebuild loop**: +**Edit-rebuild loop** — the caps live in the CAD input, so the retune happens in +the `lite_description` repo and flows back through `bar.repos`: -1. Open `bar_description_lite/urdf/lite.ros2_control.xacro`. -2. Find the `` call for the joint you - want to retune (one per arm in `lite_left_arm_joints` / - `lite_right_arm_joints` macros). -3. Edit the `torque_limit="…"` (N·m, float) and / or `current_limit="…"` - (A, float) attributes in place. -4. Rebuild and re-launch: +1. In the `lite_description` repo, edit the joint's `torque_limit` (N·m, float) + and / or `current_limit` (A, float) in `robots/lite_dummy/cad/ros2_control.json`. +2. Regenerate the xacro: `uv run robot-assets-generate lite_dummy --only xacro`. +3. Commit + push; bump the `lite_description` pin in `bar_ros2`'s `bar.repos` + (keep the buildfarm's in sync). +4. Re-import, rebuild, and re-launch: ```sh cd /bar_ws pixi shell - colcon build --symlink-install --packages-select bar_description_lite + pixi run setup # vcs import — pulls the regenerated lite_description + colcon build --symlink-install --packages-select lite_description # If a bringup is already running, Ctrl+C it first — the firmware-side # caps are written on the `on_activate` transition, so an already- # activated plugin won't pick up the new value until the next bringup. ros2 launch bar_bringup_lite real.launch.py ``` + For a throwaway bench experiment, edit the caps directly in the vcs-imported + `src/lite_description/.../lite_dummy.ros2_control.xacro` and `colcon build` — + but that copy is overwritten on the next `pixi run setup`, so fold any keeper + change back into `ros2_control.json` upstream. + 5. Confirm in the bringup log that the new value flowed through: ``` diff --git a/docs/reference/launch_args.md b/docs/reference/launch_args.md index 44d91e4..1ce53ba 100644 --- a/docs/reference/launch_args.md +++ b/docs/reference/launch_args.md @@ -10,13 +10,13 @@ bundled launch enables that path. Launches live in two repos: - `bar_ros2` ships the Lite + Prime control-plane bringups (`bar_bringup_lite`, - `bar_bringup_prime`), the URDF inspector (`bar_description_lite`), + `bar_bringup_prime`), the URDF inspector (`bar_bringup_lite`), and the policy prepare-and-load launches (`bar_policy`). - `pianist_ros2` ships piano-task-specific launches: scene composition (`pianist_bringup`), the piano prepare-and-load launch, and the USB-MIDI driver (both `pianist_policy`). -## `bar_description_lite/launch/view_lite.launch.py` +## `bar_bringup_lite/launch/view_lite.launch.py` URDF inspector — no controller_manager, no physics. @@ -108,14 +108,14 @@ plugin). |---|---|---| | `mode` | `arms` | Same as the real bringup. `arms` (14 joints) or `arms_neck` (17 joints). | | `hardware_config` | `` | Same as the real bringup; the bus mapping is unused in MuJoCo but the joint list is read. | -| `scene` | `lite` | MJCF scene basename under `bar_description_lite/mjcf/`. Default `lite` (robot only). Task packages from sibling repos (e.g. `pianist_ros2`'s `pianist_bringup`) compose their own runtime scene XML and override this arg with their composed-file basename. | +| `scene` | `lite_dummy` | MJCF scene basename under `lite_description/robots/lite_dummy/mjcf/`. Default `lite_dummy` (robot only). Task packages from sibling repos (e.g. `pianist_ros2`'s `pianist_bringup`) compose their own runtime scene XML and override this arg with their composed-file basename. | | `enable_gamepad` | `true` | Same hard-fail-on-missing-`/dev/input/js*` behaviour as the real bringup. | Implicit: - The xacro is invoked with `use_sim:=true`. **`use_sim` wins over `use_fake_hardware`** in the xacro's `` selector — see the - decision tree in [Packages](packages.md#bar_description_lite--bar_description_prime). + decision tree in [Packages](packages.md#lite_description-external--bar_description_prime). - Every node runs with `use_sim_time:=true`. Time advances at MuJoCo's pace via `/clock`. - `bar_bringup_lite/config/sim_overrides.yaml` is layered on top of @@ -204,7 +204,7 @@ apart. MuJoCo bringup for the piano task. Composes the Lite robot and the piano MJCF into one scene file (`_runtime_lite_piano.xml`) inside -`bar_description_lite`'s MJCF share dir, then delegates to +`lite_description`'s `robots/lite_dummy/mjcf/` share dir, then delegates to `bar_bringup_lite/mujoco.launch.py` with `scene:=_runtime_lite_piano`. Also spawns the `piano_state_bridge` sim-side bridge so `/piano/key_state` exists on the sim path. @@ -217,7 +217,7 @@ Also spawns the `piano_state_bridge` sim-side bridge so `scene:=` is **not** exposed — `pianist_bringup` controls that internally. -## xacro args (`bar_description_lite/urdf/lite.urdf.xacro`) +## xacro args (`lite_description/robots/lite_dummy/xacro/lite_dummy.urdf.xacro`) The launch args ultimately feed these xacro args. Useful when driving xacro directly (e.g. in a sim2sim eval harness): @@ -241,7 +241,7 @@ robot involved, no tether): ```sh # Drag joints in RViz, no controllers. -ros2 launch bar_description_lite view_lite.launch.py +ros2 launch bar_bringup_lite view_lite.launch.py # MuJoCo physics, /clock from sim time. ros2 launch bar_bringup_lite mujoco.launch.py diff --git a/docs/reference/packages.md b/docs/reference/packages.md index 4c46ba6..2edcc97 100644 --- a/docs/reference/packages.md +++ b/docs/reference/packages.md @@ -75,21 +75,26 @@ wire conventions only** — no participant/transport. The `lite_sdk2` SDK builds its publisher/subscriber layer on top. See [Talk to bar_ros2 from Python](../how_to/talk_to_bar_ros2_from_python.md). -### `bar_description_lite` / `bar_description_prime` +### `lite_description` (external) / `bar_description_prime` -URDF / xacro / meshes / `` blocks. +URDF / xacro / meshes / `` blocks. **Lite's description is no longer +in `bar_ros2`** — it lives in the external, CAD-generated +[`lite_description`](https://github.com/Berkeley-Humanoids/Lite-Description) repo +(bar deploys the `lite_dummy` variant), pulled in via `bar.repos`. It is +**asset-only**: the RViz inspector (`view_lite.launch.py` + `view_lite.rviz`) now +lives in `bar_bringup_lite`. `bar_description_prime` is still an in-tree stub. -Layout (Lite shown): +Layout (Lite shown, inside the `lite_description` repo): ``` -bar_description_lite/ -├── urdf/ -│ ├── lite.urdf.xacro # top-level kinematics (mode-aware: 14 or 17 joints) -│ └── lite.ros2_control.xacro # 3-way plugin selector + per-joint static config -├── meshes/ *.stl # visual meshes -├── mjcf/ lite.xml # MuJoCo physics model -├── config/ view_lite.rviz # RViz config -└── launch/ view_lite.launch.py # standalone visualization +lite_description/robots/lite_dummy/ +├── xacro/ +│ ├── lite_dummy.urdf.xacro # top-level assembly: args + includes + instantiation +│ ├── lite_dummy.ros2_control.xacro # 3-way plugin selector + per-joint static config +│ └── lite_dummy.description.xacro # kinematics macro (base_link, mesh_root) +├── urdf/ lite_dummy.urdf # flat URDF — the generated kinematic hub +├── mjcf/ lite_dummy.xml # MuJoCo physics model +└── meshes/visual/ *.stl # visual meshes ``` The xacro selects between **three hardware backends** via args: diff --git a/docs/reference/quick_reference.md b/docs/reference/quick_reference.md index df267da..61a8d76 100644 --- a/docs/reference/quick_reference.md +++ b/docs/reference/quick_reference.md @@ -23,7 +23,7 @@ Grouped by which machine they run on. See for the split rationale. Launches come from two repos: - `bar_ros2` ships the Lite + Prime bringups (`bar_bringup_lite`, - `bar_bringup_prime`), the description viewer (`bar_description_lite`), + `bar_bringup_prime`), the description viewer (`bar_bringup_lite`), and the policy prepare-and-load launch (`bar_policy`). - `pianist_ros2` ships the piano-task launches (`pianist_bringup` composes a Lite + piano MuJoCo scene; `pianist_policy` prepares the @@ -33,7 +33,7 @@ for the split rationale. Launches come from two repos: ```bash # Drag joints in RViz — no controllers, no physics -ros2 launch bar_description_lite view_lite.launch.py +ros2 launch bar_bringup_lite view_lite.launch.py # MuJoCo sim — full controller stack, /clock from sim time ros2 launch bar_bringup_lite mujoco.launch.py diff --git a/docs/reference/urdf_args.md b/docs/reference/urdf_args.md index 86cb643..59c5277 100644 --- a/docs/reference/urdf_args.md +++ b/docs/reference/urdf_args.md @@ -5,14 +5,14 @@ title: URDF / xacro args # URDF / xacro args Full surface of the xacro arguments and per-joint URDF parameters -that `bar_description_lite` exposes. The launch files +that `lite_description` (the `lite_dummy` variant) exposes. The launch files ([Reference → Launch args](./launch_args.md)) wrap these — usually you'll only touch them directly when driving xacro from a script or extending the URDF. ## Top-level xacro arguments -Declared in `bar_description_lite/urdf/lite.urdf.xacro`: +Declared in `lite_description/robots/lite_dummy/xacro/lite_dummy.urdf.xacro`: | Arg | Default | Effect | |---|---|---| @@ -86,7 +86,7 @@ Inside the `` element of each `` block: ## Per-joint ``s (real-hardware path) -Inside each `` element. The `lite_joint` xacro macro emits +Inside each `` element. The `lite_dummy_joint` xacro macro emits these only when `use_sim` and `use_fake_hardware` are both false — mock / sim plugins ignore unknown joint params so the macro keeps the URDF clean there. @@ -153,17 +153,17 @@ Run these inside `pixi shell` (so `xacro` / `ros2 pkg` are on PATH): cd bar_ws && pixi shell # Mock / RViz path -xacro $(ros2 pkg prefix bar_description_lite)/share/bar_description_lite/urdf/lite.urdf.xacro \ +xacro $(ros2 pkg prefix lite_description)/share/lite_description/robots/lite_dummy/xacro/lite_dummy.urdf.xacro \ use_fake_hardware:=true \ > /tmp/lite_mock.urdf # MuJoCo path -xacro $(ros2 pkg prefix bar_description_lite)/share/bar_description_lite/urdf/lite.urdf.xacro \ +xacro $(ros2 pkg prefix lite_description)/share/lite_description/robots/lite_dummy/xacro/lite_dummy.urdf.xacro \ use_sim:=true \ > /tmp/lite_sim.urdf # Real-hardware path -xacro $(ros2 pkg prefix bar_description_lite)/share/bar_description_lite/urdf/lite.urdf.xacro \ +xacro $(ros2 pkg prefix lite_description)/share/lite_description/robots/lite_dummy/xacro/lite_dummy.urdf.xacro \ use_fake_hardware:=false use_sim:=false \ mode:=arms \ can_interface_left:=can0 can_interface_right:=can1 \ diff --git a/scripts/draw_diagrams.py b/scripts/draw_diagrams.py index 5e8ca1f..baf2278 100644 --- a/scripts/draw_diagrams.py +++ b/scripts/draw_diagrams.py @@ -267,7 +267,7 @@ def d_intro_01_system() -> None: s.append(Box(460, 250, 100, 50, "bar_policy", fill=GOLD_FILL, stroke=GOLD).render()) s.append(Box(340, 320, 220, 60, - ["bar_hw_robstride", "(SocketCAN)"], + ["bar_robstride", "(SocketCAN)"], fill=GREEN_FILL, stroke=GREEN).render()) # Robot @@ -328,15 +328,15 @@ def pkg(x, y, name, sub=None, fill=BLUE_FILL, stroke=BLUE): # Shared column pkg(40, 90, "bar_common", "RT helpers, MITState POD") - pkg(40, 144, "bar_msgs", "MITAction, ControlMode, ...") + pkg(40, 144, "bar_msgs", "MITCommand, ControlMode, ...") pkg(40, 198, "bar_controllers", "5 mode-FSM + mode_manager") pkg(40, 252, "bar_policy", "ONNX runner + LeRobot ref") - pkg(40, 306, "bar_hw_socketcan", "SocketCAN bus library") + pkg(40, 306, "bar_socketcan", "SocketCAN bus library") # Lite column - pkg(345, 110, "bar_description_lite", "URDF + xacro + meshes", + pkg(345, 110, "lite_description", "URDF + xacro + meshes", fill=GREEN_FILL, stroke=GREEN) - pkg(345, 180, "bar_hw_robstride", "Robstride SystemInterface", + pkg(345, 180, "bar_robstride", "Robstride SystemInterface", fill=GREEN_FILL, stroke=GREEN) pkg(345, 250, "bar_bringup_lite", "launch + controllers YAML", fill=GREEN_FILL, stroke=GREEN) @@ -344,12 +344,12 @@ def pkg(x, y, name, sub=None, fill=BLUE_FILL, stroke=BLUE): # Prime column pkg(645, 110, "bar_description_prime", "URDF + EtherCAT PDO", fill=RED_FILL, stroke=RED) - pkg(645, 180, "bar_hw_sito", "Sito SystemInterface", + pkg(645, 180, "bar_sito", "Sito SystemInterface", fill=RED_FILL, stroke=RED) pkg(645, 250, "bar_bringup_prime", "+ ethercat.yaml", fill=RED_FILL, stroke=RED) - # Arrows: bar_hw_robstride -> bar_hw_socketcan + # Arrows: bar_robstride -> bar_socketcan s.append(arrow(345, 202, 290, 320, color=GREY)) s.append(arrow(645, 202, 290, 320, color=GREY)) # bringup_lite -> description_lite + hw_robstride + controllers + policy @@ -478,7 +478,7 @@ def d_hw_can_layout() -> None: s.append(arrow(590, 155, 640, 155, label="CAN @ 1 Mbit")) s.append(text(450, 310, - "On real hardware the bar_hw_robstride plugin owns both buses; " + "On real hardware the bar_robstride plugin owns both buses; " "from the controller's perspective the 17 joints are one flat list.", size=11, anchor="middle", fill=GREY)) @@ -877,7 +877,7 @@ def d_xacro_3way() -> None: s.append(arrow(460, 215, 490, 200, label="true")) # No -> real - s.append(Box(490, 280, 230, 60, "bar_hw_robstride/", sub="RobstrideSystem", + s.append(Box(490, 280, 230, 60, "bar_robstride/", sub="RobstrideSystem", fill=RED_FILL, stroke=RED).render()) s.append(arrow(370, 240, 490, 305, label="false")) @@ -917,7 +917,7 @@ def pub(x, y, label, color=BLUE): pub(350, 100, "/standby_controller/state", GREEN) pub(350, 160, "/control_mode", GREEN) pub(350, 220, "/safety_status", GREEN) - pub(350, 280, "~/command (MITAction)", GREEN) + pub(350, 280, "~/command (MITCommand)", GREEN) pub(680, 100, "mode_manager", GOLD) pub(680, 160, "diagnostics / log", GREY) @@ -978,7 +978,7 @@ def d_arch_module_deps() -> None: fill=BLUE_FILL, stroke=BLUE).render()) s.append(Box(310, 95, 200, 40, "bar_bringup_prime", sub="(scaffold)", fill=BLUE_FILL, stroke=BLUE).render()) - s.append(Box(550, 95, 190, 40, "bar_piano", sub="MIDI replay", + s.append(Box(550, 95, 190, 40, "pianist_policy", sub="piano key-state", fill=GOLD_FILL, stroke=GOLD).render()) # Controllers + policies @@ -990,22 +990,22 @@ def d_arch_module_deps() -> None: fill=GOLD_FILL, stroke=GOLD).render()) # Hardware plugins + description - s.append(Box(70, 305, 200, 50, "bar_hw_robstride", + s.append(Box(70, 305, 200, 50, "bar_robstride", sub="RobstrideSystem", fill=GREEN_FILL, stroke=GREEN).render()) - s.append(Box(310, 305, 200, 50, "bar_hw_sito", + s.append(Box(310, 305, 200, 50, "bar_sito", sub="(stub)", fill=GREEN_FILL, stroke=GREEN).render()) - s.append(Box(550, 305, 190, 50, "bar_description_lite", + s.append(Box(550, 305, 190, 50, "lite_description", sub="URDF/xacro/MJCF", fill=GREY_FILL, stroke=GREY).render()) # Foundations - s.append(Box(70, 425, 200, 50, "bar_hw_socketcan", + s.append(Box(70, 425, 200, 50, "bar_socketcan", sub="bus library + I/O thread", fill=GREEN_FILL, stroke=GREEN).render()) s.append(Box(310, 425, 200, 50, "bar_msgs", - sub="MITAction, ControlMode, ...", + sub="MITCommand, ControlMode, ...", fill=GREY_FILL, stroke=GREY).render()) s.append(Box(550, 425, 190, 50, "bar_common", sub="MITState POD, RT helpers", @@ -1034,7 +1034,7 @@ def dep(x1, y1, x2, y2, dashed=False, color=GREY): dep(150, 135, 170, 305) # -> hw_robstride dep(210, 135, 600, 305) # -> description_lite dep(230, 135, 360, 425) # -> msgs (transitive but shown) - # bar_piano -> bar_msgs only + # pianist_policy -> bar_msgs only dep(620, 135, 400, 425, color=GREY) # bar_policy -> bar_msgs + bar_common dep(380, 245, 380, 425) @@ -1061,7 +1061,7 @@ def dep(x1, y1, x2, y2, dashed=False, color=GREY): s.append(text(60, 545, "Dashed arrow = runtime dep only (pluginlib)", size=11, anchor="start", fill=GREY)) s.append(text(60, 570, - "Note: bar_controllers does NOT find_package(bar_hw_robstride) — " + "Note: bar_controllers does NOT find_package(bar_robstride) — " "the plugin is loaded by controller_manager at launch.", size=11, anchor="start", fill=GREY)) @@ -1273,7 +1273,7 @@ def fault(y, name, src): fill=GREY_FILL, stroke=GREY).render()) s.append(Box(380, 230, 200, 40, "flags: uint32 bit mask", fill=GREY_FILL, stroke=GREY).render()) - s.append(Box(380, 290, 200, 40, "source: 'bar_hw_robstride/can0'", + s.append(Box(380, 290, 200, 40, "source: 'bar_robstride/can0'", fill=GREY_FILL, stroke=GREY).render()) s.append(Box(380, 360, 200, 50, ["/safety_status", "(TRANSIENT_LOCAL)"], @@ -1314,7 +1314,7 @@ def fault(y, name, src): def d_piano_data_flow() -> None: - """Piano-task data flow: .npz to MITAction.""" + """Piano-task data flow: .npz to MITCommand.""" W, H = 1040, 460 s = [header(W, H)] s.append(title(20, 30, "Piano-task data flow", @@ -1327,7 +1327,7 @@ def d_piano_data_flow() -> None: (220, 130, 160, 70, ["MusicSequence", "(numpy bool[F,K])"], GREEN_FILL, GREEN), (410, 130, 170, 70, - ["bar_piano/", "midi_replay"], BLUE_FILL, BLUE), + ["pianist_policy", "song replay"], BLUE_FILL, BLUE), (610, 130, 200, 70, ["/piano/key_command", "TRANSIENT_LOCAL"], GOLD_FILL, GOLD), (840, 130, 180, 70, @@ -1345,7 +1345,7 @@ def d_piano_data_flow() -> None: (700, 280, 180, 60, ["PolicyActionDecoder", "+ ActionMapper"], GOLD_FILL, GOLD), (920, 280, 100, 60, - ["MITAction"], BLUE_FILL, BLUE), + ["MITCommand"], BLUE_FILL, BLUE), ] for x, y, w, h, label, fill, stroke in boxes2: s.append(Box(x, y, w, h, label, fill=fill, stroke=stroke).render()) @@ -1373,7 +1373,7 @@ def d_piano_data_flow() -> None: s.append(label_pill(675, 295, "action")) s.append(label_pill(900, 295, "joints")) - # MITAction -> RemotePolicyController + # MITCommand -> RemotePolicyController s.append(Box(870, 380, 150, 50, ["Remote", "PolicyController"], fill=BLUE_FILL, stroke=BLUE).render()) @@ -1400,7 +1400,7 @@ def d_frozen_schemas() -> None: s.append(group_box(460, 70, 420, 380, "Who locks in when you ship")) rows = [ - ("bar_msgs/MITAction", + ("bar_msgs/MITCommand", "fields name + order", ["RemotePolicyController (subscriber)", "bar_policy.ActionMapper (publisher)", diff --git a/static/img/diagrams/concepts__architecture__03_module_deps.svg b/static/img/diagrams/concepts__architecture__03_module_deps.svg index 22069d0..d24226b 100644 --- a/static/img/diagrams/concepts__architecture__03_module_deps.svg +++ b/static/img/diagrams/concepts__architecture__03_module_deps.svg @@ -23,8 +23,8 @@ launch + YAML bar_bringup_prime (scaffold) -bar_piano -MIDI replay +pianist_policy +piano key-state bar_controllers 5 modes + mode_manager bar_policy @@ -33,7 +33,7 @@ RobstrideSystem bar_sito (stub) -bar_description_lite +lite_description URDF/xacro/MJCF bar_socketcan bus library + I/O thread diff --git a/static/img/diagrams/concepts__architecture__05_piano_data_flow.svg b/static/img/diagrams/concepts__architecture__05_piano_data_flow.svg index 65ff4cc..0ab540e 100644 --- a/static/img/diagrams/concepts__architecture__05_piano_data_flow.svg +++ b/static/img/diagrams/concepts__architecture__05_piano_data_flow.svg @@ -20,8 +20,8 @@ MusicSequence (numpy bool[F,K]) -bar_piano/ -midi_replay +pianist_policy +song replay /piano/key_command TRANSIENT_LOCAL diff --git a/static/img/diagrams/getting_started__intro__02.svg b/static/img/diagrams/getting_started__intro__02.svg index d17da01..0fe5847 100644 --- a/static/img/diagrams/getting_started__intro__02.svg +++ b/static/img/diagrams/getting_started__intro__02.svg @@ -27,7 +27,7 @@ ONNX runner + LeRobot ref bar_socketcan SocketCAN bus library -bar_description_lite +lite_description URDF + xacro + meshes bar_robstride Robstride SystemInterface