> For the complete documentation index, see [llms.txt](https://clemson-autonomous-systems.gitbook.io/clemson-university-autonomous-systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clemson-autonomous-systems.gitbook.io/clemson-university-autonomous-systems/multi-agent-development/multi-agent-networking-guide/ros-2/testing-multimaster-communications.md).

# 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:

```bash
sudo apt-get install ros-melodic-turtlesim

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

### ROS 1 Example

```bash
# Terminal A
roscore

# Terminal B
rosrun turtlesim turtlesim_node

# Terminal C
rosrun turtlesim teleop_
```
