# ROS 1 Multimaster Packages

## Overview

Multimaster packages are a useful way to achieve the ROS2 communication style when working with a ROS 1 system. This can be preferable in systems such as multi-agent mapping, where we do not necessarily want to exchange all topics, and instead only want a few topics (such as the global map, and local costmaps) to be visible outside of each robot's namespace. Additionally, while it is possible to use the `ros1_bridge` to convert ROS 1 messages into ROS 2 messages (and vice versa), there may be some circumstances where it may be preferable to stick with ROS 2 so that we do not have to install two meta-operating-systems onto the same device.

### Multimaster-FKIE

This package provides a multimaster approach by rebroadcasting topics onto other ROS masters on the same network. This package comes with two nodes:&#x20;

| Node               | Description                                                                                                                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `master_discovery` | This node is responsible for discovering other ROS masters on the same network. It will relay the IP addresses of these devices, as well as pass them on to any running `master_sync` nodes. |
| `master_sync`      | This node is responsible to syncing the topics that are present on the current ROS master to other ROS masters that have been reported by `master_discovery` nodes.                          |

#### Installation Instructions

To install the `multimaster-fkie` package, simply run the command in any bash terminal:

```bash
sudo apt-get install ros-melodic-multimaster-fkie
```

#### Execution Instructions

To run the `multimaster-fkie` package on your machine(s), run these commands on both devices. Make sure that they are connected to the same network before attempting to run these commands.

```bash
# Terminal A
roscore

# Terminal B
rosrun master_discovery_fkie master_discovery

# Terminal C
rosrun master_sync_fkie master_sync
```

### Pound

`Pound` is a UDP-based communications node that is meant to serve as an improvement upon `RT-WMP`. The main difference between this node and the `multimaster-fkie` package is that `Pound` introduces priorities into managing topics.
