Skip to content

JianuoCao/CLAW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CLAWπŸ¦€: Composable Language-Annotated Whole-body Motion Generation

arXiv Paper License: CC BY 4.0

Jianuo Cao*1,2, Yuxin Chen*2, Masayoshi Tomizuka2

*Equal contribution
1Nanjing University Β Β  2University of California, Berkeley

CLAW pipeline

CLAWπŸ¦€ is a web pipeline for scalable language-annotated whole-body motion generation on Unitree G1. Built on SONIC, it composes controllable motion primitives in MuJoCo, supports keyboard and timeline editing across 25 motion modes, and exports kinematic/dynamic trajectory-language datasets with multi-style annotations.

Prerequisites

Requirement Version
Ubuntu 20.04 / 22.04 / 24.04 (or other Debian-based)
Python β‰₯ 3.8
Node.js β‰₯ 18

Installation

1 β€” Clone this repository

git clone https://github.com/JianuoCao/GR00T-WBC-Dev
cd GR00T-WBC-Dev

2 β€” Set up GR00T-WholeBodyControl

Clone the NVIDIA upstream repo into this directory:

git clone https://github.com/NVlabs/GR00T-WholeBodyControl.git GR00T-WholeBodyControl
cd GR00T-WholeBodyControl && git lfs pull && cd ..

Your directory should now look like:

GR00T-WBC-Dev/
β”œβ”€β”€ GR00T-WholeBodyControl/
β”œβ”€β”€ web_wasm_demo/
β”œβ”€β”€ annotation/
└── scripts/

Then follow the three official guides to complete the NVIDIA-side setup:

  • Installation & Build β€” install dependencies, build the C++ inference stack
  • Download Models β€” pull policy checkpoints and ONNX files via git lfs
  • Quick Start β€” Following the "One-time setup" section (install the MuJoCo sim environment) is enough.

3 β€” Link robot model assets

ln -sfn ../../GR00T-WholeBodyControl/gear_sonic_deploy/g1 web_wasm_demo/public/g1
ln -sfn ../../GR00T-WholeBodyControl/gear_sonic_deploy/policy web_wasm_demo/public/policy

These expose the G1 model files and policy checkpoints to the Vite dev server, which only serves files under public/.

4 β€” Install web demo dependencies

Python bridge (WebSocket ↔ ZMQ):

pip3 install -r web_wasm_demo/requirements.txt

Frontend (Vite + Three.js + MuJoCo WASM):

npm install --prefix web_wasm_demo

Running the Demo

Open four terminals, all from the GR00T-WBC-Dev/ root.

Terminal 1 β€” MuJoCo simulation

source GR00T-WholeBodyControl/.venv_sim/bin/activate
python GR00T-WholeBodyControl/gear_sonic/scripts/run_sim_loop.py

A MuJoCo window will appear. Press 9 in that window to start the simulation.

Terminal 2 β€” C++ controller

Do not press Enter here until prompted β€” the script will ask for confirmation before starting real/sim hardware.

  1. Check whether ./GR00T-WholeBodyControl/gear_sonic_deploy/build exists.
  2. If it does not exist, complete Installation & Build first.
  3. Start the controller using one of the following methods.

If you built on the host, run:

./GR00T-WholeBodyControl/gear_sonic_deploy/deploy.sh sim --input-type zmq_manager

If you built in Docker, run:

./GR00T-WholeBodyControl/gear_sonic_deploy/docker/run-ros2-dev.sh
./deploy.sh sim --input-type zmq_manager
  1. Wait until Terminal 2 shows Init Done, then open Terminal 3.

Terminal 3 β€” WebSocket bridge

python web_wasm_demo/ws_bridge.py

Terminal 4 β€” Frontend

npm run dev --prefix web_wasm_demo

Open http://localhost:5173 in your browser (5173 is Vite's default port β€” check the terminal if it differs).


Demo Walkthrough

Overview

Demo overview

