ROS 2 for Humanoid Robot Software: What It Is and Why Teams Use It
Short answer: ROS 2 is an open source set of tools and libraries for building robot software out of small programs that pass messages to each other. Humanoid robot teams use it to connect cameras, planners and controllers without writing all the plumbing themselves. It suits research and development well, but the fastest balance loops usually run outside it.
What is ROS 2?
ROS stands for Robot Operating System, though it is not an operating system in the usual sense. It is a framework that runs on Linux and other systems. The first ROS came out of Willow Garage and Stanford in the late 2000s, with the first public release in 2010. ROS 2 is a rebuilt version, with its first release, Ardent Apalone, in December 2017. It is maintained by the Open Robotics organization and a large community.
How does it work?
A ROS 2 system is made of nodes. A node is one program with one job, such as reading a camera, estimating position, or driving a joint. Nodes talk through a few simple patterns.
- Topics: a node publishes messages, such as an image or a joint angle, and any node can subscribe to them.
- Services: a node asks another a question and waits for one answer.
- Actions: a node starts a long task, such as "walk to the door", and receives progress updates and a final result.
- Parameters: settings that can be changed without rebuilding the program.
ROS 2 uses a middleware layer called DDS for message delivery. It lets many computers share one system over a network, which fits a robot with several onboard processors.
Why do humanoid teams use it?
A humanoid robot has many parts that must work together: vision, speech, planning, balance and dozens of motors. Writing all the communication code from scratch takes months. ROS 2 offers ready packages for common jobs, including coordinate transforms, navigation, motion planning for arms through MoveIt, and a simulator link. It also records and replays sensor data, which helps with debugging and with the evaluation work in humanoid robot benchmarking.
Where does ROS 2 fit in a humanoid stack?
Usually in the upper and middle layers. Perception, mapping and task planning run well on it, as in scene understanding and grasp planning. The innermost loops, such as joint torque control and balance, often run in a separate real-time program that updates hundreds or thousands of times per second, as covered in whole-body control. ROS 2 can talk to that layer through a defined interface, but it does not replace it.
What are the limits?
- Timing: general message passing can add delay and uneven timing, so hard real-time work needs care.
- Learning curve: the tools, build system and message types take time to learn.
- Quality varies: community packages differ in maintenance and testing.
- Safety: ROS 2 does not by itself provide certified safety functions. See safety standards.
How are versions supported?
ROS 2 releases come out every year in May, and every second release is a long term support version. Humble Hawksbill, released in May 2022, is a long term support version supported for five years. Jazzy Jalisco, released in May 2024, is also a long term support version. A team building a product usually picks a long term support release so that the base software stays maintained.
How does it link to simulation?
Most simulators, including the physics engine described in the MuJoCo guide, can be connected to ROS 2. A team can test the same nodes in simulation and on the robot, which helps narrow the sim-to-real gap.
What should a team check before choosing it?
Check which release your hardware vendor supports, since drivers are often written for one version. Check whether the control computer can run Linux with real-time patches if tight timing is needed. Plan how messages will be logged, because recorded data is the easiest way to find the cause of a failure after a test. Finally, decide early which parts of the system must stay outside ROS 2 for speed or safety reasons.
Frequently asked questions
Is ROS 2 an operating system?
No. It is a software framework that runs on top of an operating system such as Linux.
Is ROS 2 free?
Yes. It is open source, released under permissive licenses, mainly Apache 2.0.
Can ROS 2 balance a humanoid robot?
Not on its own. Balance control normally runs in a dedicated real-time loop, with ROS 2 handling higher level tasks.
Keep reading
Whole-Body Control · MuJoCo Simulation Guide · Humanoid Robot Benchmarking · Scene Understanding