Skip to content

When Should You Learn ROS 2? The Point Where Simulation-Only Practice Stops Being Enough

When MuJoCo and LeRobot are enough and when ROS 2 becomes necessary, plus eight core concepts, a QoS-aware rclpy example and official distro support dates.

Contents

Key takeaways

  1. You do not need ROS 2 to train and evaluate policies in MuJoCo or LeRobot. LeRobot drives Feetech and Dynamixel servos directly through its own Python Robot interface.
  2. Five signals mean it is time for ROS 2: the vendor driver ships only as a ROS 2 package, sensors run as separate processes, three or more coordinate frames interact (tf2), the arm needs collision-aware planning (MoveIt 2), or a mobile base must navigate a map (Nav2).
  3. The minimum concept set is eight items: nodes, topics, services, actions, parameters, launch, tf2 and QoS. Learn QoS first, because a mismatch shows up as silence rather than an error.
  4. As of October 31, 2026 the officially supported distributions are Lyrical (to May 2031, LTS), Kilted (to December 2026), Jazzy (to May 2029) and Humble (to May 2027).
  5. Isaac Sim 6.2.0 lists Humble and Jazzy as tested, and the stable ros2_control docs cover Kilted, Jazzy and Humble. For a new project today, Ubuntu 24.04 with Jazzy is the common denominator across tools.

After training a first policy in MuJoCo or LeRobot, the obvious next question is whether it is time to learn ROS 2. This article separates what you can finish with simulation-only tooling from the concrete signals that make ROS 2 worth the setup cost, narrows the learning scope to eight concepts with a small rclpy example, and lists the distributions the official docs currently support. By the end you should be able to decide whether to start now, and on which distribution.

What simulation-only tooling covers, and five signals that you need ROS 2

Start with what works without ROS 2. The LeRobot hardware integration guide has you subclass a Robot base class and implement connect(), get_observation() and send_action(), while Feetech and Dynamixel servos are driven directly through FeetechMotorsBus and DynamixelMotorsBus. In other words, collecting SO-101 data and training ACT with LeRobot fits in a single Python process with no ROS 2 at all. MuJoCo likewise runs simulation and evaluation from its Python bindings; how to pick a simulator in the first place is covered in our physics simulator comparison.

ROS 2 earns its place when the assumption “one robot equals one process” breaks. If any of the following five applies, it is time to start.

  1. The hardware driver ships only as a ROS 2 package. Some industrial arms, lidars and depth cameras are distributed by their vendors as ROS 2 nodes. Without a separate Python SDK, subscribing to those topics is the shortest path to the data.
  2. Sensors are split across processes or computers. Two cameras, an IMU and joint encoders running at different rates, some on a separate board, call for topics and ros2 bag rather than a hand-built IPC, logging and replay layer.
  3. Three or more coordinate frames interact. The tf2 concept page frames the questions directly: what is the pose of the object in my gripper relative to my base, and where was the head frame relative to the world five seconds ago? Once you are tracking those transforms by hand, you want tf2, which keeps time-stamped frame relationships available across a distributed system.
  4. The arm needs collision-aware motion planning. MoveIt 2 describes itself as the robotic manipulation platform for ROS 2. If the learned policy outputs a goal pose and a planner generates the path, that planner lives on ROS 2.
  5. A mobile base navigates a map. Nav2 is a ROS 2 navigation framework that coordinates planner, controller and recovery servers through behavior trees. Fleet layers above it, such as Open-RMF, are also built on ROS 2.

Simulation-only path versus ROS 2 path

AspectSimulation-only path (MuJoCo, LeRobot Python)ROS 2 path
Execution unitOne Python processMany nodes across processes and machines
Hardware connectionLeRobot Robot class, direct motor bus controlVendor ROS 2 drivers, ros2_control hardware interfaces
Sensor synchronizationSequential reads inside one loopTopics with timestamps, delivery set by QoS
Coordinate transformsMatrices written in your own codetf2 tree, lookupTransform
Planning and navigationPolicy outputs joint targets directlyMoveIt 2 (arms), Nav2 (mobile bases)
Data recordingLeRobotDataset formatros2 bag (convert when needed)
Setup costpip or conda environmentDistribution and Ubuntu pinning, colcon builds, environment sourcing
Best fitPolicy training and evaluation, a single low-cost armMulti-sensor physical robots, reuse of the ROS 2 ecosystem

A practical rule: if you are rebuilding two or more items from the right-hand column yourself, you are already paying for ROS 2 without getting it.

Eight core concepts and when each one first matters

The ROS 2 documentation is large, but deploying a learned policy on real hardware needs roughly these eight ideas.

