Nodes
Both Rosetta nodes read parameter files (params/) as defaults. A launch file
exposes the deployment-specific subset as launch arguments (paths, storage
format, log level, lifecycle autostart); everything else is set in the params
YAML. Run ros2 launch rosetta <launch_file> --show-args to see the options.
episode_recorder_node
Records contract-specified topics to rosbag2. Launch: episode_recorder_launch.py.
Parameter |
Default |
Description |
|---|---|---|
|
|
Path to contract YAML (launch arg) |
|
|
Directory for rosbag output, relative to the launch cwd (launch arg) |
|
|
Rosbag format: |
|
|
Task label used when a goal leaves |
|
|
Max episode duration. |
|
|
Recording feedback publish rate |
|
|
Record every topic on the graph, not only contract topics |
|
|
Regex list of topics to skip when |
|
|
Regex list to always record, overriding |
|
|
Embed the contract text into bag metadata |
Actions and services: record_episode (action), ~/start_recording,
~/cancel_recording, ~/delete_last_bag.
Topic recording
By default the recorder records every topic on the ROS 2 graph, not just
those declared in the contract, so you never lose data you might need later.
This behaves like ros2 bag record -a. Contract topics are required to be
present. Only /rosout and /parameter_events are excluded automatically;
exclude_topics excludes more, and record_all: false records only
contract-declared topics.
Cameras are the exception: per camera the recorder keeps one image_transport
stream, preferring /compressed > /zstd > /theora > /compressedDepth >
raw. image_transport republishers encode only while subscribed, so recording
all of them makes the camera node encode every frame several ways at once.
episode_keyboard_node
Keyboard control for the recorder. Launch: episode_keyboard_launch.py, with
recorder_ns (default /episode_recorder) and default_prompt arguments.
Key |
Action |
|---|---|
|
Start recording |
|
Stop and save |
|
Discard episode (stop + delete bag) |
|
Edit task prompt for the next episode |
|
Help |
|
Quit |
policy_runner_node
Wraps a policy framework’s inference pipeline in ROS 2 actions. Launch:
policy_runner_launch.py. The first block is declared by the node; the second
by the resolved framework adapter, lerobot_rosetta here.
Parameter |
Default |
Description |
|---|---|---|
|
|
Optional when the checkpoint’s dataset embeds one (launch arg) |
|
|
Policy framework adapter, resolved by entry-point name |
|
|
Publish the reward section as the action output |
|
|
Task used when a goal leaves |
|
|
Max run duration. |
|
|
Execution feedback publish rate |
LeRobot adapter parameter |
Default |
Description |
|---|---|---|
|
(see params file) |
HuggingFace model ID or local path (launch arg) |
|
|
Policy server address (launch arg) |
|
|
|
|
|
|
|
|
Actions per inference chunk |
|
|
When to request a new chunk (0.0-1.0) |
|
|
|
|
|
Auto-start the policy server at configure, with model preload (launch arg) |
|
|
Max wait for the server, covering model preload |
|
|
Observation filtering tolerance. Ignored by stock LeRobot v0.6.0, where the filter is hardcoded on |
With use_sim_time true the adapter paces observations and actions on the
sim clock at the contract fps.
Actions and services: run_policy (action), ~/start_policy,
~/cancel_policy. A launch namespace prefixes the action name, as in
/robot_policy/run_policy under hil_launch.py.
When contract_path is empty, the node resolves the contract from the
checkpoint: pretrained_name_or_path → train_config.json → the training
dataset → meta/rosetta_contract.yaml.
hil_manager_node
Orchestrates human-in-the-loop episodes. Launch: hil_launch.py, which wires
the manager, a policy runner (namespace robot_policy), an optional reward
classifier (namespace reward_classifier), and the recorder. Params:
params/hil_manager.yaml covers all four.
Action: manage_episode. Services: ~/start_episode, ~/end_episode and
~/set_intervention and ~/set_reward_override (SetBool),
~/cancel_episode and ~/clear_reward_override (Trigger).
~/end_episode is the deliberate, labelled end: the goal succeeds and the
verdict lands in outcome. ~/cancel_episode abandons the take. Neither
deletes a bag.
ROS 2 lifecycle
All Rosetta nodes are lifecycle nodes.
Transition |
Effect |
|---|---|
|
Create subscriptions (start buffering), create publishers (disabled) |
|
Enable publishers, start watchdog, open goal acceptance |
|
Safety action, disable publishers, destroy resources |
Goals are accepted only while active, one at a time per node. A deactivate
stops in-progress work and ends its goal ABORTED with
termination_reason: node_deactivated.