Skip to content

Commit 1e987b5

Browse files
committed
Add usage instructions
1 parent 0532ee1 commit 1e987b5

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
A ROS2 package for bridging between MQTT and ROS networks
66

77
## Installation
8-
### Operating System
9-
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.
8+
### Operating System and ROS2
9+
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.
1010

1111
### MQTT
1212
Install an MQTT broker like [Mosquitto](https://mosquitto.org/).
@@ -30,6 +30,41 @@ you@ubuntu:~ $ service mosquitto status
3030
└─5390 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
3131
```
3232
33+
### Setting up a Workspace
34+
Create a ROS workspace and clone the repo.
35+
36+
```bash
37+
mkdir -p workspace/src
38+
cd workspace/src
39+
git clone https://github.com/benjaminwp18/mqtt_ros_bridge.git
40+
```
41+
42+
### Running the Bridge
43+
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".
44+
45+
```bash
46+
colcon build --symlink-install
47+
. install/setup.sh
48+
```
49+
50+
Now start the demo by running these commands in two separate terminals:
51+
```bash
52+
ros2 launch mqtt_ros_bridge demo_pub_launch.py
53+
```
54+
```bash
55+
ros2 launch mqtt_ros_bridge demo_sub_launch.py
56+
```
57+
58+
Or launch the bridge in your own launch file with:
59+
```python
60+
config = os.path.join(
61+
get_package_share_directory('mqtt_ros_bridge'),
62+
'config',
63+
'your_config_file.yaml'
64+
)
65+
```
66+
67+
3368
## TODO
3469
- ROS services
3570
- ROS actions

0 commit comments

Comments
 (0)