ConceptOne-line definitionFirst needed when
NodeAn executable unit that does one jobYou separate the camera driver from policy inference
TopicOne-way publish/subscribe message streamImages and joint states flow continuously
ServiceA single request/response callOpening the gripper, starting calibration
ActionA long-running task with feedback and cancel“Move to this pose”, “drive to this waypoint”
ParameterPer-node configuration valueChanging control rate or camera resolution
LaunchStarts many nodes and parameters at onceDriver, policy and visualization together
tf2Time-aware tree of coordinate framesConverting a camera-frame detection into the base frame
QoSReliability and retention policy for messagesA sensor topic never reaches your subscriber

QoS is where most newcomers get stuck first. According to the QoS documentation, the default profile is history keep last with a queue depth of 10, reliable and volatile. The sensor data profile instead uses best effort with a smaller queue, because timely readings matter more than receiving every one. A connection forms only when every policy the subscriber requests is no more stringent than what the publisher offers, so a best effort publisher and a reliable subscriber never connect, while the reverse pairing does. Durability follows the same model: a late-joining subscriber only receives earlier messages when both sides use transient local.

Publisher reliabilitySubscriber reliabilityConnects
best effortbest effortYes
best effortreliableNo
reliablebest effortYes
reliablereliableYes

A minimal rclpy example: a publisher and a sensor-friendly subscriber

The code below is the MinimalPublisher from the official Python publisher/subscriber tutorial with one parameter added. It publishes a std_msgs/String on topic every 0.5 seconds, and the interval can be changed through the period parameter.

import rclpy
from rclpy.node import Node
from std_msgs.msg import String


class MinimalPublisher(Node):

    def __init__(self):
        super().__init__('minimal_publisher')
        self.declare_parameter('period', 0.5)  # seconds
        period = self.get_parameter('period').value
        self.publisher_ = self.create_publisher(String, 'topic', 10)  # depth 10
        self.timer = self.create_timer(period, self.timer_callback)
        self.i = 0

    def timer_callback(self):
        msg = String()
        msg.data = 'Hello World: %d' % self.i
        self.publisher_.publish(msg)
        self.get_logger().info('Publishing: "%s"' % msg.data)
        self.i += 1


def main(args=None):
    rclpy.init(args=args)
    node = MinimalPublisher()
    rclpy.spin(node)
    node.destroy_node()
    rclpy.shutdown()


if __name__ == '__main__':
    main()

On the receiving side of a sensor stream, match the sensor profile. qos_profile_sensor_data from rclpy.qos subscribes as best effort, so according to the table above it connects whether the publisher is reliable or best effort.

from rclpy.qos import qos_profile_sensor_data
from sensor_msgs.msg import Image

self.sub = self.create_subscription(
    Image, '/camera/image_raw', self.on_image, qos_profile_sensor_data)

The build-and-run sequence follows the tutorial: add rclpy and std_msgs as exec_depend entries in package.xml, and register talker = py_pubsub.publisher_member_function:main under console_scripts in setup.py.

cd ~/ros2_ws/src
ros2 pkg create --build-type ament_python --license Apache-2.0 py_pubsub
# write py_pubsub/py_pubsub/publisher_member_function.py, edit package.xml and setup.py
cd ~/ros2_ws
rosdep install -i --from-path src --rosdistro jazzy -y
colcon build --packages-select py_pubsub
source install/setup.bash
ros2 run py_pubsub talker --ros-args -p period:=0.1
# in another terminal: inspect publisher and subscriber QoS
ros2 topic info -v /topic

ros2 topic info -v prints the reliability and durability of every publisher and subscriber on a topic, which makes it the first command to run when “messages are not arriving”.

Choosing a distribution: the official support list as of October 31, 2026

The ROS 2 distributions page marks the following as currently supported. Tier 1 Ubuntu releases come from each distribution’s supported-platforms section.

DistributionReleasedEnd of lifeTier 1 UbuntuNotes
Lyrical Luth2026-05-22May 203126.04 (Resolute)Stated as LTS; 24.04 (Noble) is Tier 3
Kilted Kaiju2025-05-23December 202624.04 (Noble)Non-LTS, ending soon
Jazzy Jalisco2024-05-23May 202924.04 (Noble)
Humble Hawksbill2022-05-23May 202722.04 (Jammy)
Rolling RidleyContinuous——Development; can receive breaking in-place updates

The Lyrical supported-platforms page lists Ubuntu 26.04 on amd64 and arm64 as Tier 1 and Ubuntu 24.04 as Tier 3, which means building from source. The distributions page also states that nodes on different distributions are not guaranteed to communicate, so the robot computer and the development machine should run the same one.

In practice the tools you plan to use decide the distribution more than ROS 2 itself. Here is what each tool’s documentation showed on October 31, 2026.

ToolDistributions listed in its docs
Isaac Sim 6.2.0 ROS 2 bridgeHumble and Jazzy tested; Ubuntu 24.04 with Jazzy recommended
ros2_controlStable: Kilted, Jazzy, Humble / in development: Rolling, Lyrical
Nav2Active support: Lyrical, Jazzy; maintained: Kilted, Humble
mujoco_ros2_controlHumble, Jazzy, Kilted, Lyrical

