Install
Install Rosetta one of three ways. Pick by what you already have.
You have |
Use |
|---|---|
Nothing, and you want to run the tutorial |
|
Nothing, and you have your own robot |
|
A ROS 2 workspace already |
main is developed and tested on ROS 2 Lyrical (Python 3.14). CI runs no other
distro.
The demos workspace
ros-physical-ai/demos installs ROS 2 Lyrical, Gazebo, Rosetta and LeRobot through pixi, with a simulated SO-ARM101 and cameras. Linux only. You’ll want a GPU for training.
git clone https://github.com/ros-physical-ai/demos && cd demos
pixi install
pixi run install-deps # imports the source packages, installs torch for your GPU
pixi run build
Run ROS commands inside pixi shell, or prefix them with pixi run. The
Zenoh router has to be up first, in its own terminal:
pixi run zenoh-router
The demos pin their own Rosetta commits in pai.repos. Those commits
predate the rosetta_ros package these docs use, so commands such as
ros2 launch rosetta_ros ... fail there until the demos update their pins.
From source with pixi
The repository carries a pixi environment: ROS 2 Lyrical
through RoboStack, and LeRobot 0.6.1 with
torch from PyPI. pixi.lock pins it for Linux x86_64, Linux aarch64 and
macOS arm64. CI tests Linux x86_64.
git clone https://github.com/iblnkn/rosetta.git && cd rosetta
pixi run build # installs the environment on first use, then colcon build
Run ROS commands inside pixi shell, or prefix them with pixi run. Both
source install/setup.bash. Until the first build creates that file, every
pixi command prints WARN Could not find activation scripts: with its path.
pixi run test builds and runs every package’s tests, and pixi run lint
runs the same pre-commit hooks as CI. pixi task list shows the rest.
pixi.lock has no Windows platform. On Windows, use the repository’s dev
container, described in
CONTRIBUTING.md.
The environment leaves RMW_IMPLEMENTATION unset, so ROS uses its default
RMW. To use Zenoh instead, start the router in its own terminal and leave it
running:
pixi run start-zenoh
Then set the variable in each terminal where you run nodes:
export RMW_IMPLEMENTATION=rmw_zenoh_cpp
An existing workspace
Clone the repository into your workspace’s
src/, install the ROS dependencies, and buildrosetta_roswith what it depends on:git clone https://github.com/iblnkn/rosetta.git src/rosetta rosdep install --from-paths src --ignore-src -y colcon build --packages-up-to rosetta_ros source install/setup.bash
rosetta_roshas the nodes, launch files androsetta_port, and bringsrosettaandrosetta_interfaceswith it. To build everything, includingrosetta_ros_hiland the LeRobot packages, drop--packages-up-to rosetta_ros.For LeRobot, install it into the same Python that ROS uses.
rosetta_portwith the LeRobot writer,policy_runner_nodewith the LeRobot runner, and the LeRobot plugins all need it. LeRobot 0.6.1 needs two of its pins overridden on Python 3.14: itsnumpy<2.3has no 3.14 builds, and draccus needs a 3.14 fix that isn’t released yet. pip can’t override a dependency’s pin, so install with uv, as CI does:pip install --break-system-packages uv printf '%s\n' 'numpy>=2.3,<3' \ 'draccus @ git+https://github.com/francocipollone/draccus.git@8976f1d5bd3c7f78521f43c9c302396076064af2' \ > /tmp/lerobot-overrides.txt uv pip install --system --break-system-packages --override /tmp/lerobot-overrides.txt \ "lerobot[dataset,async]<0.6.2"
LeRobot 0.6.2 removes
lerobot.async_inference, which the LeRobot policy runner is built on, so the LeRobot packages requirelerobot<0.6.2. CI tests the newest release under that cap. Add thetrainingextra if you’ll runlerobot-train.Ubuntu 26.04 marks its system Python as externally managed, so plain pip there stops with
error: externally-managed-environment.--break-system-packagesinstalls into the system Python anyway.
Check the install
List the recorder’s launch arguments, then load a bundled contract:
ros2 launch rosetta_ros episode_recorder_launch.py --show-args
python3 -c "from rosetta.contract.schema import load_contract; load_contract('$(ros2 pkg prefix rosetta_ros)/share/rosetta_ros/contracts/so_101.yaml'); print('OK')"
The first command lists arguments from params_file to activate. The
second prints OK.
With lerobot_dataset_rosetta built, ros2 run rosetta_ros rosetta_port --help
lists lerobot after Installed: under --format. That list comes from
the built dataset writers and does not check that LeRobot itself imports.