Testing Multimaster Communications

Introducing The Turtle Test

The turtle test is a very simple way to test if two devices, each with their own version of ROS, are able to communicate on the same network. To perform this test, both devices must have turtlesim installed. Most frequently, you will perform the turtle test when running communications between two Docker containers, but it is possible to perform it between two devices given that at least one has a monitor, and the other has a keyboard.

Installing Turtlesim

Luckily, turtlesim is a package that exists in both ROS 1 and ROS 2. To install the package, simply run the below commands depending on which version of ROS you have:

sudo apt-get install ros-melodic-turtlesim

# If you are using ROS 2
sudo apt-get install ros-dashing-turtlesim

ROS 1 Example

# Terminal A
roscore

# Terminal B
rosrun turtlesim turtlesim_node

# Terminal C
rosrun turtlesim teleop_

Last updated