The interface is organized into six primary regions:

  1. Top Bar: control mode, render mode, the ONLINE indicator, Reset, and file status.
  2. Motion Library: the upper half of the left panel for browsing motion categories and motion clips.
  3. Robot Canvas: the central viewport where the robot is rendered and previewed live.
  4. Telemetry HUD: the right-side status panel showing controller state, movement, heading, and FPS.
  5. Segment Editor: the lower half of the left panel, which appears when a segment is selected for editing.
  6. Sequence Editor: the bottom timeline used to arrange and review motion segments.

Tip

When the page first opens, check whether the ONLINE indicator in the top-right corner is lit. If it is, the frontend has connected to the backend bridge successfully. Then select both a control mode and a render mode before continuing with the demo.

Control mode

The interface provides two control modes:

  • Keyboard Mode: direct real-time control from the keyboard.
  • Editor Mode: timeline-based authoring for multi-segment motion sequences.

Render mode

The render mode determines how the motion is visualized:

  • Kinematic: the robot follows the commanded trajectory directly, which is useful for clean preview, quick inspection, and sequence editing.
  • Dynamic: the robot is shown under the physics-driven controller, which better reflects physically grounded execution and controller response.

Place the two render-mode demos side by side:

Kinematic motion

Kinematic motion demo

Dynamic motion

Dynamic motion demo

Keyboard Mode

Key Action
Enter Activate or deactivate the controller
W / S Move forward or backward
A / D Turn left or right
Q / E Snap heading by -30Β° or +30Β°
, / . Strafe left or right (not available in some idle modes)
R Stop the current movement
Space Pause the viewport

User Guide

  1. Press Enter to activate control.

Keyboard mode single motion demo

  1. Click to select a motion from the motion library on the left.

choose a motion

  1. Use the keyboard to control the robot's direction, actions, speed, and root height.
Move forward and backward Strafe left and right
Snap turn motion Turn left and right

Tip

The planner transitions smoothly between modes by using the current robot state as its starting point, so you can switch to another motion at any time.


Editor Mode

Basic Functions

Drag: drag a motion from the library into the sequence editor to create a new segment.

Drag motion into sequence editor

Zoom: zoom the timeline to inspect segment boundaries and timing more precisely.

Zoom sequence editor timeline

Clear: clear the current sequence and return to an empty editing state.

Clear current sequence

Segment Editor panel

Once a segment is selected on the timeline, the lower-left panel becomes the Segment Editor.

  • Motion: motion clip assigned to the segment.
  • Move: directional intent.
  • Turn: turn behavior or heading change.
  • Speed / Height: motion-specific parameters (when available).

Play Motion

To play a motion sequence:

  1. Drag motions into the timeline and edit them as needed.
  2. Press Enter to activate control.
  3. Click Play to start the sequence. The robot will execute it in the canvas, and the timeline will advance from left to right.
  4. After playback, the interface automatically loads the kinematic trajectory, dynamic trajectory, and text annotation for the sequence. You can download these outputs directly. See Output Data Format for more details.

play motion


Output Data Format

After each sequence playback, the backend produces a structured data package stored under web_wasm_demo/results/<run_id>/. Three files are presented for download in the browser:

File Description
trajectory_kinematic.csv Kinematic reference trajectory at 50 Hz. Columns: timestamp, base pose (base_x/y/z, qw/qx/qy/qz), and 29 joint positions. Base XY is normalized so the trajectory starts at the origin.
trajectory_dynamic.csv Measured (physics-simulated) trajectory at 50 Hz. Same column layout as the kinematic CSV, with absolute base positions.
annotation.json Natural-language motion descriptions in a structured JSON format.

Acknowledgements

This project builds on GEAR-SONIC / GR00T-WholeBodyControl by NVIDIA GEAR Lab.

About

CLAWπŸ¦€ is a web pipeline for scalable language-annotated whole-body motion generation on Unitree G1.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors