Post

How to Set Up ROS2 with Webots (For Ubuntu/Linux)

How to Set Up ROS2 with Webots (For Ubuntu/Linux)

Install Webots

First make sure you have Webots installed.

Note: I am using ROS2 Foxy with Ubuntu 20.04 and the only Webots version that works with this setup is 2022b. Here is a table shows how the versions matched up:

Webots VersionROS 2 Version(s) SupportedNotes
R2025aJazzy JaliscoSupport for Iron Irwini dropped. Also compatible with Ubuntu 24.04 and macOS 14.
R2023bIron IrwiniAdded support for ROS 2 Iron Irwini.
R2022aFoxy Fitzroy, Galactic Geochelone, Rolling RidleyRedesigned ROS 2 interface. New versions of the webots_ros2 package were released for these versions.
R2021bFoxy Fitzroy, Galactic Geochelone, Rolling RidleyFully compatible with these versions and the rolling release.
R2021aFoxy FitzroyFully compatible with Foxy Fitzroy.
R2020bEloquent Elusor, Foxy FitzroyFully compatible with these two versions.

Download the .deb file of the version you want and install it with sudo apt install ./{name of deb file}.

Install the webots_ros2 Package

Then install the webots_ros2 package using the command:

sudo apt-get install ros-foxy-webots-ros2

Now the installation should be done!

Test the Installation

Source the the ROS environment, and run try out an example:

ros2 launch webots_ros2_universal_robot multirobot_launch.py

Thats it! Now you have a fully set up ROS2 with Webots!

References

https://docs.ros.org/en/foxy/Tutorials/Advanced/Simulators/Webots/Installation-Ubuntu.html

This post is licensed under CC BY 4.0 by the author.

Trending Tags