Skip to content

Commit

Permalink
Add usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwp18 committed May 2, 2024
1 parent 0532ee1 commit 1e987b5
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
A ROS2 package for bridging between MQTT and ROS networks

## Installation
### Operating System
ROS2 is pretty tightly coupled to Ubuntu versions. `mqtt_ros_bridge` supports ROS2 Iron Irwini and Humble Hawksbill. Pick a [version](https://docs.ros.org/en/rolling/Releases.html) that works with your OS.
### Operating System and ROS2
ROS2 is pretty tightly coupled to Ubuntu versions. `mqtt_ros_bridge` supports ROS2 Iron Irwini. Use [this guide](https://docs.ros.org/en/iron/Installation.html) to pick an OS and install Iron.

### MQTT
Install an MQTT broker like [Mosquitto](https://mosquitto.org/).
Expand All @@ -30,6 +30,41 @@ you@ubuntu:~ $ service mosquitto status
└─5390 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
```
### Setting up a Workspace
Create a ROS workspace and clone the repo.
```bash
mkdir -p workspace/src
cd workspace/src
git clone https://github.com/benjaminwp18/mqtt_ros_bridge.git
```
### Running the Bridge
Build and source the package from your workspace (`workspace`, not `workspace/src`). You may see `EasyInstallDeprecationWarning: easy_install command is deprecated`, but that can be ignored as long as the package doesn't say "failed".
```bash
colcon build --symlink-install
. install/setup.sh
```
Now start the demo by running these commands in two separate terminals:
```bash
ros2 launch mqtt_ros_bridge demo_pub_launch.py
```
```bash
ros2 launch mqtt_ros_bridge demo_sub_launch.py
```
Or launch the bridge in your own launch file with:
```python
config = os.path.join(
get_package_share_directory('mqtt_ros_bridge'),
'config',
'your_config_file.yaml'
)
```
## TODO
- ROS services
- ROS actions
Expand Down

0 comments on commit 1e987b5

Please sign in to comment.