Only Jazzy and Humble appear in all four, and Humble ends in May 2027. That makes Ubuntu 24.04 with Jazzy the broadest-compatible starting point right now. Lyrical has the longest support window, but the sensible order is to confirm that each tool you depend on lists it as stable before moving.

Where LeRobot, MuJoCo and Isaac Sim meet ROS 2

Each of the three tools connects to ROS 2 differently.

  • Isaac Sim: enabling the isaacsim.ros2.bridge extension lets the simulator publish and subscribe to ROS 2 topics directly. The installation page says the simulator includes ROS libraries for the default interfaces and falls back to its bundled Humble or Jazzy libraries when no ROS environment is sourced. Custom message types must be built separately for the simulator’s Python 3.12 runtime.
  • MuJoCo: MuJoCo itself has no ROS 2 dependency. mujoco_ros2_control wraps it as a ros2_control system interface, so the controller configuration you would use on hardware can run against the simulator. It also ships sensor, RGB-D camera and lidar plugins and can generate MuJoCo models from URDF; the demo starts with ros2 launch mujoco_ros2_control_demos demo.launch.py.
  • LeRobot: the official docs do not treat ROS 2 as a built-in path. Instead they define a plugin convention in which a separate Python package prefixed lerobot_robot_ registers your robot. Running a LeRobot policy on a ROS 2 robot therefore means writing a Robot implementation whose get_observation() fills values from subscribed ROS 2 topics and whose send_action() publishes to a command topic. This is a design derived from the documented interface contract, not an officially provided bridge.

In that layout the policy inference loop becomes a single ROS 2 node while the camera and joint drivers stay as existing ROS 2 nodes. The separate problem of the gap between simulated and physical behavior is covered in our sim-to-real gap article.

A learning order that keeps ROS 2 from stalling policy work

To keep ROS 2 from eating into policy development time, this order works well.

  1. Pin the distribution first. Use the tool table above to settle on Jazzy (or Lyrical once your tools confirm it) and the matching Ubuntu release, and put the development and robot machines on the same combination.
  2. Look at topics from the CLI before writing code. Launch the vendor driver and inspect message types and QoS with ros2 topic list, ros2 topic echo and ros2 topic info -v. Most integration problems surface here.
  3. Wrap the policy in one rclpy node. Put inference into the structure of the example above: subscribe to observation topics and publish to a command topic.
  4. Bundle everything in a launch file. Start driver, policy and visualization nodes from one launch file and move parameters into a file.
  5. Add tf2, then MoveIt 2, Nav2 or ros2_control only when needed. Bring in only the pieces that match the five signals.

Before any of this, aligning simulator and Python versions matters; our MuJoCo and LeRobot install version guide helps you spot where those versions might collide with the Python version your ROS 2 distribution expects.

Common mistakes

  • Installing ROS 2 at the simulation stage and spending more time on builds and environment sourcing than on the policy itself.
  • Pairing a best-effort sensor publisher with a reliable subscriber, so not a single message arrives and nothing reports an error.
  • Expecting nodes built on different distributions to talk to each other; the official docs state cross-distribution communication is not guaranteed.
  • Starting a long-lived project on Kilted, which reaches end of life in December 2026.

Pre-flight checklist

  • Checked whether your robot and sensor vendors ship only ROS 2 drivers or also a Python SDK
  • Lined up the simulator (Isaac Sim, MuJoCo) and middleware (MoveIt 2, Nav2, ros2_control) against the same distribution in one table
  • Confirmed the robot computer’s Ubuntu release is a Tier 1 platform for that distribution
  • Inspected sensor topic QoS with ros2 topic info -v and matched the subscriber profile
  • Built every node against the same distribution

Frequently asked questions

Should I learn ROS 1 (Noetic) first?
Not for a new project. The official distribution list and major packages such as Nav2, MoveIt 2 and ros2_control are maintained around ROS 2. ROS 1 knowledge only matters if you have to port existing ROS 1 code.
Should I start with C++ (rclcpp) or Python (rclpy)?
rclpy is fine for learning the concepts and for wrapping a learned policy. High-rate control loops and ros2_control hardware interface plugins are commonly written in C++, so pick up rclcpp when you reach that layer.

Sources & verification

  1. ROS 2 Documentation — Distributions (source of docs.ros.org/en/rolling/Releases.html)
  2. ROS 2 Documentation — Lyrical Luth release notes and supported platforms
  3. ROS 2 Documentation (Jazzy) — Writing a simple publisher and subscriber (Python)
  4. ROS 2 Documentation (Jazzy) — Quality of Service settings
  5. ROS 2 Documentation (Jazzy) — About tf2
  6. Isaac Sim 6.2.0 — ROS and ROS 2 installation
  7. ros-controls/mujoco_ros2_control (GitHub)
  8. LeRobot — Bring Your Own Hardware
  9. Nav2 Documentation
  10. ros2_control Documentation

Last verified: