diff --git a/docs/concepts/architecture.md b/docs/concepts/architecture.md index bd23446..17bfa52 100644 --- a/docs/concepts/architecture.md +++ b/docs/concepts/architecture.md @@ -15,7 +15,7 @@ build against which: ![Module dependency graph](/img/diagrams/concepts__architecture__03_module_deps.svg) -Notice that `humanoid_controllers` does **not** `find_package(humanoid_control_robstride)`. +Notice that `humanoid_controllers` does **not** `find_package(humanoid_devices_robstride)`. The plugin is loaded by `controller_manager` at launch via `pluginlib` — a runtime dep that doesn't appear in the static graph but is just as binding. The same applies to every `` entry in a controller-manager YAML. @@ -36,7 +36,7 @@ MuJoCo — it performs three steps: | `update()` | read state_interfaces_, write command_interfaces_, lock-free trylock for diag publishers | allocations, blocking, exceptions across the RT boundary | | `write()` | stage frames into the bus library's outgoing queue | the actual CAN/EtherCAT syscall (that's the I/O thread's job) | -The I/O thread in each hardware plugin (`humanoid_control_socketcan::SocketCanBus`, +The I/O thread in each hardware plugin (`humanoid_drivers_socketcan::SocketCanBus`, `ethercat_driver_ros2`'s EtherLAB master thread) is **separate** from the controller-manager thread. RT-safety is preserved by making `read()` / `write()` allocation-free buffer swaps. @@ -229,8 +229,8 @@ system: Concrete examples: -- A Robstride bus-off → `humanoid_control_robstride` publishes `SafetyStatus{level=FAULT, - source="humanoid_control_robstride/can0", flags=BUS_OFF}` → `mode_manager` requests a +- A Robstride bus-off → `humanoid_devices_robstride` publishes `SafetyStatus{level=FAULT, + source="humanoid_devices_robstride/can0", flags=BUS_OFF}` → `mode_manager` requests a STRICT switch to DAMPING. If DAMPING fails (e.g. command interfaces unavailable), `mode_manager` falls back to ZERO_TORQUE. - A `RemotePolicyController` whose Python publisher stalls for >100 ms @@ -249,8 +249,8 @@ 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 -(`humanoid_control_bringup_lite/mujoco.launch.py`, `humanoid_control_bringup_lite/view_lite.launch.py`, -`humanoid_control_bringup_lite/calibrate.launch.py`) are unaffected — they +(`humanoid_bringup_lite/mujoco.launch.py`, `humanoid_bringup_lite/view_lite.launch.py`, +`humanoid_bringup_lite/calibrate.launch.py`) are unaffected — they collapse both sides into one process tree. Launches come from two sibling repos: `humanoid_control` ships every @@ -259,8 +259,8 @@ ships the piano-task-specific launches. | Side | Machine | Launch | What lives here | |---|---|---|---| -| **Robot** | Onboard computer (RT kernel, wired tether) | `humanoid_control_bringup_lite/launch/real.launch.py` (humanoid_control) | `ros2_control_node`, `humanoid_control_robstride` / `humanoid_control_sito` hardware plugins, `joint_state_broadcaster`, the five FSM controllers (`zero_torque` / `damping` / `standby` / `rl_policy` / `remote_policy`), `mode_manager`, `joy_node`, `robot_state_publisher`, IMU driver | -| **Host** | Operator workstation | `humanoid_control_bringup_lite/launch/viz.launch.py` (humanoid_control) | `viser_viz` *or* `rerun_viz` (selected by `viewer:=`) | +| **Robot** | Onboard computer (RT kernel, wired tether) | `humanoid_bringup_lite/launch/real.launch.py` (humanoid_control) | `ros2_control_node`, `humanoid_devices_robstride` / `humanoid_devices_sito` hardware plugins, `joint_state_broadcaster`, the five FSM controllers (`zero_torque` / `damping` / `standby` / `rl_policy` / `remote_policy`), `mode_manager`, `joy_node`, `robot_state_publisher`, IMU driver | +| **Host** | Operator workstation | `humanoid_bringup_lite/launch/viz.launch.py` (humanoid_control) | `viser_viz` *or* `rerun_viz` (selected by `viewer:=`) | | **Robot** | Onboard computer | `humanoid_control_policy/launch/lite_policy.launch.py` (humanoid_control) / `pianist_policy/launch/piano_policy.launch.py` (pianist_ros2) | Runs `prepare` (resolve ONNX, convert motion → `.mcap` + overlay) then loads `rl_policy_controller` into the local CM. Inference is in-process, so the `.onnx` / `.mcap` artifacts **and** the W&B / HF Hub / `onnxruntime` *prepare-time* deps live here. The RT path itself pulls none of them. | | **Robot** | Onboard computer | `pianist_policy/launch/midi_keyboard_driver.launch.py` (pianist_ros2) | USB-MIDI keyboard driver → `/piano/key_state` (`std_msgs/Float32MultiArray`); feeds the on-robot controller's `key_pressed` extern term locally (loopback, does **not** cross the tether). | diff --git a/docs/concepts/calibration_math.md b/docs/concepts/calibration_math.md index 7756993..05c6fb2 100644 --- a/docs/concepts/calibration_math.md +++ b/docs/concepts/calibration_math.md @@ -4,7 +4,7 @@ title: Calibration math # Calibration math -How `humanoid_control_robstride` maps between the raw encoder reading and the +How `humanoid_devices_robstride` maps between the raw encoder reading and the URDF joint frame, where the per-joint constants live, and why the calibration is split across two files. @@ -37,7 +37,7 @@ is in the joint frame — controllers never see the raw encoder. | Parameter | Per | Where it lives | What it captures | |---|---|---|---| | `direction` | joint | URDF `` inside the `` block | Wiring sign — does the motor's positive direction match the URDF's positive joint direction? | -| `homing_offset` | joint | `humanoid_control_bringup_lite/config/calibration.yaml` | Per-physical-robot encoder zero offset (motor frame, rad). | +| `homing_offset` | joint | `humanoid_bringup_lite/config/calibration.yaml` | Per-physical-robot encoder zero offset (motor frame, rad). | The split is deliberate: @@ -53,7 +53,7 @@ The split is deliberate: ## Deriving the offset -The calibration tool (`humanoid_control_bringup_lite/scripts/calibrate_robot.py`) +The calibration tool (`humanoid_bringup_lite/scripts/calibrate_robot.py`) runs the plugin with `calibration_file:=''` — identity calibration — so `/lite/joint_states` reports `direction · raw_motor_pos` (the direction-applied-but-not-offset frame). The operator hand-sweeps each @@ -141,6 +141,6 @@ URDF. The cost is that hand-edits to `id` / `direction` in ## See also - [How-to → Calibrate the zero pose](../how_to/calibrate_zero_pose.md) — the recipe. -- [`RobstrideSystem` source](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_control_devices/humanoid_control_robstride/src/robstride_system.cpp#:~:text=load_calibration) +- [`RobstrideSystem` source](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_devices/humanoid_devices_robstride/src/robstride_system.cpp#:~:text=load_calibration) — the loader + apply. -- `humanoid_control_bringup_lite/scripts/calibrate_robot.py` — the formula in code. +- `humanoid_bringup_lite/scripts/calibrate_robot.py` — the formula in code. diff --git a/docs/concepts/mit_command_surface.md b/docs/concepts/mit_command_surface.md index 568515d..4d808aa 100644 --- a/docs/concepts/mit_command_surface.md +++ b/docs/concepts/mit_command_surface.md @@ -66,7 +66,7 @@ projects. Three properties make it the right primitive: 1. **One formula across silicon and sim.** Robstride firmware computes it on the motor MCU; `mujoco_ros2_control::MujocoSystem` computes the same expression and applies it via `qfrc_applied`; our - `humanoid_control_robstride/RobstrideSystem` encodes the five fields straight + `humanoid_devices_robstride/RobstrideSystem` encodes the five fields straight into a wire frame. A controller written against this surface runs unchanged on silicon, MuJoCo, and `mock_components`. 2. **No mode-switching at the actuator.** "Switch from position control @@ -120,8 +120,8 @@ kd : 16 bits, unsigned, scaled to [0, kd_max] ``` Limits are model-specific (rs-00..rs-06); see -`humanoid_control_devices/humanoid_control_robstride/include/humanoid_control_robstride/robstride_protocol.hpp`. -`humanoid_control_robstride/RobstrideSystem::write` does the scale-and-pack; +`humanoid_devices/humanoid_devices_robstride/include/humanoid_devices_robstride/robstride_protocol.hpp`. +`humanoid_devices_robstride/RobstrideSystem::write` does the scale-and-pack; `read` reverses it. ## See also @@ -131,5 +131,5 @@ Limits are model-specific (rs-00..rs-06); see - [Reference → Hardware specs → MIT-mode command convention](../reference/hardware_specs.md#mit-mode-command-convention) — short-form repeat of the formula. - The protocol header in - [`humanoid_control_robstride/robstride_protocol.hpp`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_control_devices/humanoid_control_robstride/include/humanoid_control_robstride/robstride_protocol.hpp) + [`humanoid_devices_robstride/robstride_protocol.hpp`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_devices/humanoid_devices_robstride/include/humanoid_devices_robstride/robstride_protocol.hpp) is the source-of-truth for the wire encoding. diff --git a/docs/concepts/prime_hybrid_actuation.md b/docs/concepts/prime_hybrid_actuation.md index d26b28d..9fb5371 100644 --- a/docs/concepts/prime_hybrid_actuation.md +++ b/docs/concepts/prime_hybrid_actuation.md @@ -33,7 +33,7 @@ EtherCAT, through the IgH master); two — the distal wrist roll/pitch — are So the EtherCAT ring carries **10 eRob** (positions 0-9, left arm 0-4, right arm 5-9) and the CAN bus carries **4 Sito** wrists (ids `0x16/0x17/0x26/0x27`). All Prime eRob are **50:1** gear. The single source of truth for this mapping -is `humanoid_control_bringup_prime/config/prime_hardware.yaml` (`buses`, `joints.all_joints`, +is `humanoid_bringup_prime/config/prime_hardware.yaml` (`buses`, `joints.all_joints`, `joints.erob_slaves`, `joints.mit_joints`); the per-joint bus assignment is emitted by `prime_description` (`robots/prime_dummy/xacro/prime_dummy.ros2_control.xacro`). @@ -54,7 +54,7 @@ constant (read each joint's model off its label; see the eRob manual §25.2): The 1.5% `Kt` difference is negligible in practice; the **gear ratio** would be the real lever, but every Prime eRob is 50:1, so a single conversion -serves all of them. `humanoid_control_bringup_prime/config/prime_hardware.yaml` can still +serves all of them. `humanoid_bringup_prime/config/prime_hardware.yaml` can still override `Kt`/gear per joint (`joints.erob_kt` / `joints.erob_gear`) if a model ever differs. @@ -63,7 +63,7 @@ ever differs. `real.launch.py` expands the xacro with `use_fake_hardware:=false use_sim:=false`, which emits **two concurrent `ros2_control` blocks** — `PrimeEtherCATSide` (`ethercat_driver/EthercatDriver`, the 10 eRob) and `PrimeSitoCAN` -(`humanoid_control_sito/SitoSystem`, the 4 Sito wrists). One `controller_manager` runs them +(`humanoid_devices_sito/SitoSystem`, the 4 Sito wrists). One `controller_manager` runs them together and exposes a flat 14-joint list to the mode controllers. The sim path (`mujoco.launch.py`) collapses both into one `MujocoSystem` block but presents the identical 14 joints, so the shared controllers run unchanged. @@ -96,7 +96,7 @@ differently — and that difference is the heart of the Prime control story. The Sito firmware runs the MIT law directly. The host sends the desired position, velocity, and feedforward torque in a command frame, and `Kp`/`Kd` in a separate gains frame. Conversions (in -`humanoid_control_devices/humanoid_control_sito/include/humanoid_control_sito/sito_protocol.hpp`, TA40-50): +`humanoid_devices/humanoid_devices_sito/include/humanoid_devices_sito/sito_protocol.hpp`, TA40-50): ``` position_counts = q_cmd · 65536 / (2π) # 16-bit encoder, MOTOR side @@ -132,7 +132,7 @@ are not PDO-mappable, so they cannot be a per-tick command interface): | `0x2381:02` | velocity loop integral (held at 0 for clean impedance) | | `0x2383` | "Bus Regulation of PID" gate — `1` = use bus-written gains, `0` = factory | -The SI-to-register conversion (`humanoid_control_bringup_prime/scripts/erob_impedance_manager.py`, +The SI-to-register conversion (`humanoid_bringup_prime/scripts/erob_impedance_manager.py`, `erob_gains()`), validated exactly against the ZeroErr derivation: ``` @@ -186,7 +186,7 @@ fixed mode impedance and track position in CSP. ## The eRob impedance manager -`humanoid_control_bringup_prime/scripts/erob_impedance_manager.py` is the bridge between the +`humanoid_bringup_prime/scripts/erob_impedance_manager.py` is the bridge between the mode FSM and the eRob loop gains. It subscribes to `/control_mode` and, on each transition, converts that mode's `(kp, kd)` to loop-gain registers and writes them over the EtherLab `ethercat download` CLI. (It uses the CLI, not the diff --git a/docs/concepts/safety_pipeline.md b/docs/concepts/safety_pipeline.md index 6609502..80c4495 100644 --- a/docs/concepts/safety_pipeline.md +++ b/docs/concepts/safety_pipeline.md @@ -30,7 +30,7 @@ The plugin publishes `humanoid_control_msgs/SafetyStatus` on `/safety_status` TRANSIENT_LOCAL durability so late-joining subscribers (like rqt or a freshly-started `mode_manager`) immediately see the most recent value. The `source` field carries the bus interface name -(`humanoid_control_robstride/can0`, etc.), so an operator can tell which bus +(`humanoid_devices_robstride/can0`, etc.), so an operator can tell which bus flagged. Each tick, the plugin rebuilds `flags` from **currently observed** diff --git a/docs/concepts/workspace_and_environment.md b/docs/concepts/workspace_and_environment.md index 314876f..c7006da 100644 --- a/docs/concepts/workspace_and_environment.md +++ b/docs/concepts/workspace_and_environment.md @@ -23,7 +23,7 @@ or topic: | | **Tier 1 — ROS native** | **Tier 2 — workspace tooling** | **Tier 3 — separate project** | |---|---|---|---| | Location | `src//` | per-package `scripts/`, the `hc` CLI, a future top-level `scripts/` | its own git repo, outside the workspace | -| Examples | `humanoid_controllers`, `humanoid_control_robstride`, `humanoid_control_socketcan` | `robstride_probe`, calibration helpers, `hc bus ping` | `Lite-SDK2`, `Lite-Gravity-Compensation` | +| Examples | `humanoid_controllers`, `humanoid_devices_robstride`, `humanoid_drivers_socketcan` | `robstride_probe`, calibration helpers, `hc bus ping` | `Lite-SDK2`, `Lite-Gravity-Compensation` | | Build / run | `colcon` + `ros2 run` | `pixi run …` | own toolchain (`uv run …`) | | Imports `rclpy`? | **yes** | no | **no** | | Talks to ROS via | native pub / sub / service / action | doesn't talk to running nodes | **DDS (CycloneDDS)** + file handoff | diff --git a/docs/getting_started/installation.md b/docs/getting_started/installation.md index 25a5d7b..0f3ee3a 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: humanoid_controllers (ONNX-enabled), humanoid_control_msgs, -# lite_description, humanoid_control_robstride, humanoid_control_socketcan, humanoid_control_common, humanoid_control_policy. +# lite_description, humanoid_devices_robstride, humanoid_drivers_socketcan, humanoid_control_common, humanoid_control_policy. ros-jazzy-humanoid-control-bringup-lite = "*" # Optional: the `hc` diagnostic CLI (run via `ros2 run humanoid_control_cli hc ...`). ros-jazzy-humanoid-control-cli = "*" @@ -106,7 +106,7 @@ fails with `invalid choice: 'launch'`. The from-source workspace gets this from ```sh pixi install -pixi run ros2 launch humanoid_control_bringup_lite real.launch.py +pixi run ros2 launch humanoid_bringup_lite real.launch.py ``` `pixi install` downloads the prebuilt `ros-jazzy-humanoid-control-*` binaries plus the @@ -119,7 +119,7 @@ so `ros2 launch …` / `ros2 run …` work inside `pixi shell` (or via ```sh pixi shell ros2 pkg list | grep '^humanoid_control_' # the humanoid_control_* packages you pulled in -ros2 launch humanoid_control_bringup_lite real.launch.py --show-args # dry-parse the launch (no hardware) +ros2 launch humanoid_bringup_lite real.launch.py --show-args # dry-parse the launch (no hardware) ros2 run humanoid_control_cli hc bus discover --iface can0 --scan-to 32 # read-only CAN scan, e.g. ``` @@ -198,7 +198,7 @@ colcon build fails with a clear CMake error — add the dep to `pixi.toml`'s :::warning[Optional: skip the EtherCAT path] `ethercat_driver_ros2` links `libethercat`, which has no conda recipe. The -default build below skips `ethercat.*` and `humanoid_control_bringup_prime` so Lite bringup +default build below skips `ethercat.*` and `humanoid_bringup_prime` so Lite bringup works on any host. To enable Prime, install the IgH EtherLAB master from source on the host, then drop the `--packages-skip-regex` filter. ::: @@ -207,7 +207,7 @@ on the host, then drop the `--packages-skip-regex` filter. ```sh pixi shell -colcon build --symlink-install --packages-skip-regex 'ethercat.*|humanoid_control_bringup_prime' +colcon build --symlink-install --packages-skip-regex 'ethercat.*|humanoid_bringup_prime' ``` `pixi shell` sources the conda env and `humanoid_control_ws/install/setup.bash` once it @@ -230,14 +230,14 @@ ros2 control list_hardware_interfaces 2>/dev/null \ The 11 `humanoid_control` packages (Lite's `lite_description` comes separately, via `bar.repos`): ``` -humanoid_control_bringup_lite -humanoid_control_bringup_prime +humanoid_bringup_lite +humanoid_bringup_prime humanoid_control_cli humanoid_control_common humanoid_controllers -humanoid_control_robstride -humanoid_control_sito -humanoid_control_socketcan +humanoid_devices_robstride +humanoid_devices_sito +humanoid_drivers_socketcan humanoid_control_msgs humanoid_control_policy ``` diff --git a/docs/getting_started/intro.md b/docs/getting_started/intro.md index 52e5b2f..599d854 100644 --- a/docs/getting_started/intro.md +++ b/docs/getting_started/intro.md @@ -68,7 +68,7 @@ A single git repo at `Berkeley-Humanoids/humanoid_control`, a flat collection of Notice that **`humanoid_controllers`, `humanoid_control_msgs`, and `humanoid_control_policy` have no robot-specific code** — everything robot-specific lives in `humanoid_control_description_*` -or `humanoid_control_bringup_*`. +or `humanoid_bringup_*`. ## Design rationale (one-paragraph version) @@ -97,7 +97,7 @@ list; the most influential are: decomposition pattern and `industrial_ci` workflow. - **[legged_control2](https://qiayuanl.github.io/legged_control2_doc/overview.html)** — two-tier hardware factoring (bus library / per-actuator-family plugin) - that we mirror for `humanoid_control_socketcan` / `humanoid_control_robstride` / `humanoid_control_sito`. + that we mirror for `humanoid_drivers_socketcan` / `humanoid_devices_robstride` / `humanoid_devices_sito`. - **[mujoco_ros2_control](https://github.com/qiayuanl/mujoco_ros2_control)** — the MuJoCo ↔ ros2_control bridge whose `MujocoSystem` plugin we consume. - **[franka_ros2](https://github.com/frankarobotics/franka_ros2)** — the flat @@ -105,7 +105,7 @@ list; the most influential are: - **[Universal_Robots_ROS2_Driver](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver)** — gold-standard `ros2_control` hardware integration. The `Universal_Robots_Client_Library` / `ur_robot_driver` split mirrors our - `humanoid_control_socketcan` / `humanoid_control_robstride` split. + `humanoid_drivers_socketcan` / `humanoid_devices_robstride` split. ## Next diff --git a/docs/getting_started/lite_101.md b/docs/getting_started/lite_101.md index c7d2b2c..d5ef17a 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 humanoid_control_bringup_lite view_lite.launch.py +ros2 launch humanoid_bringup_lite view_lite.launch.py ``` What you'll see: @@ -66,7 +66,7 @@ hosted inside `mujoco_sim`, all five mode-FSM controllers loaded, the the Robstride firmware computes on silicon. ```sh -ros2 launch humanoid_control_bringup_lite mujoco.launch.py +ros2 launch humanoid_bringup_lite mujoco.launch.py ``` A **MuJoCo viewer window** opens with the Lite humanoid at zero pose. @@ -142,13 +142,13 @@ ros2 topic echo --once /control_mode :::tip["See it move"] Two interchangeable live visualizers ride on `/lite/joint_states` + -`/robot_description`, both shipped by `humanoid_control_bringup_lite`. On the +`/robot_description`, both shipped by `humanoid_bringup_lite`. On the tethered deployment they live on the **operator workstation** (host side of the tether), spawned by `viz.launch.py`: ```sh -ros2 launch humanoid_control_bringup_lite viz.launch.py # viser, http://localhost:8080 -ros2 launch humanoid_control_bringup_lite viz.launch.py viewer:=rerun # native rerun window +ros2 launch humanoid_bringup_lite viz.launch.py # viser, http://localhost:8080 +ros2 launch humanoid_bringup_lite viz.launch.py viewer:=rerun # native rerun window ``` For a single-machine MuJoCo run, the standalone shortcuts work too — @@ -156,8 +156,8 @@ they auto-discover `/robot_description` and the joint-state topic on the local domain: ```sh -ros2 run humanoid_control_bringup_lite viser_viz -ros2 run humanoid_control_bringup_lite rerun_viz +ros2 run humanoid_bringup_lite viser_viz +ros2 run humanoid_bringup_lite rerun_viz ``` Visualiser dependencies (`rerun-sdk`, `viser`, `yourdfpy`, `scipy`) diff --git a/docs/how_to/add_new_joint.md b/docs/how_to/add_new_joint.md index e3e6f8e..5e8708e 100644 --- a/docs/how_to/add_new_joint.md +++ b/docs/how_to/add_new_joint.md @@ -19,7 +19,7 @@ Five files in three packages: | `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) | | `humanoid_controllers/config/humanoid_control_lite_controllers.yaml` | `joints:` list for every controller + per-joint K/D / standby pose entries | -| `humanoid_control_bringup_lite/config/calibration.yaml` | `homing_offset` for the new joint (created via [Calibrate the zero pose](./calibrate_zero_pose.md)) | +| `humanoid_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 @@ -134,18 +134,18 @@ Once the URDF + YAML are updated and the build is clean, plug in the new motor and run: ```bash -ros2 launch humanoid_control_bringup_lite calibrate.launch.py +ros2 launch humanoid_bringup_lite calibrate.launch.py ``` Hand-sweep the new joint(s) through their full range. Old joints sit stationary — the tool's `sweep_threshold` will preserve their existing `homing_offset` entries. Move the resulting -`./calibration.yaml` over `humanoid_control_bringup_lite/config/calibration.yaml`. +`./calibration.yaml` over `humanoid_bringup_lite/config/calibration.yaml`. ## Step 5 — Verify ```bash -ros2 launch humanoid_control_bringup_lite real.launch.py mode:=arms_neck +ros2 launch humanoid_bringup_lite real.launch.py mode:=arms_neck ``` In a second terminal: diff --git a/docs/how_to/calibrate_prime_erob.md b/docs/how_to/calibrate_prime_erob.md index 44122f3..1252211 100644 --- a/docs/how_to/calibrate_prime_erob.md +++ b/docs/how_to/calibrate_prime_erob.md @@ -1,6 +1,6 @@ # Calibrate the Prime arms (eRob + Sito) -Per-physical-robot recipe: regenerate `humanoid_control_bringup_prime/config/prime_calibration.yaml` +Per-physical-robot recipe: regenerate `humanoid_bringup_prime/config/prime_calibration.yaml` so each joint's encoder zero maps to the URDF's joint zero. One file holds all 14 joints — the 10 eRob (ZeroErr, EtherCAT) arm joints and the 4 Sito (CAN) wrists — and the **same** `calibrate_erob` sweep tool calibrates both. Same idea as @@ -71,9 +71,9 @@ The launch also spawns the `joint_state_broadcaster` (so `/prime/joint_states` f and the `calibrate_erob` tracker: ```bash -ros2 launch humanoid_control_bringup_prime calibrate.launch.py backends:=ec \ +ros2 launch humanoid_bringup_prime calibrate.launch.py backends:=ec \ output:=~/prime_calibration.yaml \ - prior:=$(ros2 pkg prefix humanoid_control_bringup_prime)/share/humanoid_control_bringup_prime/config/prime_calibration.yaml + prior:=$(ros2 pkg prefix humanoid_bringup_prime)/share/humanoid_bringup_prime/config/prime_calibration.yaml ``` `prior:=...` carries already-calibrated joints (the Sito wrists, or the other arm) @@ -87,7 +87,7 @@ with a live readout. For each ring position, support the joint, then: ```bash -ros2 run humanoid_control_bringup_prime erob_limp_joint # e.g. 4 +ros2 run humanoid_bringup_prime erob_limp_joint # e.g. 4 ``` The joint goes damped-limp (the read-back prints `Kp=0`, confirming the `0x2383` gate @@ -102,7 +102,7 @@ joint with too small a sweep (skipped, prior kept) or `abs(homing_offset) > pi` ## Step 3 — Apply and verify -Copy the reviewed file over `humanoid_control_bringup_prime/config/prime_calibration.yaml`. +Copy the reviewed file over `humanoid_bringup_prime/config/prime_calibration.yaml`. `real.launch.py` folds it into per-joint configs automatically at launch. To verify the sign end-to-end, fold it, re-launch, and move one joint to a known stop — at the stop, `/joint_states` should read that joint's URDF limit. @@ -114,7 +114,7 @@ A good cross-check on a symmetric robot: the two arms' offsets should mirror eac The 4 Sito wrists (`left`/`right` `wrist_roll` + `wrist_pitch`) use the **same** `calibrate_erob` tool and the **same** `prime_calibration.yaml` — it discovers them from -the `humanoid_control_sito/SitoSystem` block (by `can_id`) alongside the eRob. Two differences: +the `humanoid_devices_sito/SitoSystem` block (by `can_id`) alongside the eRob. Two differences: - **Limp is free.** A Sito is an MIT motor; with no command controller active its gains default to zero, so it is backdrivable out of the box — no gain-gate dance. @@ -124,13 +124,13 @@ the `humanoid_control_sito/SitoSystem` block (by `can_id`) alongside the eRob. T single-bus run still writes a complete 14-joint file. ```bash -ros2 launch humanoid_control_bringup_prime calibrate.launch.py backends:=can \ +ros2 launch humanoid_bringup_prime calibrate.launch.py backends:=can \ output:=~/prime_calibration.yaml \ - prior:=$(ros2 pkg prefix humanoid_control_bringup_prime)/share/humanoid_control_bringup_prime/config/prime_calibration.yaml + prior:=$(ros2 pkg prefix humanoid_bringup_prime)/share/humanoid_bringup_prime/config/prime_calibration.yaml ``` Hand-sweep each wrist to both stops (the live readout tracks them), Ctrl-C, review, copy -over `prime_calibration.yaml`, and `colcon build --packages-select humanoid_control_bringup_prime`. +over `prime_calibration.yaml`, and `colcon build --packages-select humanoid_bringup_prime`. Unlike the eRob, the Sito read `direction` **and** `homing_offset` straight from this file (`SitoSystem::load_calibration`) — so a flipped wrist is a one-line edit. @@ -145,7 +145,7 @@ offset_new = offset + (lower + upper) For a symmetric joint (`lower = -upper`, e.g. the wrists) the offset is unchanged; for an asymmetric one (e.g. `shoulder_roll`, `elbow_pitch`) it shifts. Then -`colcon build --packages-select humanoid_control_bringup_prime` — no source rebuild; the eRob fold and +`colcon build --packages-select humanoid_bringup_prime` — no source rebuild; the eRob fold and `SitoSystem` both re-read the file at launch. This works for any joint, eRob or Sito. ## eRob bus-split (hardware-confirmed) diff --git a/docs/how_to/calibrate_zero_pose.md b/docs/how_to/calibrate_zero_pose.md index 5bc7e33..d6ca723 100644 --- a/docs/how_to/calibrate_zero_pose.md +++ b/docs/how_to/calibrate_zero_pose.md @@ -1,6 +1,6 @@ # Calibrate the zero pose -Per-physical-robot recipe: regenerate `humanoid_control_bringup_lite/config/calibration.yaml` +Per-physical-robot recipe: regenerate `humanoid_bringup_lite/config/calibration.yaml` so the URDF's joint zero matches your robot's encoder zero. Run this once per robot (after assembly, after a motor swap, or after a hard mechanical reset). @@ -39,7 +39,7 @@ Full math: [Concepts → Calibration math](../concepts/calibration_math.md). ```bash cd ~/humanoid_control_ws pixi shell -ros2 launch humanoid_control_bringup_lite calibrate.launch.py +ros2 launch humanoid_bringup_lite calibrate.launch.py ``` `calibrate.launch.py` includes `real.launch.py` with three overrides: @@ -120,15 +120,15 @@ joint. That's a URDF bug, not a calibration one — fix the ## Step 4 — Promote the file ```bash -cp ./calibration.yaml src/humanoid_control/humanoid_control_bringup_lite/config/calibration.yaml +cp ./calibration.yaml src/humanoid_control/humanoid_bringup_lite/config/calibration.yaml ``` That copies into the source tree. Next `colcon build` will pick it up; or because the launch resolves the file via `FindPackageShare`, -just rebuild `humanoid_control_bringup_lite` to refresh the install share: +just rebuild `humanoid_bringup_lite` to refresh the install share: ```bash -colcon build --symlink-install --packages-select humanoid_control_bringup_lite +colcon build --symlink-install --packages-select humanoid_bringup_lite ``` ## Step 5 — Verify @@ -136,7 +136,7 @@ colcon build --symlink-install --packages-select humanoid_control_bringup_lite Relaunch the normal real bringup (without the calibration override): ```bash -ros2 launch humanoid_control_bringup_lite real.launch.py +ros2 launch humanoid_bringup_lite real.launch.py ``` Watch for the per-bus calibration-load log: @@ -169,14 +169,14 @@ Adjust the threshold if 0.5 rad is too generous (e.g. for joints with < 1 rad total range): ```bash -ros2 launch humanoid_control_bringup_lite calibrate.launch.py sweep_threshold:=0.2 +ros2 launch humanoid_bringup_lite calibrate.launch.py sweep_threshold:=0.2 ``` ## See also - [Concepts → Calibration math](../concepts/calibration_math.md) — the formula derivation and why it's split URDF + YAML. -- [Reference → Launch args](../reference/launch_args.md#humanoid_control_bringup_litelaunchcalibratelaunchpy) +- [Reference → Launch args](../reference/launch_args.md#humanoid_bringup_litelaunchcalibratelaunchpy) — the `output` and `sweep_threshold` args. - The `calibrate_robot` source is ~250 lines in - [`humanoid_control_bringup_lite/scripts/calibrate_robot.py`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_control_bringup_lite/scripts/calibrate_robot.py). + [`humanoid_bringup_lite/scripts/calibrate_robot.py`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_bringup_lite/scripts/calibrate_robot.py). diff --git a/docs/how_to/diagnose_enobufs.md b/docs/how_to/diagnose_enobufs.md index 9982b2c..ed101d7 100644 --- a/docs/how_to/diagnose_enobufs.md +++ b/docs/how_to/diagnose_enobufs.md @@ -12,8 +12,8 @@ for finding and fixing the root cause. ## The symptom ``` -[humanoid_control_socketcan]: CAN write() returned -1 (errno=No buffer space available) for id=0x017FFF0B -[humanoid_control_socketcan]: CAN write() returned -1 (errno=No buffer space available) for id=0x017FFF15 +[humanoid_drivers_socketcan]: CAN write() returned -1 (errno=No buffer space available) for id=0x017FFF0B +[humanoid_drivers_socketcan]: CAN write() returned -1 (errno=No buffer space available) for id=0x017FFF15 ... ``` @@ -25,7 +25,7 @@ cd humanoid_control_ws && pixi shell ros2 topic echo /safety_status # level: 2 # FAULT # flags: 4 # FLAG_TX_QUEUE_OVERRUN = 1 << 2 -# source: humanoid_control_robstride/can0 +# source: humanoid_devices_robstride/can0 ``` ## Why it happens diff --git a/docs/how_to/first_real_bringup.md b/docs/how_to/first_real_bringup.md index 33ed97d..55085db 100644 --- a/docs/how_to/first_real_bringup.md +++ b/docs/how_to/first_real_bringup.md @@ -20,7 +20,7 @@ any pose. - USB-to-CAN adapters plugged into the workstation. Both arms' buses are visible at `can0` and `can1` (typical) or whatever the host assigned — `ip -br link show type can` to confirm. -- A pre-existing `humanoid_control_bringup_lite/config/calibration.yaml` for this +- A pre-existing `humanoid_bringup_lite/config/calibration.yaml` for this physical robot. The bundled file works for the development robot; if you're on a different unit, [calibrate first](./calibrate_zero_pose.md). - Robot **power is on** at the wall, but motors can be in any pose. @@ -66,7 +66,7 @@ warnings**, the actuators aren't powered — see ## Step 3 — Launch the bringup ```bash -ros2 launch humanoid_control_bringup_lite real.launch.py +ros2 launch humanoid_bringup_lite real.launch.py ``` Default args: `mode:=arms hardware_config:= @@ -82,7 +82,7 @@ keyboardless lab box to use the `/humanoid_control/mode/*` services instead. `real.launch.py` boots the **onboard-computer side** of the tethered deployment split: hardware plugins, FSM controllers, `mode_manager`, -gamepad. Visualisers (`ros2 launch humanoid_control_bringup_lite viz.launch.py`) +gamepad. Visualisers (`ros2 launch humanoid_bringup_lite viz.launch.py`) and policy runners (`ros2 launch humanoid_control_policy lite_policy.launch.py …`) live on the operator workstation — matching `ROS_DOMAIN_ID` is enough for them to see each other. See @@ -91,8 +91,8 @@ for them to see each other. See Watch the launch logs for: ``` -[ros2_control_node-1] Loaded hardware 'LiteLeftArm' from plugin 'humanoid_control_robstride/RobstrideSystem' -[ros2_control_node-1] Loaded hardware 'LiteRightArm' from plugin 'humanoid_control_robstride/RobstrideSystem' +[ros2_control_node-1] Loaded hardware 'LiteLeftArm' from plugin 'humanoid_devices_robstride/RobstrideSystem' +[ros2_control_node-1] Loaded hardware 'LiteRightArm' from plugin 'humanoid_devices_robstride/RobstrideSystem' [ros2_control_node-1] SocketCanBus opened on 'can0' [ros2_control_node-1] SocketCanBus opened on 'can1' @@ -125,7 +125,7 @@ ros2 topic echo --once /lite/joint_states | head -5 # header / 14 names / real-looking positions (NOT all 0.0 — that'd mean motors un-Enabled) ros2 topic echo --once /safety_status -# level: 0 flags: 0 source: humanoid_control_robstride/can0 (then a second one for can1) +# level: 0 flags: 0 source: humanoid_devices_robstride/can0 (then a second one for can1) ``` The "all 0.0 positions" signal is the most useful early-warning: it diff --git a/docs/how_to/index.md b/docs/how_to/index.md index 9c5bbf9..f2a2a9e 100644 --- a/docs/how_to/index.md +++ b/docs/how_to/index.md @@ -16,7 +16,7 @@ and now have a concrete task in mind. How-tos skip the pedagogy that | Guide | Use it when | |---|---| | [First real-hardware bringup](./first_real_bringup.md) | You have the physical Lite robot on the bench and a workspace built. You want `/lite/joint_states` to flow and `zero_torque_controller` active. | -| [Calibrate the zero pose](./calibrate_zero_pose.md) | The URDF "joint zero" doesn't match where the robot's encoders read zero. You want to regenerate `humanoid_control_bringup_lite/config/calibration.yaml`. | +| [Calibrate the zero pose](./calibrate_zero_pose.md) | The URDF "joint zero" doesn't match where the robot's encoders read zero. You want to regenerate `humanoid_bringup_lite/config/calibration.yaml`. | | [Probe actuators on a CAN bus](./probe_can_bus.md) | You suspect a wiring issue, a missing motor, or just want to scan all IDs on a bus before bringup. | | [Switch controllers without the FSM](./switch_controllers_manually.md) | The gamepad isn't in the loop. You want to call `switch_controller` directly to put the robot in DAMPING / STANDBY / REMOTE. | diff --git a/docs/how_to/live_viz.md b/docs/how_to/live_viz.md index 2ed3f04..cb5b546 100644 --- a/docs/how_to/live_viz.md +++ b/docs/how_to/live_viz.md @@ -32,13 +32,13 @@ Inside the workspace env (`cd humanoid_control_ws && pixi shell`): ```bash # Default — viser, browser at http://localhost:8080 -ros2 launch humanoid_control_bringup_lite viz.launch.py +ros2 launch humanoid_bringup_lite viz.launch.py # Native rerun window instead -ros2 launch humanoid_control_bringup_lite viz.launch.py viewer:=rerun +ros2 launch humanoid_bringup_lite viz.launch.py viewer:=rerun # Multi-robot or non-Lite — override the topic -ros2 launch humanoid_control_bringup_lite viz.launch.py joint_state_topic:=//joint_states +ros2 launch humanoid_bringup_lite viz.launch.py joint_state_topic:=//joint_states ``` `viewer:=` mirrors mjlab's `--viewer` flag so the same vocabulary @@ -58,8 +58,8 @@ instead of the launch wrapper. `ROS_DOMAIN_ID` matching is on you — these talk to whatever's already on the local domain. ```bash -ros2 run humanoid_control_bringup_lite rerun_viz -ros2 run humanoid_control_bringup_lite viser_viz +ros2 run humanoid_bringup_lite rerun_viz +ros2 run humanoid_bringup_lite viser_viz ``` Both work against any bringup that publishes `/robot_description` @@ -103,15 +103,15 @@ per-`/lite/joint_states` callback + a tf update. | Symptom | Cause | |---|---| | 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 `humanoid_control_ws/`). | -| `rerun_viz` says `ModuleNotFoundError: No module named 'rerun'` | The pixi env wasn't entered — run `cd humanoid_control_ws && pixi shell` first, then `ros2 run humanoid_control_bringup_lite rerun_viz`. | +| `rerun_viz` says `ModuleNotFoundError: No module named 'rerun'` | The pixi env wasn't entered — run `cd humanoid_control_ws && pixi shell` first, then `ros2 run humanoid_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 humanoid_control_bringup_lite viz.launch.py` (default viewer is `viser`), or wrong host in the URL. | +| Browser at `:8080` shows "this site can't be reached" | `viser_viz` not running — start it via `ros2 launch humanoid_bringup_lite viz.launch.py` (default viewer is `viser`), or wrong host in the URL. | | Joints visible in `ros2 topic echo /lite/joint_states` but not moving in viewer | TF buffer staleness — restart the viewer; the URDF subscription may have been late to the latched message. | ## See also -- `rerun_viz` source: [`humanoid_control_bringup_lite/scripts/rerun_viz.py`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_control_bringup_lite/scripts/rerun_viz.py) -- `viser_viz` source: [`humanoid_control_bringup_lite/scripts/viser_viz.py`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_control_bringup_lite/scripts/viser_viz.py) -- `viz.launch.py` source: [`humanoid_control_bringup_lite/launch/viz.launch.py`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_control_bringup_lite/launch/viz.launch.py) +- `rerun_viz` source: [`humanoid_bringup_lite/scripts/rerun_viz.py`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_bringup_lite/scripts/rerun_viz.py) +- `viser_viz` source: [`humanoid_bringup_lite/scripts/viser_viz.py`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_bringup_lite/scripts/viser_viz.py) +- `viz.launch.py` source: [`humanoid_bringup_lite/launch/viz.launch.py`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_bringup_lite/launch/viz.launch.py) - [Reference → Launch args](../reference/launch_args.md) — the `viz.launch.py` arg table (`viewer`, `joint_state_topic`). diff --git a/docs/how_to/mit_slider_gui.md b/docs/how_to/mit_slider_gui.md index cf1a36d..533a511 100644 --- a/docs/how_to/mit_slider_gui.md +++ b/docs/how_to/mit_slider_gui.md @@ -31,7 +31,7 @@ keep the workspace clear. - A `forward_command_controller/MultiInterfaceForwardCommandController` loaded in the controllers YAML, claiming all 5 MIT interfaces on the target joint. The single-actuator test config in - `humanoid_control_devices/humanoid_control_robstride/test/single_robstride_gui_controllers.yaml` + `humanoid_devices/humanoid_devices_robstride/test/single_robstride_gui_controllers.yaml` is the canonical example. ## Step 1 — Launch the test stack @@ -40,12 +40,12 @@ For a single-motor sanity check there's a dedicated launch (inside the workspace env — `cd humanoid_control_ws && pixi shell`): ```bash -ros2 launch humanoid_control_robstride single_robstride_gui.launch.py +ros2 launch humanoid_devices_robstride single_robstride_gui.launch.py ``` The launch composes a `controller_manager` and starts the `mit_slider_gui` executable; if you want the slider GUI alone against -an already-running controller manager, run `ros2 run humanoid_control_robstride +an already-running controller manager, run `ros2 run humanoid_devices_robstride mit_slider_gui` directly. This brings up: @@ -148,6 +148,6 @@ interactions. ## See also -- The GUI source: [`humanoid_control_robstride/scripts/mit_slider_gui.py`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_control_devices/humanoid_control_robstride/scripts/mit_slider_gui.py). +- The GUI source: [`humanoid_devices_robstride/scripts/mit_slider_gui.py`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_devices/humanoid_devices_robstride/scripts/mit_slider_gui.py). - [Concepts → MIT command surface](../concepts/mit_command_surface.md) — what each slider does. - [Switch controllers without the FSM](./switch_controllers_manually.md). diff --git a/docs/how_to/recover_from_fault.md b/docs/how_to/recover_from_fault.md index 3aef454..1548f6f 100644 --- a/docs/how_to/recover_from_fault.md +++ b/docs/how_to/recover_from_fault.md @@ -18,7 +18,7 @@ pixi shell ros2 topic echo /safety_status # level: 2 # 0=OK, 1=WARNING, 2=FAULT, 3=CRITICAL # flags: 8 # bitmask -# source: humanoid_control_robstride/can0 +# source: humanoid_devices_robstride/can0 # message: "" ``` diff --git a/docs/how_to/switch_controllers_manually.md b/docs/how_to/switch_controllers_manually.md index 04b92ef..3de9012 100644 --- a/docs/how_to/switch_controllers_manually.md +++ b/docs/how_to/switch_controllers_manually.md @@ -36,7 +36,7 @@ Easiest: pass `enable_mode_manager:=false` so `mode_manager` isn't spawned at all: ```bash -ros2 launch humanoid_control_bringup_lite real.launch.py enable_mode_manager:=false +ros2 launch humanoid_bringup_lite real.launch.py enable_mode_manager:=false ``` Now `zero_torque_controller` is active (the spawner set it active), diff --git a/docs/how_to/use_pixi_tasks.md b/docs/how_to/use_pixi_tasks.md index 771b00d..da738a2 100644 --- a/docs/how_to/use_pixi_tasks.md +++ b/docs/how_to/use_pixi_tasks.md @@ -23,7 +23,7 @@ are workspace concerns; both `humanoid_control` and `pianist_ros2` consume them. :::tip[Why have aliases at all] A single `pixi run launch-mujoco` is shorter than -`ros2 launch humanoid_control_bringup_lite mujoco.launch.py`, but the bigger win +`ros2 launch humanoid_bringup_lite mujoco.launch.py`, but the bigger win is that **every alias runs inside the pixi-managed environment** — ROS 2 Jazzy, the colcon overlay, the visualiser PyPI deps, and the right `RCUTILS_CONSOLE_OUTPUT_FORMAT` are all sourced automatically. @@ -38,10 +38,10 @@ explicit `pixi shell` first. | `pixi install` | (the pixi install itself) | Solve and materialise the conda + PyPI env into `humanoid_control_ws/.pixi/`. Run once per clone and after every `pixi.toml` change. | | `pixi shell` | (the pixi shell itself) | Drop into an interactive shell with the env active. Equivalent to `source install/setup.bash` over a sourced ROS 2 Jazzy install. | | `pixi run setup` | `vcs import --input src/humanoid_control/bar.repos src` | Clone the third-party `mujoco_*` + `ethercat_driver_ros2` sources listed in `bar.repos` into `src/`. | -| `pixi run build` | `colcon build --symlink-install --packages-skip-regex 'ethercat.*\|humanoid_control_bringup_prime'` | Build the Lite path (skips the EtherCAT-linked Prime lane that has no conda recipe). | -| `pixi run build-all` | `colcon build --symlink-install` | Same, but includes `humanoid_control_bringup_prime` and `ethercat_driver_ros2`. Requires `libethercat` installed on the host. | +| `pixi run build` | `colcon build --symlink-install --packages-skip-regex 'ethercat.*\|humanoid_bringup_prime'` | Build the Lite path (skips the EtherCAT-linked Prime lane that has no conda recipe). | +| `pixi run build-all` | `colcon build --symlink-install` | Same, but includes `humanoid_bringup_prime` and `ethercat_driver_ros2`. Requires `libethercat` installed on the host. | | `pixi run build-pkg ` | `colcon build --symlink-install --packages-select ` | Targeted rebuild of one package — fastest edit-loop while iterating. | -| `pixi run test` | `colcon test --packages-skip-regex 'ethercat.*\|humanoid_control_bringup_prime\|mujoco_.*' --ctest-args -LE linter --event-handlers console_cohesion-` | Run humanoid_control-owned tests; skips the vendored `mujoco_*` packages and the CMake-registered linters (which RoboStack ships at newer versions than apt-jazzy, so they'd diverge from the industrial_ci-on-humanoid_control source of truth). | +| `pixi run test` | `colcon test --packages-skip-regex 'ethercat.*\|humanoid_bringup_prime\|mujoco_.*' --ctest-args -LE linter --event-handlers console_cohesion-` | Run humanoid_control-owned tests; skips the vendored `mujoco_*` packages and the CMake-registered linters (which RoboStack ships at newer versions than apt-jazzy, so they'd diverge from the industrial_ci-on-humanoid_control source of truth). | | `pixi run test-lint` | Same as `test`, but keeps the linters. | Use when you specifically want to see uncrustify / cpplint output locally. | | `pixi run test-results` | `colcon test-result --verbose` | Print the per-package test summary after `pixi run test`. | | `pixi run clean` | `rm -rf build install log` | Wipe the colcon overlay (leaves the source tree and `.pixi/` env alone). Handy after a package rename. | @@ -53,11 +53,11 @@ extra arguments after the alias are forwarded unchanged. | Alias | Equivalent | Side | |---|---|---| -| `pixi run view` | `ros2 launch humanoid_control_bringup_lite view_lite.launch.py` | dev — URDF inspector | -| `pixi run launch-mujoco` | `ros2 launch humanoid_control_bringup_lite mujoco.launch.py` | dev — full Lite controller stack in MuJoCo | -| `pixi run launch-real` | `ros2 launch humanoid_control_bringup_lite real.launch.py` | robot — real-hardware Lite bringup | -| `pixi run launch-viz` | `ros2 launch humanoid_control_bringup_lite viz.launch.py` | host — live URDF + joint-state viewer (`viewer:=viser\|rerun`) | -| `pixi run calibrate` | `ros2 launch humanoid_control_bringup_lite calibrate.launch.py` | dev — calibration bringup; writes `calibration.yaml` on Ctrl+C | +| `pixi run view` | `ros2 launch humanoid_bringup_lite view_lite.launch.py` | dev — URDF inspector | +| `pixi run launch-mujoco` | `ros2 launch humanoid_bringup_lite mujoco.launch.py` | dev — full Lite controller stack in MuJoCo | +| `pixi run launch-real` | `ros2 launch humanoid_bringup_lite real.launch.py` | robot — real-hardware Lite bringup | +| `pixi run launch-viz` | `ros2 launch humanoid_bringup_lite viz.launch.py` | host — live URDF + joint-state viewer (`viewer:=viser\|rerun`) | +| `pixi run calibrate` | `ros2 launch humanoid_bringup_lite calibrate.launch.py` | dev — calibration bringup; writes `calibration.yaml` on Ctrl+C | | `pixi run launch-policy` | `ros2 launch humanoid_control_policy lite_policy.launch.py` | robot — runs `prepare` (resolve ONNX, motion → `.mcap`) then loads the in-process `rl_policy_controller`. Pass `checkpoint_file:=` or `wandb_run_path:=`. | | `pixi run launch-policy-tracking` | `… lite_policy.launch.py` | robot — pass-through alias (back-compat shortcut) | @@ -66,11 +66,11 @@ extra arguments after the alias are forwarded unchanged. | Alias | Equivalent | |---|---| | `pixi run hc …` | `bar …` (the `humanoid_control_cli` console script) | -| `pixi run robstride-ping` | `ros2 run humanoid_control_robstride robstride_ping` | -| `pixi run robstride-discover` | `ros2 run humanoid_control_robstride robstride_discover` | -| `pixi run mit-slider-gui` | `ros2 run humanoid_control_robstride mit_slider_gui` | -| `pixi run rerun-viz` | `ros2 run humanoid_control_bringup_lite rerun_viz` | -| `pixi run viser-viz` | `ros2 run humanoid_control_bringup_lite viser_viz` | +| `pixi run robstride-ping` | `ros2 run humanoid_devices_robstride robstride_ping` | +| `pixi run robstride-discover` | `ros2 run humanoid_devices_robstride robstride_discover` | +| `pixi run mit-slider-gui` | `ros2 run humanoid_devices_robstride mit_slider_gui` | +| `pixi run rerun-viz` | `ros2 run humanoid_bringup_lite rerun_viz` | +| `pixi run viser-viz` | `ros2 run humanoid_bringup_lite viser_viz` | ## Launch aliases — pianist_ros2 diff --git a/docs/reference/cli_tools.md b/docs/reference/cli_tools.md index 9732e6f..a45e978 100644 --- a/docs/reference/cli_tools.md +++ b/docs/reference/cli_tools.md @@ -23,13 +23,13 @@ These are normally driven by their launch files, but are reachable via | Executable | Package | Repo | What it does | |---|---|---|---| | `hc` (unified CLI) | `humanoid_control_cli` | humanoid_control | Verb/noun entry point (`hc bus ping`, `hc bus discover`, `hc motor slider`, `hc viz rerun`, …). | -| `robstride_ping` | `humanoid_control_robstride` | humanoid_control | Single-actuator probe (GetDeviceId / OperationStatus). Read-only. | -| `robstride_discover` | `humanoid_control_robstride` | humanoid_control | Scan a CAN ID range, print every device that replies. Read-only. | -| `mit_slider_gui` | `humanoid_control_robstride` | humanoid_control | Qt slider window publishing Float64MultiArray to a forward_command_controller. | +| `robstride_ping` | `humanoid_devices_robstride` | humanoid_control | Single-actuator probe (GetDeviceId / OperationStatus). Read-only. | +| `robstride_discover` | `humanoid_devices_robstride` | humanoid_control | Scan a CAN ID range, print every device that replies. Read-only. | +| `mit_slider_gui` | `humanoid_devices_robstride` | humanoid_control | Qt slider window publishing Float64MultiArray to a forward_command_controller. | | `mode_manager` | `humanoid_controllers` | humanoid_control | The FSM orchestrator. Normally launched by bringup; sometimes useful to start manually. | -| `calibrate_robot` | `humanoid_control_bringup_lite` | humanoid_control | Sample (min, max) per joint; write `calibration.yaml` on Ctrl+C. | -| `rerun_viz` | `humanoid_control_bringup_lite` | humanoid_control | Native rerun viewer subscribed to `/robot_description` + `/lite/joint_states`. | -| `viser_viz` | `humanoid_control_bringup_lite` | humanoid_control | Browser viewer (default port 8080). Same subscriptions. | +| `calibrate_robot` | `humanoid_bringup_lite` | humanoid_control | Sample (min, max) per joint; write `calibration.yaml` on Ctrl+C. | +| `rerun_viz` | `humanoid_bringup_lite` | humanoid_control | Native rerun viewer subscribed to `/robot_description` + `/lite/joint_states`. | +| `viser_viz` | `humanoid_bringup_lite` | humanoid_control | Browser viewer (default port 8080). Same subscriptions. | | `prepare` | `humanoid_control_policy` | humanoid_control | Launch-time prep: resolve the ONNX (local / W&B), convert the LeRobot motion → `.mcap` bag, emit the `rl_policy_controller` overlay (used by `lite_policy.launch.py`). | | `prepare` | `pianist_policy` | pianist_ros2 | Piano counterpart of `humanoid_control_policy prepare` (song → key-state `.mcap`; used by `piano_policy.launch.py`). | | `piano_state_bridge` | `pianist_policy` | pianist_ros2 | Sim-side bridge — JointState piano keys → `std_msgs/Float32MultiArray` on `/piano/key_state`. | @@ -40,8 +40,8 @@ These are normally driven by their launch files, but are reachable via ### `robstride_ping` ```bash -ros2 run humanoid_control_robstride robstride_ping --iface can0 --id 11 -ros2 run humanoid_control_robstride robstride_ping --iface can0 --id 11 --read-status +ros2 run humanoid_devices_robstride robstride_ping --iface can0 --id 11 +ros2 run humanoid_devices_robstride robstride_ping --iface can0 --id 11 --read-status # Equivalent via the unified CLI: hc bus ping --iface can0 --id 11 @@ -65,8 +65,8 @@ Used in: [Tutorials → Drive one Robstride](../tutorials/drive_one_robstride.md ### `robstride_discover` ```bash -ros2 run humanoid_control_robstride robstride_discover --iface can0 -ros2 run humanoid_control_robstride robstride_discover --iface can0 \ +ros2 run humanoid_devices_robstride robstride_discover --iface can0 +ros2 run humanoid_devices_robstride robstride_discover --iface can0 \ --scan-from 1 --scan-to 127 --per-id-wait-ms 8 # Equivalent via the unified CLI: @@ -94,8 +94,8 @@ Used in: [How-to → Probe CAN bus](../how_to/probe_can_bus.md), ### `mit_slider_gui` ```bash -ros2 run humanoid_control_robstride mit_slider_gui -ros2 run humanoid_control_robstride mit_slider_gui \ +ros2 run humanoid_devices_robstride mit_slider_gui +ros2 run humanoid_devices_robstride mit_slider_gui \ --joint actuator_1 \ --command-topic /forward_mit_controller/commands \ --position-range -3.14 3.14 \ @@ -150,8 +150,8 @@ Used in: [Concepts → Five-mode FSM](../concepts/five_mode_fsm.md), ### `calibrate_robot` ```bash -ros2 run humanoid_control_bringup_lite calibrate_robot --output ./calibration.yaml -ros2 run humanoid_control_bringup_lite calibrate_robot \ +ros2 run humanoid_bringup_lite calibrate_robot --output ./calibration.yaml +ros2 run humanoid_bringup_lite calibrate_robot \ --output ./calibration.yaml --sweep-threshold 0.3 ``` @@ -170,14 +170,14 @@ Used in: [How-to → Calibrate the zero pose](../how_to/calibrate_zero_pose.md). ### `rerun_viz` / `viser_viz` The two live-viewer executables. **On the tethered deployment they -are spawned via `ros2 launch humanoid_control_bringup_lite viz.launch.py` on the +are spawned via `ros2 launch humanoid_bringup_lite viz.launch.py` on the operator workstation** (`viewer:=viser` by default; `viewer:=rerun` for the native window). Direct invocation is the single-machine sim/dev shortcut: ```bash -ros2 run humanoid_control_bringup_lite rerun_viz # native rerun window -ros2 run humanoid_control_bringup_lite viser_viz # browser viewer at http://0.0.0.0:8080 +ros2 run humanoid_bringup_lite rerun_viz # native rerun window +ros2 run humanoid_bringup_lite viser_viz # browser viewer at http://0.0.0.0:8080 ``` Both read `/robot_description` (latched) once, subscribe to a diff --git a/docs/reference/hardware_specs.md b/docs/reference/hardware_specs.md index 34f3c4a..540d338 100644 --- a/docs/reference/hardware_specs.md +++ b/docs/reference/hardware_specs.md @@ -60,7 +60,7 @@ the generated file): ``` xacro expands those into `` children on the `` element, which -`humanoid_control_robstride/RobstrideSystem::on_init` reads (and, for `torque_limit` / +`humanoid_devices_robstride/RobstrideSystem::on_init` reads (and, for `torque_limit` / `current_limit`, also writes to the actuator firmware at `on_activate` via the Robstride parameter IDs `0x700B` and `0x7018` — same writes the upstream `T-K-233/Lite-Lowlevel-Python`'s `humanoid_control/control.py` performs). @@ -97,7 +97,7 @@ the `lite_description` repo and flows back through `bar.repos`: # 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 humanoid_control_bringup_lite real.launch.py + ros2 launch humanoid_bringup_lite real.launch.py ``` For a throwaway bench experiment, edit the caps directly in the vcs-imported @@ -108,12 +108,12 @@ the `lite_description` repo and flows back through `bar.repos`: 5. Confirm in the bringup log that the new value flowed through: ``` - [humanoid_control_robstride] Wrote torque_limit=15.0 to can_id=11 (left_shoulder_pitch) - [humanoid_control_robstride] Wrote current_limit=20.0 to can_id=11 (left_shoulder_pitch) + [humanoid_devices_robstride] Wrote torque_limit=15.0 to can_id=11 (left_shoulder_pitch) + [humanoid_devices_robstride] Wrote current_limit=20.0 to can_id=11 (left_shoulder_pitch) ``` **No separate calibration step.** Unlike `homing_offset` (per-physical-robot, -lives in `humanoid_control_bringup_lite/config/calibration.yaml`), torque and current +lives in `humanoid_bringup_lite/config/calibration.yaml`), torque and current caps are per-robot-tuning — same value on every Lite physical instance, versioned alongside the URDF. If you want to A/B-test caps across deployments without editing source, set up two checked-out branches of @@ -138,8 +138,8 @@ authoritative for what's *on the bus*, not just what's *in this process*. Lite uses **two SocketCAN buses** (CAN-to-USB adapters), one per arm. Each bus is a separate `` block in the URDF, each loading its own -`humanoid_control_robstride/RobstrideSystem` instance. The default bus names come from -`humanoid_control_bringup_lite/config/lite_hardware.yaml`, which the launch passes through +`humanoid_devices_robstride/RobstrideSystem` instance. The default bus names come from +`humanoid_bringup_lite/config/lite_hardware.yaml`, which the launch passes through to xacro as the `hardware_config:=` arg: | Block | Default ifname | CAN ids | @@ -168,11 +168,11 @@ hc bus discover --iface can1 --scan-to 32 # Expect 7 + 7 = 14 actuators replying at ids 11..17 and 21..27. # 3. Calibrate the zero pose (once per physical robot). -ros2 launch humanoid_control_bringup_lite calibrate.launch.py +ros2 launch humanoid_bringup_lite calibrate.launch.py # Hand-sweep every joint to both extremes. Ctrl+C to write calibration.yaml. # 4. Real-hardware bringup. -ros2 launch humanoid_control_bringup_lite real.launch.py +ros2 launch humanoid_bringup_lite real.launch.py ``` If `hc bus discover` reports `ENOBUFS` / TX-drop warnings, the actuator @@ -206,7 +206,7 @@ projections; cross-check against `prime_description` + `prime_hardware.yaml`. Prime is unique in that **two `` blocks coexist** in its URDF — one binds `ethercat_driver/EthercatDriver`, the other binds -`humanoid_control_sito/SitoSystem`. The controller_manager runs both concurrently; +`humanoid_devices_sito/SitoSystem`. The controller_manager runs both concurrently; controllers see a single flat joint list regardless of which bus carries them. ## MIT-mode command convention @@ -240,5 +240,5 @@ silicon and sim with no URDF interface-tag rewrites. consumed by ros2_control and the mode FSM. - [humanoid_control_lite_controllers.yaml](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_controllers/config/humanoid_control_lite_controllers.yaml) — the canonical 17-joint binding for every controller. -- [`humanoid_control_robstride/include/humanoid_control_robstride/robstride_system.hpp`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_control_devices/humanoid_control_robstride/include/humanoid_control_robstride/robstride_system.hpp) +- [`humanoid_devices_robstride/include/humanoid_devices_robstride/robstride_system.hpp`](https://github.com/Berkeley-Humanoids/humanoid_control/blob/main/humanoid_devices/humanoid_devices_robstride/include/humanoid_devices_robstride/robstride_system.hpp) — the SystemInterface implementation for the Lite hardware path. \ No newline at end of file diff --git a/docs/reference/launch_args.md b/docs/reference/launch_args.md index ddbdbd1..efc47f1 100644 --- a/docs/reference/launch_args.md +++ b/docs/reference/launch_args.md @@ -9,14 +9,14 @@ bundled launch enables that path. Launches live in two repos: -- `humanoid_control` ships the Lite + Prime control-plane bringups (`humanoid_control_bringup_lite`, - `humanoid_control_bringup_prime`), the URDF inspector (`humanoid_control_bringup_lite`), +- `humanoid_control` ships the Lite + Prime control-plane bringups (`humanoid_bringup_lite`, + `humanoid_bringup_prime`), the URDF inspector (`humanoid_bringup_lite`), and the policy prepare-and-load launches (`humanoid_control_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`). -## `humanoid_control_bringup_lite/launch/view_lite.launch.py` +## `humanoid_bringup_lite/launch/view_lite.launch.py` URDF inspector — no controller_manager, no physics. @@ -28,17 +28,17 @@ Implicit: forces `use_fake_hardware:=true` on the xacro so the `` block is harmless when `robot_state_publisher` parses the URDF. -## `humanoid_control_bringup_lite/launch/real.launch.py` +## `humanoid_bringup_lite/launch/real.launch.py` -Real-hardware Lite bringup. Loads **two** `humanoid_control_robstride/RobstrideSystem` +Real-hardware Lite bringup. Loads **two** `humanoid_devices_robstride/RobstrideSystem` instances, one per physical SocketCAN bus (`LiteLeftArm` claims CAN ids 11..17 on the left bus, `LiteRightArm` claims 21..27 on the right bus). | Arg | Default | Effect | |---|---|---| | `mode` | `arms` | `arms` = 14 joints (default). `arms_neck` = 17 joints (requires neck silicon). | -| `hardware_config` | `/config/lite_hardware.yaml` | Per-machine bus + joint config. Maps the two `` blocks to specific SocketCAN ifnames and joint IDs. Override to retarget a robot whose CAN ifnames differ. | -| `calibration_file` | `/config/calibration.yaml` | Absolute path to the per-physical-robot zero-offset YAML. Pass `''` for identity calibration (only the URDF `direction` sign flip applies, no offset). See [Hardware specs → Bus-bring-up checklist](./hardware_specs.md#bus-bring-up-checklist) for how to regenerate. | +| `hardware_config` | `/config/lite_hardware.yaml` | Per-machine bus + joint config. Maps the two `` blocks to specific SocketCAN ifnames and joint IDs. Override to retarget a robot whose CAN ifnames differ. | +| `calibration_file` | `/config/calibration.yaml` | Absolute path to the per-physical-robot zero-offset YAML. Pass `''` for identity calibration (only the URDF `direction` sign flip applies, no offset). See [Hardware specs → Bus-bring-up checklist](./hardware_specs.md#bus-bring-up-checklist) for how to regenerate. | | `enable_mode_manager` | `true` | `false` skips spawning the FSM orchestrator. Used by `calibrate.launch.py` and for raw-debug bringups where the operator drives controllers directly via `ros2 control switch_controllers`. | | `enable_gamepad` | `true` | `true` spawns `joy_node` so `mode_manager` can read `/joy`. **The launch hard-fails on missing `joy_dev`.** Pass `false` on a keyboardless lab box to drive the FSM via the `/humanoid_control/mode/*` `std_srvs/Trigger` services instead. | | `joy_dev` | `/dev/input/js0` | Path passed verbatim to `joy_node`'s `dev` parameter. Override when the onboard computer enumerates the gamepad as something other than `js0` (multiple gamepads plugged in, udev rename). The pre-launch check fails fast when the specific path is missing and lists any other `/dev/input/js*` devices it can see, so the error message tells you which override to pass. Ignored when `enable_gamepad:=false`. | @@ -53,13 +53,13 @@ gravity-comp today, VLA later; see [Controllers](./controllers.md)). **Visualisers are not in this launch.** `real.launch.py` is the onboard-computer entrypoint of the tethered deployment split — it publishes `/robot_description` and `/lite/joint_states` over DDS but -spawns no viewers. Run `ros2 launch humanoid_control_bringup_lite viz.launch.py` +spawns no viewers. Run `ros2 launch humanoid_bringup_lite viz.launch.py` on the operator workstation (see the -[`viz.launch.py` section](#humanoid_control_bringup_litelaunchvizlaunchpy) below). +[`viz.launch.py` section](#humanoid_bringup_litelaunchvizlaunchpy) below). Implicit on the xacro: `use_fake_hardware:=false use_sim:=false`. -## `humanoid_control_bringup_lite/launch/viz.launch.py` +## `humanoid_bringup_lite/launch/viz.launch.py` Host-side live visualiser. Runs on the **operator workstation** of the tethered deployment split (not on the onboard computer). Subscribes to @@ -77,7 +77,7 @@ launch twice in two terminals if you need both viewers simultaneously (same pattern as running two mjlab `play` processes upstream). -## `humanoid_control_bringup_lite/launch/calibrate.launch.py` +## `humanoid_bringup_lite/launch/calibrate.launch.py` Bundles `real.launch.py` with three overrides (`calibration_file:='' enable_mode_manager:='false' enable_gamepad:='false'`) @@ -88,7 +88,7 @@ which is the frame the homing-offset formula expects. | Arg | Default | Effect | |---|---|---| | `hardware_config` | `` | Forwarded to `real.launch.py`. | -| `output` | `$PWD/calibration.yaml` | Path the calibration observer writes on Ctrl+C. After verifying, `mv` it over `humanoid_control_bringup_lite/config/calibration.yaml` to make it the default for the next `real.launch.py`. | +| `output` | `$PWD/calibration.yaml` | Path the calibration observer writes on Ctrl+C. After verifying, `mv` it over `humanoid_bringup_lite/config/calibration.yaml` to make it the default for the next `real.launch.py`. | | `sweep_threshold` | `0.5` | Minimum joint sweep (rad) below which the prior `homing_offset` is preserved instead of recomputed. Lets you re-calibrate one or two joints at a time without losing the others. | The observer reads per-joint static config (`direction`, `lower_limit`, @@ -98,7 +98,7 @@ per-joint keys as [`T-K-233/Lite-Lowlevel-Python`](https://github.com/T-K-233/Lite-Lowlevel-Python)'s JSON output, so values move between the two stacks unchanged. -## `humanoid_control_bringup_lite/launch/mujoco.launch.py` +## `humanoid_bringup_lite/launch/mujoco.launch.py` MuJoCo Lite bringup. Loads `mujoco_ros2_control/MujocoSystem` inside the `mujoco_sim` process (which hosts the controller_manager as a physics @@ -118,23 +118,23 @@ Implicit: decision tree in [Packages](packages.md#lite_description--prime_description-external). - Every node runs with `use_sim_time:=true`. Time advances at MuJoCo's pace via `/clock`. -- `humanoid_control_bringup_lite/config/sim_overrides.yaml` is layered on top of +- `humanoid_bringup_lite/config/sim_overrides.yaml` is layered on top of `humanoid_controllers/config/humanoid_control_lite_controllers.yaml` so the real-hardware launch stays sim-time-free. -## `humanoid_control_bringup_prime/launch/real.launch.py` +## `humanoid_bringup_prime/launch/real.launch.py` Stub real-hardware Prime bringup. Designed to load both -`ethercat_driver/EthercatDriver` (eRob arms) and `humanoid_control_sito/SitoSystem` +`ethercat_driver/EthercatDriver` (eRob arms) and `humanoid_devices_sito/SitoSystem` (auxiliary) — two concurrent `` blocks in the URDF. The Prime URDF / MJCF is **not yet imported** from CAD — -`humanoid_control_bringup_prime` is a stub today and this launch will not wire +`humanoid_bringup_prime` is a stub today and this launch will not wire controllers until that import lands. -## `humanoid_control_bringup_prime/launch/mujoco.launch.py` +## `humanoid_bringup_prime/launch/mujoco.launch.py` -Stub mirror of `humanoid_control_bringup_lite/mujoco.launch.py` for Prime, pending +Stub mirror of `humanoid_bringup_lite/mujoco.launch.py` for Prime, pending the Prime MJCF import. ## `humanoid_control_policy/launch/lite_policy.launch.py` @@ -205,15 +205,15 @@ apart. MuJoCo bringup for the piano task. Composes the Lite robot and the piano MJCF into one scene file (`_runtime_lite_piano.xml`) inside `lite_description`'s `robots/lite_dummy/mjcf/` share dir, then delegates to -`humanoid_control_bringup_lite/mujoco.launch.py` with `scene:=_runtime_lite_piano`. +`humanoid_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. | Arg | Default | Effect | |---|---|---| -| `enable_gamepad` | `true` | Forwarded to `humanoid_control_bringup_lite/mujoco.launch.py`. | +| `enable_gamepad` | `true` | Forwarded to `humanoid_bringup_lite/mujoco.launch.py`. | | `mode` | `arms` | Forwarded. | -| `hardware_config` | `/config/lite_hardware.yaml` | Forwarded. | +| `hardware_config` | `/config/lite_hardware.yaml` | Forwarded. | `scene:=` is **not** exposed — `pianist_bringup` controls that internally. @@ -241,16 +241,16 @@ robot involved, no tether): ```sh # Drag joints in RViz, no controllers. -ros2 launch humanoid_control_bringup_lite view_lite.launch.py +ros2 launch humanoid_bringup_lite view_lite.launch.py # MuJoCo physics, /clock from sim time. -ros2 launch humanoid_control_bringup_lite mujoco.launch.py +ros2 launch humanoid_bringup_lite mujoco.launch.py # Lite + piano in MuJoCo (pianist_bringup composes the scene). ros2 launch pianist_bringup mujoco.launch.py # Calibrate the zero pose (writes ./calibration.yaml on Ctrl+C). -ros2 launch humanoid_control_bringup_lite calibrate.launch.py +ros2 launch humanoid_bringup_lite calibrate.launch.py ``` **Robot onboard computer** (CM + hardware + FSM + gamepad — boots @@ -258,13 +258,13 @@ the real control plane, no visualisers, no policy runner): ```sh # Real Lite, gamepad on by default. Press R1+B at STANDBY to start the remote policy. -ros2 launch humanoid_control_bringup_lite real.launch.py +ros2 launch humanoid_bringup_lite real.launch.py # Same, but on a keyboardless lab box (drive the FSM via /humanoid_control/mode/* services). -ros2 launch humanoid_control_bringup_lite real.launch.py enable_gamepad:=false +ros2 launch humanoid_bringup_lite real.launch.py enable_gamepad:=false # Gamepad enumerated as js1 instead of js0 (multiple controllers plugged in). -ros2 launch humanoid_control_bringup_lite real.launch.py joy_dev:=/dev/input/js1 +ros2 launch humanoid_bringup_lite real.launch.py joy_dev:=/dev/input/js1 ``` **Robot onboard computer — prepare + load a policy** (the in-process @@ -292,8 +292,8 @@ to the robot strictly via DDS over a wired link): ```sh # Live URDF + /lite/joint_states viewer (browser at :8080 by default). -ros2 launch humanoid_control_bringup_lite viz.launch.py # viser -ros2 launch humanoid_control_bringup_lite viz.launch.py viewer:=rerun # native rerun window +ros2 launch humanoid_bringup_lite viz.launch.py # viser +ros2 launch humanoid_bringup_lite viz.launch.py viewer:=rerun # native rerun window ``` Both machines must share `ROS_DOMAIN_ID` and (recommended) `RMW_IMPLEMENTATION`. diff --git a/docs/reference/manual_controllers.md b/docs/reference/manual_controllers.md index bc9e63a..66afeca 100644 --- a/docs/reference/manual_controllers.md +++ b/docs/reference/manual_controllers.md @@ -49,7 +49,7 @@ length must match `interface_names`'s length; each element goes straight to the matching command interface in order. The single-actuator bringup -(`humanoid_control_robstride/single_robstride_gui.launch.py`) is the canonical +(`humanoid_devices_robstride/single_robstride_gui.launch.py`) is the canonical example. ## `joint_trajectory_controller` (stock ros2_controllers) diff --git a/docs/reference/messages.md b/docs/reference/messages.md index c0cfa0c..b96f914 100644 --- a/docs/reference/messages.md +++ b/docs/reference/messages.md @@ -98,7 +98,7 @@ uint8 FAULT = 2 # commands no longer guaranteed; transition recommended uint8 CRITICAL = 3 # immediate fault fallback required uint8 level -string source # e.g. "humanoid_control_robstride/can0", "rl_policy_controller" +string source # e.g. "humanoid_devices_robstride/can0", "rl_policy_controller" uint32 flags # plugin-specific bitmask string message ``` diff --git a/docs/reference/packages.md b/docs/reference/packages.md index d70914b..2ee929c 100644 --- a/docs/reference/packages.md +++ b/docs/reference/packages.md @@ -82,7 +82,7 @@ in `humanoid_control`** — 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 `humanoid_control_bringup_lite`. Prime's description likewise lives in the external [`prime_description`](https://github.com/T-K-233/Prime-Description) repo (bar deploys the `prime_dummy` variant, which also carries the hybrid eRob+Sito ``). +lives in `humanoid_bringup_lite`. Prime's description likewise lives in the external [`prime_description`](https://github.com/T-K-233/Prime-Description) repo (bar deploys the `prime_dummy` variant, which also carries the hybrid eRob+Sito ``). Layout (Lite shown, inside the `lite_description` repo): @@ -113,21 +113,21 @@ real-hardware path. Values mirror [Hardware specifications → Joint table](./hardware_specs.md#joint-table) for the canonical values. -### `humanoid_control_drivers/humanoid_control_socketcan` +### `humanoid_drivers/humanoid_drivers_socketcan` Reusable SocketCAN bus library. Owns the kernel-facing CAN socket lifecycle, a dedicated I/O thread, and lock-free buffers. Per-actuator-family plugins -(`humanoid_control_robstride`, `humanoid_control_sito`) consume its synchronous `read_state()` / +(`humanoid_devices_robstride`, `humanoid_devices_sito`) consume its synchronous `read_state()` / `write_command()` API. **Pattern reference**: mirrors the `soem_ros2` / `cleardrive_ros2` split from `legged_control2`. -### `humanoid_control_devices/humanoid_control_robstride` and `humanoid_control_devices/humanoid_control_sito` +### `humanoid_devices/humanoid_devices_robstride` and `humanoid_devices/humanoid_devices_sito` Per-actuator-family `hardware_interface::SystemInterface` plugins. -`humanoid_control_robstride` for Lite (and Prime's auxiliary joints if added later); -`humanoid_control_sito` for Prime's Sito side. +`humanoid_devices_robstride` for Lite (and Prime's auxiliary joints if added later); +`humanoid_devices_sito` for Prime's Sito side. Both: - Export the standard **3 state interfaces** (`/position`, `/velocity`, `/effort`). @@ -135,7 +135,7 @@ Both: - Read `can_interface` (system-level) and per-joint `can_id` from URDF params. - Register via `pluginlib` against `hardware_interface::SystemInterface`. -`humanoid_control_robstride` additionally: +`humanoid_devices_robstride` additionally: - Reads per-joint **`model`** (one of `rs-00`..`rs-06` — drives the MIT-mode scaling limits), **`direction`** (±1), **`lower_limit`** / **`upper_limit`** @@ -201,7 +201,7 @@ See [Controllers reference](controllers.md). The unified verb/noun CLI surface (`hc bus ping`, `hc bus discover`, `hc motor slider`, `hc viz rerun`, `hc viz viser`). An ament_python package that thin-wraps the underlying executables shipped by -`humanoid_control_robstride` and `humanoid_control_bringup_lite`. Invoke as `bar …` +`humanoid_devices_robstride` and `humanoid_bringup_lite`. Invoke as `bar …` once `install/setup.bash` is sourced. (`pixi run hc …` is the workspace-level shortcut — see [Workspace shortcuts with pixi](../how_to/use_pixi_tasks.md).) @@ -240,7 +240,7 @@ cloned side-by-side under `humanoid_control_ws/src/`: | Package | Build type | What it ships | |---|---|---| | `pianist_assets` | ament_cmake | Piano MJCF (`piano.xml`) installed under `/pianist_assets/mjcf/`. | -| `pianist_bringup` | ament_cmake | `mujoco.launch.py` — composes a `_runtime_lite_piano.xml` scene next to `lite.xml` (so MuJoCo's `meshdir="../meshes/"` resolves), then delegates to `humanoid_control_bringup_lite/mujoco.launch.py` with `scene:=_runtime_lite_piano`. Also spawns `piano_state_bridge` so `/piano/key_state` exists on the sim path. | +| `pianist_bringup` | ament_cmake | `mujoco.launch.py` — composes a `_runtime_lite_piano.xml` scene next to `lite.xml` (so MuJoCo's `meshdir="../meshes/"` resolves), then delegates to `humanoid_bringup_lite/mujoco.launch.py` with `scene:=_runtime_lite_piano`. Also spawns `piano_state_bridge` so `/piano/key_state` exists on the sim path. | | `pianist_msgs` | ament_cmake | Piano-task messages. No longer carries the key-state stream (that moved to a generic `std_msgs/Float32MultiArray` on `/piano/key_state`). | | `pianist_policy` | ament_python | `prepare` console script + `piano_policy.launch.py` (runs the piano `prepare`, then loads the in-process `rl_policy_controller` inactive — the piano task is selected by the ONNX `task_type='piano'`). Also ships the live key-state nodes `piano_state_bridge` (sim) and `midi_keyboard_driver` (real USB-MIDI), both publishing `std_msgs/Float32MultiArray` on `/piano/key_state`, with a matching `midi_keyboard_driver.launch.py`. | @@ -252,9 +252,9 @@ and the song reference is baked into the `.mcap` the controller loads. New task families follow the same pattern: depend on `humanoid_control_msgs` + `humanoid_control_policy`, ship a `_policy prepare` tool that emits the overlay + `.mcap`, and a bringup launch composing onto -`humanoid_control_bringup_lite/mujoco.launch.py` or `…/real.launch.py`. +`humanoid_bringup_lite/mujoco.launch.py` or `…/real.launch.py`. -### `humanoid_control_bringup_lite` / `humanoid_control_bringup_prime` +### `humanoid_bringup_lite` / `humanoid_bringup_prime` The "main()" of the project. Each robot ships **parallel launches** (franka_ros2-style per-robot bringup — there is no top-level @@ -265,9 +265,9 @@ for which side runs which): | Launch | Deployment side | Hardware path | Selected xacro args | |---|---|---|---| -| `real.launch.py` | Robot onboard computer | `humanoid_control_robstride` / `humanoid_control_sito` over SocketCAN (+ EtherCAT for Prime) | `use_fake_hardware:=false use_sim:=false` | +| `real.launch.py` | Robot onboard computer | `humanoid_devices_robstride` / `humanoid_devices_sito` over SocketCAN (+ EtherCAT for Prime) | `use_fake_hardware:=false use_sim:=false` | | `mujoco.launch.py` | Single-machine sim/dev | `mujoco_ros2_control/MujocoSystem` inside `mujoco_sim` | `use_sim:=true` | -| `calibrate.launch.py` | Single-machine (robot benchtop) | `humanoid_control_robstride` with identity calibration + `calibrate_robot` observer | `use_fake_hardware:=false use_sim:=false` | +| `calibrate.launch.py` | Single-machine (robot benchtop) | `humanoid_devices_robstride` with identity calibration + `calibrate_robot` observer | `use_fake_hardware:=false use_sim:=false` | | `viz.launch.py` | Operator workstation (host) | DDS-consumer only; no controller_manager, no hardware | n/a — only subscribes | The first two launches: @@ -281,26 +281,26 @@ The first two launches: 5. Start `mode_manager` (when `enable_mode_manager:=true`). 6. Start `joy_node` (when `enable_gamepad:=true`, which is the default). -`humanoid_control_bringup_lite/config/sim_overrides.yaml` adds `use_sim_time:=true` +`humanoid_bringup_lite/config/sim_overrides.yaml` adds `use_sim_time:=true` on top of `humanoid_control_lite_controllers.yaml` for the MuJoCo path. -`humanoid_control_bringup_lite/config/calibration.yaml` is the per-physical-robot -zero offset that `humanoid_control_robstride` applies at the bus boundary on the -real path (regenerate via `ros2 launch humanoid_control_bringup_lite calibrate.launch.py` — see the -[Launch args](launch_args.md#humanoid_control_bringup_litelaunchcalibratelaunchpy) -page). `humanoid_control_bringup_lite/config/lite_hardware.yaml` is the per-machine -bus + joint mapping consumed by xacro. `humanoid_control_bringup_prime/config/ethercat.yaml` +`humanoid_bringup_lite/config/calibration.yaml` is the per-physical-robot +zero offset that `humanoid_devices_robstride` applies at the bus boundary on the +real path (regenerate via `ros2 launch humanoid_bringup_lite calibrate.launch.py` — see the +[Launch args](launch_args.md#humanoid_bringup_litelaunchcalibratelaunchpy) +page). `humanoid_bringup_lite/config/lite_hardware.yaml` is the per-machine +bus + joint mapping consumed by xacro. `humanoid_bringup_prime/config/ethercat.yaml` configures the IgH master for Prime real-hardware bringup. -`humanoid_control_bringup_lite` also ships three operator-facing Python nodes. +`humanoid_bringup_lite` also ships three operator-facing Python nodes. The viewers are normally launched on the host side via -`ros2 launch humanoid_control_bringup_lite viz.launch.py` (which wraps them and +`ros2 launch humanoid_bringup_lite viz.launch.py` (which wraps them and selects between them via `viewer:=viser|rerun`); direct -`ros2 run humanoid_control_bringup_lite rerun_viz` / `viser_viz` is the +`ros2 run humanoid_bringup_lite rerun_viz` / `viser_viz` is the single-machine sim/dev shortcut: | Executable | Purpose | |---|---| -| `calibrate_robot` | Calibration observer — subscribes `/robot_description` + `/lite/joint_states`, tracks per-joint (min, max), writes the homing-offset YAML on Ctrl+C. Driven by `calibrate.launch.py` (`ros2 launch humanoid_control_bringup_lite calibrate.launch.py`). | +| `calibrate_robot` | Calibration observer — subscribes `/robot_description` + `/lite/joint_states`, tracks per-joint (min, max), writes the homing-offset YAML on Ctrl+C. Driven by `calibrate.launch.py` (`ros2 launch humanoid_bringup_lite calibrate.launch.py`). | | `rerun_viz` | Live URDF visualization in the **native** [rerun](https://rerun.io) viewer — auto-spawned subprocess by default, or `--connect host:port` to feed a remote one. Subscribes `/robot_description` (latched) and a `--joint-state-topic` (default `/lite/joint_states`); logs per-joint `Transform3D` to `/tf` at the tick rate. `rerun-sdk` ships in the workspace env. | | `viser_viz` | Same subscriptions and resolution pattern, rendering into a **browser** at `http://:` (default `0.0.0.0:8080`) via [viser](https://github.com/nerfstudio-project/viser). Friendlier for headless robot machines and SSH workflows. `viser`, `yourdfpy`, and `scipy` ship in the workspace env. | diff --git a/docs/reference/quick_reference.md b/docs/reference/quick_reference.md index c5c0065..2ee04d8 100644 --- a/docs/reference/quick_reference.md +++ b/docs/reference/quick_reference.md @@ -22,8 +22,8 @@ Grouped by which machine they run on. See [Concepts → Architecture → Deployment topology](../concepts/architecture.md#deployment-topology) for the split rationale. Launches come from two repos: -- `humanoid_control` ships the Lite + Prime bringups (`humanoid_control_bringup_lite`, - `humanoid_control_bringup_prime`), the description viewer (`humanoid_control_bringup_lite`), +- `humanoid_control` ships the Lite + Prime bringups (`humanoid_bringup_lite`, + `humanoid_bringup_prime`), the description viewer (`humanoid_bringup_lite`), and the policy prepare-and-load launch (`humanoid_control_policy`). - `pianist_ros2` ships the piano-task launches (`pianist_bringup` composes a Lite + piano MuJoCo scene; `pianist_policy` prepares the @@ -33,32 +33,32 @@ for the split rationale. Launches come from two repos: ```bash # Drag joints in RViz — no controllers, no physics -ros2 launch humanoid_control_bringup_lite view_lite.launch.py +ros2 launch humanoid_bringup_lite view_lite.launch.py # MuJoCo sim — full controller stack, /clock from sim time -ros2 launch humanoid_control_bringup_lite mujoco.launch.py +ros2 launch humanoid_bringup_lite mujoco.launch.py # Lite + piano in MuJoCo (pianist_bringup composes the scene, spawns piano_state_bridge) ros2 launch pianist_bringup mujoco.launch.py # Calibrate the zero pose (writes ./calibration.yaml on Ctrl+C) -ros2 launch humanoid_control_bringup_lite calibrate.launch.py +ros2 launch humanoid_bringup_lite calibrate.launch.py ``` ### Robot onboard computer (real bringup) ```bash # Real Lite — both buses, two ros2_control blocks, gamepad + mode_manager -ros2 launch humanoid_control_bringup_lite real.launch.py +ros2 launch humanoid_bringup_lite real.launch.py # Real Lite, no gamepad attached (drive the FSM via /humanoid_control/mode/* services) -ros2 launch humanoid_control_bringup_lite real.launch.py enable_gamepad:=false +ros2 launch humanoid_bringup_lite real.launch.py enable_gamepad:=false # Gamepad enumerated as js1 (multiple controllers plugged into the Jetson) -ros2 launch humanoid_control_bringup_lite real.launch.py joy_dev:=/dev/input/js1 +ros2 launch humanoid_bringup_lite real.launch.py joy_dev:=/dev/input/js1 # Real Lite, no FSM (raw debug / calibration) -ros2 launch humanoid_control_bringup_lite real.launch.py enable_mode_manager:=false +ros2 launch humanoid_bringup_lite real.launch.py enable_mode_manager:=false ``` `real.launch.py` boots the real-time control plane only — visualisers @@ -85,9 +85,9 @@ ros2 launch pianist_policy midi_keyboard_driver.launch.py ### Operator workstation (host side of the tether) ```bash -# Live URDF + /lite/joint_states viewer (humanoid_control_bringup_lite) -ros2 launch humanoid_control_bringup_lite viz.launch.py # viser, http://0.0.0.0:8080 -ros2 launch humanoid_control_bringup_lite viz.launch.py viewer:=rerun # native rerun window +# Live URDF + /lite/joint_states viewer (humanoid_bringup_lite) +ros2 launch humanoid_bringup_lite viz.launch.py # viser, http://0.0.0.0:8080 +ros2 launch humanoid_bringup_lite viz.launch.py viewer:=rerun # native rerun window ``` Both machines must share `ROS_DOMAIN_ID`. Full surface: @@ -109,7 +109,7 @@ ip -d link show can1 ## Diagnostic CLIs -These are the `hc` (humanoid_control_cli) verbs — equivalent `ros2 run humanoid_control_robstride …` +These are the `hc` (humanoid_control_cli) verbs — equivalent `ros2 run humanoid_devices_robstride …` invocations are listed in [CLI tools](./cli_tools.md). ```bash @@ -124,7 +124,7 @@ hc bus ping --iface can0 --id 11 hc motor slider # Live URDF + /lite/joint_states viewers (single-machine sim/dev shortcuts; -# on the tethered host, prefer `ros2 launch humanoid_control_bringup_lite viz.launch.py`) +# on the tethered host, prefer `ros2 launch humanoid_bringup_lite viz.launch.py`) hc viz viser # browser at :8080 hc viz rerun # native rerun window ``` diff --git a/docs/reference/reference_map.md b/docs/reference/reference_map.md index e78944a..5722428 100644 --- a/docs/reference/reference_map.md +++ b/docs/reference/reference_map.md @@ -79,7 +79,7 @@ side** runs it in-process in `RLPolicyController` (see lossy-network behaviour. This is the wire `humanoid_control_msgs_dds` targets. - **CAN / SocketCAN** — OpenArm and the RobStride bridge: `can0`/`slcan` → CAN frames → motor protocol → actuator. The basis for - `humanoid_control_socketcan` + `humanoid_control_robstride` / `humanoid_control_sito`. + `humanoid_drivers_socketcan` + `humanoid_devices_robstride` / `humanoid_devices_sito`. - **EtherCAT** — eRob SOEM/IGH and `legged_control2`'s SOEM interfaces: SOEM or IgH master, Distributed Clock, object-dictionary mapping, OP-state transitions, real-time kernel + CPU isolation. The basis for diff --git a/docs/reference/topics_services.md b/docs/reference/topics_services.md index 810b760..89e0c02 100644 --- a/docs/reference/topics_services.md +++ b/docs/reference/topics_services.md @@ -25,7 +25,7 @@ subscribes, or serves. Use this page to find "who publishes X" or | Topic | Type | QoS | Publisher | When present | |---|---|---|---|---| | `/control_mode` | `humanoid_control_msgs/ControlMode` | RELIABLE depth 10 | `mode_manager` | When `enable_mode_manager:=true` (default for `real.launch.py` / `mujoco.launch.py`). 50 Hz. | -| `/safety_status` | `humanoid_control_msgs/SafetyStatus` | RELIABLE TRANSIENT_LOCAL depth 1 | every hardware plugin | Per-bus (`humanoid_control_robstride/can0`, `humanoid_control_robstride/can1` for Lite). Published only on change. | +| `/safety_status` | `humanoid_control_msgs/SafetyStatus` | RELIABLE TRANSIENT_LOCAL depth 1 | every hardware plugin | Per-bus (`humanoid_devices_robstride/can0`, `humanoid_devices_robstride/can1` for Lite). Published only on change. | | `/standby_controller/state` | `humanoid_control_msgs/StandbyState` | RELIABLE TRANSIENT_LOCAL depth 1 | `humanoid_control/StandbyController` (when active) | Carries `is_finished` — the gate for `START_*` intents. | | `/joy` | `sensor_msgs/Joy` | SENSOR_DATA | `joy_node` | When `enable_gamepad:=true` (default). The launch hard-fails on missing `/dev/input/js*`. | diff --git a/docs/reference/troubleshooting.md b/docs/reference/troubleshooting.md index 9a60890..1c62a9b 100644 --- a/docs/reference/troubleshooting.md +++ b/docs/reference/troubleshooting.md @@ -141,8 +141,8 @@ xacro). entirely, the hardware plugin probably threw during `on_init` / `on_configure` and took the process down. Common causes: - URDF expansion failed (run `xacro ` directly to see the error). -- `humanoid_control_robstride` was rebuilt with an ABI-incompatible bump but - the .so wasn't reinstalled. `colcon build --symlink-install --packages-select humanoid_control_robstride`. +- `humanoid_devices_robstride` was rebuilt with an ABI-incompatible bump but + the .so wasn't reinstalled. `colcon build --symlink-install --packages-select humanoid_devices_robstride`. ## DDS discovery fails between launches and `ros2 topic ...` diff --git a/docs/reference/urdf_args.md b/docs/reference/urdf_args.md index 6836771..148d2ce 100644 --- a/docs/reference/urdf_args.md +++ b/docs/reference/urdf_args.md @@ -37,7 +37,7 @@ The xacro selects between three plugin paths based on these: ``` use_sim:=true -> mujoco_ros2_control/MujocoSystem use_fake_hardware:=true (use_sim:=false) -> mock_components/GenericSystem -(both false) -> humanoid_control_robstride/RobstrideSystem +(both false) -> humanoid_devices_robstride/RobstrideSystem ``` `use_sim` wins over `use_fake_hardware` — same precedence as the @@ -51,7 +51,7 @@ blocks: ```xml - humanoid_control_robstride/RobstrideSystem + humanoid_devices_robstride/RobstrideSystem ${can_interface_left} ${calibration_file} @@ -60,7 +60,7 @@ blocks: - humanoid_control_robstride/RobstrideSystem + humanoid_devices_robstride/RobstrideSystem ${can_interface_right} ${calibration_file} diff --git a/docs/tutorials/build_your_own_controller.md b/docs/tutorials/build_your_own_controller.md index c9516a0..d35d0fc 100644 --- a/docs/tutorials/build_your_own_controller.md +++ b/docs/tutorials/build_your_own_controller.md @@ -231,7 +231,7 @@ ros2 control list_controller_types | grep Hello ```bash # Bring up Lite with the FSM disabled so we can hand-load: -ros2 launch humanoid_control_bringup_lite mujoco.launch.py enable_mode_manager:=false +ros2 launch humanoid_bringup_lite mujoco.launch.py enable_mode_manager:=false ``` In another terminal, load the controller via the CLI (inside diff --git a/docs/tutorials/drive_one_robstride.md b/docs/tutorials/drive_one_robstride.md index c649ae1..6735730 100644 --- a/docs/tutorials/drive_one_robstride.md +++ b/docs/tutorials/drive_one_robstride.md @@ -11,7 +11,7 @@ You'll wire one actuator to one CAN bus, bring up a minimal By the end you'll have hands-on familiarity with: - The Robstride wire protocol (via `robstride_ping`). -- The `humanoid_control_robstride/RobstrideSystem` lifecycle. +- The `humanoid_devices_robstride/RobstrideSystem` lifecycle. - The 5-interface MIT command surface. - How calibration plays into the command-to-encoder transform. @@ -90,16 +90,16 @@ re-ping, `pos` should change correspondingly. ## Step 5 — Launch the single-motor test stack -`humanoid_control_robstride` ships a self-contained launch for this: +`humanoid_devices_robstride` ships a self-contained launch for this: ```bash -ros2 launch humanoid_control_robstride single_robstride_gui.launch.py \ +ros2 launch humanoid_devices_robstride single_robstride_gui.launch.py \ can_id:= ``` This brings up: - A 1-joint URDF describing your motor (`single_robstride_test`). -- `ros2_control_node` loading `humanoid_control_robstride/RobstrideSystem`. +- `ros2_control_node` loading `humanoid_devices_robstride/RobstrideSystem`. - `joint_state_broadcaster` (active). - `zero_torque_controller` (active — safe). - `forward_mit_controller` (loaded **inactive**). diff --git a/docs/tutorials/mujoco_fsm_walk.md b/docs/tutorials/mujoco_fsm_walk.md index 4900780..682aadf 100644 --- a/docs/tutorials/mujoco_fsm_walk.md +++ b/docs/tutorials/mujoco_fsm_walk.md @@ -47,7 +47,7 @@ If `joy_node` errors with permissions, your user isn't in the ## Step 1 — Launch with the gamepad ```bash -ros2 launch humanoid_control_bringup_lite mujoco.launch.py +ros2 launch humanoid_bringup_lite mujoco.launch.py # `enable_gamepad:=true` is already the default; the launch hard-fails # if no joystick is detected. Pass enable_gamepad:=false to bypass. ``` @@ -57,8 +57,8 @@ Two windows / processes come up: - `joy_node` reading `/dev/input/js0`. For an extra live URDF view, open a second terminal and run -`ros2 run humanoid_control_bringup_lite rerun_viz` or -`ros2 run humanoid_control_bringup_lite viser_viz`. +`ros2 run humanoid_bringup_lite rerun_viz` or +`ros2 run humanoid_bringup_lite viser_viz`. In a second terminal: diff --git a/docs/tutorials/run_gravity_compensation.md b/docs/tutorials/run_gravity_compensation.md index 37bfa8e..9c1bc6f 100644 --- a/docs/tutorials/run_gravity_compensation.md +++ b/docs/tutorials/run_gravity_compensation.md @@ -95,7 +95,7 @@ In the **bringup** terminal (inside `pixi shell`), start MuJoCo: ```bash cd humanoid_control_ws && pixi shell -ros2 launch humanoid_control_bringup_lite mujoco.launch.py +ros2 launch humanoid_bringup_lite mujoco.launch.py ``` Wait for `zero_torque_controller` to come active. (For real hardware, @@ -173,7 +173,7 @@ PD mode encodes the same gravity term as a **position offset** (`K=PD_POSITION_KP`, `D=PD_VELOCITY_KD`). The arm feels stiffer and self-centering rather than free-floating. Both publish in `LITE_ARM_JOINTS` order (the `arm_joints` list in -`humanoid_control_bringup_lite/config/lite_hardware.yaml`); `RemotePolicyController` +`humanoid_bringup_lite/config/lite_hardware.yaml`); `RemotePolicyController` rejects a joint-order mismatch. :::tip[No bringup, no robot] diff --git a/docs/tutorials/tracking_policy.md b/docs/tutorials/tracking_policy.md index 19f6542..93d6030 100644 --- a/docs/tutorials/tracking_policy.md +++ b/docs/tutorials/tracking_policy.md @@ -75,7 +75,7 @@ any of this into YAML. The same launch as the previous tutorial, no gamepad needed: ```bash -ros2 launch humanoid_control_bringup_lite mujoco.launch.py +ros2 launch humanoid_bringup_lite mujoco.launch.py ``` Wait for `zero_torque_controller` to come active. diff --git a/scripts/draw_diagrams.py b/scripts/draw_diagrams.py index 01309e7..b241efe 100644 --- a/scripts/draw_diagrams.py +++ b/scripts/draw_diagrams.py @@ -252,13 +252,13 @@ def d_intro_01_system() -> None: s.append(Box(50, 100, 210, 50, "IDE / editor", fill=GOLD_FILL, stroke=GOLD).render()) s.append(Box(50, 170, 210, 70, - ["MuJoCo viewer", "(humanoid_control_bringup_lite/mujoco)"], + ["MuJoCo viewer", "(humanoid_bringup_lite/mujoco)"], fill=GOLD_FILL, stroke=GOLD).render()) s.append(text(155, 300, "Edits, sim runs, debug", size=11, fill=GREY, anchor="middle")) # Onboard - s.append(Box(340, 100, 220, 50, "humanoid_control_bringup_lite / launch", + s.append(Box(340, 100, 220, 50, "humanoid_bringup_lite / launch", fill=BLUE_FILL, stroke=BLUE).render()) s.append(Box(340, 170, 220, 60, "controller_manager (50 Hz)", fill=BLUE_FILL, stroke=BLUE).render()) @@ -267,7 +267,7 @@ def d_intro_01_system() -> None: s.append(Box(460, 250, 100, 50, "humanoid_control_policy", fill=GOLD_FILL, stroke=GOLD).render()) s.append(Box(340, 320, 220, 60, - ["humanoid_control_robstride", "(SocketCAN)"], + ["humanoid_devices_robstride", "(SocketCAN)"], fill=GREEN_FILL, stroke=GREEN).render()) # Robot @@ -331,25 +331,25 @@ def pkg(x, y, name, sub=None, fill=BLUE_FILL, stroke=BLUE): pkg(40, 144, "humanoid_control_msgs", "MITCommand, ControlMode, ...") pkg(40, 198, "humanoid_controllers", "5 mode-FSM + mode_manager") pkg(40, 252, "humanoid_control_policy", "ONNX runner + LeRobot ref") - pkg(40, 306, "humanoid_control_socketcan", "SocketCAN bus library") + pkg(40, 306, "humanoid_drivers_socketcan", "SocketCAN bus library") # Lite column pkg(345, 110, "lite_description", "URDF + xacro + meshes", fill=GREEN_FILL, stroke=GREEN) - pkg(345, 180, "humanoid_control_robstride", "Robstride SystemInterface", + pkg(345, 180, "humanoid_devices_robstride", "Robstride SystemInterface", fill=GREEN_FILL, stroke=GREEN) - pkg(345, 250, "humanoid_control_bringup_lite", "launch + controllers YAML", + pkg(345, 250, "humanoid_bringup_lite", "launch + controllers YAML", fill=GREEN_FILL, stroke=GREEN) # Prime column pkg(645, 110, "humanoid_control_description_prime", "URDF + EtherCAT PDO", fill=RED_FILL, stroke=RED) - pkg(645, 180, "humanoid_control_sito", "Sito SystemInterface", + pkg(645, 180, "humanoid_devices_sito", "Sito SystemInterface", fill=RED_FILL, stroke=RED) - pkg(645, 250, "humanoid_control_bringup_prime", "+ ethercat.yaml", + pkg(645, 250, "humanoid_bringup_prime", "+ ethercat.yaml", fill=RED_FILL, stroke=RED) - # Arrows: humanoid_control_robstride -> humanoid_control_socketcan + # Arrows: humanoid_devices_robstride -> humanoid_drivers_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 humanoid_control_robstride plugin owns both buses; " + "On real hardware the humanoid_devices_robstride plugin owns both buses; " "from the controller's perspective the 17 joints are one flat list.", size=11, anchor="middle", fill=GREY)) @@ -749,7 +749,7 @@ def d_lite_mock_launch() -> None: W, H = 920, 540 s = [header(W, H)] s.append(title(20, 30, "MuJoCo bringup spawn sequence", - sub="What happens when you run `ros2 launch humanoid_control_bringup_lite mujoco.launch.py`")) + sub="What happens when you run `ros2 launch humanoid_bringup_lite mujoco.launch.py`")) lanes = [ ("launch", 100, 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, "humanoid_control_robstride/", sub="RobstrideSystem", + s.append(Box(490, 280, 230, 60, "humanoid_devices_robstride/", sub="RobstrideSystem", fill=RED_FILL, stroke=RED).render()) s.append(arrow(370, 240, 490, 305, label="false")) @@ -974,9 +974,9 @@ def d_arch_module_deps() -> None: s.append(group_box(790, 70, 170, 420, "External", fill="#FAFAFA")) # Application / bringup - s.append(Box(70, 95, 200, 40, "humanoid_control_bringup_lite", sub="launch + YAML", + s.append(Box(70, 95, 200, 40, "humanoid_bringup_lite", sub="launch + YAML", fill=BLUE_FILL, stroke=BLUE).render()) - s.append(Box(310, 95, 200, 40, "humanoid_control_bringup_prime", sub="(scaffold)", + s.append(Box(310, 95, 200, 40, "humanoid_bringup_prime", sub="(scaffold)", fill=BLUE_FILL, stroke=BLUE).render()) s.append(Box(550, 95, 190, 40, "pianist_policy", sub="piano key-state", fill=GOLD_FILL, stroke=GOLD).render()) @@ -990,10 +990,10 @@ def d_arch_module_deps() -> None: fill=GOLD_FILL, stroke=GOLD).render()) # Hardware plugins + description - s.append(Box(70, 305, 200, 50, "humanoid_control_robstride", + s.append(Box(70, 305, 200, 50, "humanoid_devices_robstride", sub="RobstrideSystem", fill=GREEN_FILL, stroke=GREEN).render()) - s.append(Box(310, 305, 200, 50, "humanoid_control_sito", + s.append(Box(310, 305, 200, 50, "humanoid_devices_sito", sub="(stub)", fill=GREEN_FILL, stroke=GREEN).render()) s.append(Box(550, 305, 190, 50, "lite_description", @@ -1001,7 +1001,7 @@ def d_arch_module_deps() -> None: fill=GREY_FILL, stroke=GREY).render()) # Foundations - s.append(Box(70, 425, 200, 50, "humanoid_control_socketcan", + s.append(Box(70, 425, 200, 50, "humanoid_drivers_socketcan", sub="bus library + I/O thread", fill=GREEN_FILL, stroke=GREEN).render()) s.append(Box(310, 425, 200, 50, "humanoid_control_msgs", @@ -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: humanoid_controllers does NOT find_package(humanoid_control_robstride) — " + "Note: humanoid_controllers does NOT find_package(humanoid_devices_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: 'humanoid_control_robstride/can0'", + s.append(Box(380, 290, 200, 40, "source: 'humanoid_devices_robstride/can0'", fill=GREY_FILL, stroke=GREY).render()) s.append(Box(380, 360, 200, 50, ["/safety_status", "(TRANSIENT_LOCAL)"], diff --git a/static/img/diagrams/concepts__architecture__03_module_deps.svg b/static/img/diagrams/concepts__architecture__03_module_deps.svg index 00ef68f..de9b80e 100644 --- a/static/img/diagrams/concepts__architecture__03_module_deps.svg +++ b/static/img/diagrams/concepts__architecture__03_module_deps.svg @@ -19,9 +19,9 @@ Hardware plugins + URDF Foundations (no humanoid_control_* deps) External -humanoid_control_bringup_lite +humanoid_bringup_lite launch + YAML -humanoid_control_bringup_prime +humanoid_bringup_prime (scaffold) pianist_policy piano key-state @@ -29,13 +29,13 @@ 5 modes + mode_manager humanoid_control_policy ONNX runner (Python) -humanoid_control_robstride +humanoid_devices_robstride RobstrideSystem -humanoid_control_sito +humanoid_devices_sito (stub) lite_description URDF/xacro/MJCF -humanoid_control_socketcan +humanoid_drivers_socketcan bus library + I/O thread humanoid_control_msgs MITCommand, ControlMode, ... @@ -57,4 +57,4 @@ nlohmann_json -pluginlibSolid arrow = build-time dep (CMake find_package + ament)Dashed arrow = runtime dep only (pluginlib)Note: humanoid_controllers does NOT find_package(humanoid_control_robstride) — the plugin is loaded by controller_manager at launch. +pluginlibSolid arrow = build-time dep (CMake find_package + ament)Dashed arrow = runtime dep only (pluginlib)Note: humanoid_controllers does NOT find_package(humanoid_devices_robstride) — the plugin is loaded by controller_manager at launch. diff --git a/static/img/diagrams/concepts__safety_pipeline__01.svg b/static/img/diagrams/concepts__safety_pipeline__01.svg index 1c67732..e18f929 100644 --- a/static/img/diagrams/concepts__safety_pipeline__01.svg +++ b/static/img/diagrams/concepts__safety_pipeline__01.svg @@ -35,7 +35,7 @@ flags: uint32 bit mask -source: 'humanoid_control_robstride/can0' +source: 'humanoid_devices_robstride/can0' /safety_status (TRANSIENT_LOCAL) diff --git a/static/img/diagrams/getting_started__intro__01.svg b/static/img/diagrams/getting_started__intro__01.svg index 64512c3..d4c2d31 100644 --- a/static/img/diagrams/getting_started__intro__01.svg +++ b/static/img/diagrams/getting_started__intro__01.svg @@ -20,9 +20,9 @@ IDE / editor MuJoCo viewer -(humanoid_control_bringup_lite/mujoco) +(humanoid_bringup_lite/mujoco) Edits, sim runs, debug -humanoid_control_bringup_lite / launch +humanoid_bringup_lite / launch controller_manager (50 Hz) @@ -30,7 +30,7 @@ humanoid_control_policy -humanoid_control_robstride +humanoid_devices_robstride (SocketCAN) IMU (serial / USB) diff --git a/static/img/diagrams/getting_started__intro__02.svg b/static/img/diagrams/getting_started__intro__02.svg index 72295e3..c6e5405 100644 --- a/static/img/diagrams/getting_started__intro__02.svg +++ b/static/img/diagrams/getting_started__intro__02.svg @@ -25,17 +25,17 @@ 5 mode-FSM + mode_manager humanoid_control_policy ONNX runner + LeRobot ref -humanoid_control_socketcan +humanoid_drivers_socketcan SocketCAN bus library lite_description URDF + xacro + meshes -humanoid_control_robstride +humanoid_devices_robstride Robstride SystemInterface -humanoid_control_bringup_lite +humanoid_bringup_lite launch + controllers YAML humanoid_control_description_prime URDF + EtherCAT PDO -humanoid_control_sito +humanoid_devices_sito Sito SystemInterface -humanoid_control_bringup_prime +humanoid_bringup_prime + ethercat.yamlArrows = depends on diff --git a/static/img/diagrams/getting_started__lite_101__01_mujoco_spawn.svg b/static/img/diagrams/getting_started__lite_101__01_mujoco_spawn.svg index 947f882..d9412c9 100644 --- a/static/img/diagrams/getting_started__lite_101__01_mujoco_spawn.svg +++ b/static/img/diagrams/getting_started__lite_101__01_mujoco_spawn.svg @@ -13,7 +13,7 @@ MuJoCo bringup spawn sequence -What happens when you run `ros2 launch humanoid_control_bringup_lite mujoco.launch.py`launchxacromujoco_simcontroller_managermode_manager +What happens when you run `ros2 launch humanoid_bringup_lite mujoco.launch.py`launchxacromujoco_simcontroller_managermode_manager expand xacro (use_sim:=true) URDF start mujoco_sim diff --git a/static/img/diagrams/reference__hardware_specs__02.svg b/static/img/diagrams/reference__hardware_specs__02.svg index c7438a3..2bfb3a4 100644 --- a/static/img/diagrams/reference__hardware_specs__02.svg +++ b/static/img/diagrams/reference__hardware_specs__02.svg @@ -37,4 +37,4 @@ CAN @ 1 Mbit -CAN @ 1 MbitOn real hardware the humanoid_control_robstride plugin owns both buses; from the controller's perspective the 17 joints are one flat list. +CAN @ 1 MbitOn real hardware the humanoid_devices_robstride plugin owns both buses; from the controller's perspective the 17 joints are one flat list. diff --git a/static/img/diagrams/reference__packages__01_xacro_selector.svg b/static/img/diagrams/reference__packages__01_xacro_selector.svg index b855cc6..67b75c8 100644 --- a/static/img/diagrams/reference__packages__01_xacro_selector.svg +++ b/static/img/diagrams/reference__packages__01_xacro_selector.svg @@ -31,7 +31,7 @@ true -humanoid_control_robstride/ +humanoid_devices_robstride/ RobstrideSystem falseuse_sim wins over use_fake_hardware when both are true