Repository Summary
Checkout URI | https://github.com/groove-x/mqtt_bridge.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2023-01-26 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
mqtt_bridge | 0.2.1 |
README
mqtt_bridge
mqtt_bridge provides a functionality to bridge between ROS and MQTT in bidirectional.
mqtt_bridge is not actively maintained now. Feel free to check out mqtt_client, a high-performance C++ ROS nodelet with recent development!
Principle
mqtt_bridge
uses ROS message as its protocol. Messages from ROS are serialized by json (or messagepack) for MQTT, and messages from MQTT are deserialized for ROS topic. So MQTT messages should be ROS message compatible. (We use rosbridge_library.internal.message_conversion
for message conversion.)
This limitation can be overcome by defining custom bridge class, though.
Demo
Prerequisites
$ sudo apt install python3-pip
$ sudo apt install ros-noetic-rosbridge-library
$ sudo apt install mosquitto mosquitto-clients
Install python modules
$ pip3 install -r requirements.txt
launch node
$ roslaunch mqtt_bridge demo.launch
Publish to /ping
,
$ rostopic pub /ping std_msgs/Bool "data: true"
and see response to /pong
.
$ rostopic echo /pong
data: True
---
Publish “hello” to /echo
,
$ rostopic pub /echo std_msgs/String "data: 'hello'"
and see response to /back
.
$ rostopic echo /back
data: hello
---
You can also see MQTT messages using mosquitto_sub
$ mosquitto_sub -t '#'
Usage
parameter file (config.yaml):
mqtt:
client:
protocol: 4 # MQTTv311
connection:
host: localhost
port: 1883
keepalive: 60
bridge:
# ping pong
- factory: mqtt_bridge.bridge:RosToMqttBridge
msg_type: std_msgs.msg:Bool
topic_from: /ping
topic_to: ping
- factory: mqtt_bridge.bridge:MqttToRosBridge
msg_type: std_msgs.msg:Bool
topic_from: ping
topic_to: /pong
you can use any msg types like sensor_msgs.msg:Imu
.
launch file:
File truncated at 100 lines see the full file
CONTRIBUTING
Repository Summary
Checkout URI | https://github.com/groove-x/mqtt_bridge.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2023-01-26 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
mqtt_bridge | 0.2.1 |
README
mqtt_bridge
mqtt_bridge provides a functionality to bridge between ROS and MQTT in bidirectional.
mqtt_bridge is not actively maintained now. Feel free to check out mqtt_client, a high-performance C++ ROS nodelet with recent development!
Principle
mqtt_bridge
uses ROS message as its protocol. Messages from ROS are serialized by json (or messagepack) for MQTT, and messages from MQTT are deserialized for ROS topic. So MQTT messages should be ROS message compatible. (We use rosbridge_library.internal.message_conversion
for message conversion.)
This limitation can be overcome by defining custom bridge class, though.
Demo
Prerequisites
$ sudo apt install python3-pip
$ sudo apt install ros-noetic-rosbridge-library
$ sudo apt install mosquitto mosquitto-clients
Install python modules
$ pip3 install -r requirements.txt
launch node
$ roslaunch mqtt_bridge demo.launch
Publish to /ping
,
$ rostopic pub /ping std_msgs/Bool "data: true"
and see response to /pong
.
$ rostopic echo /pong
data: True
---
Publish “hello” to /echo
,
$ rostopic pub /echo std_msgs/String "data: 'hello'"
and see response to /back
.
$ rostopic echo /back
data: hello
---
You can also see MQTT messages using mosquitto_sub
$ mosquitto_sub -t '#'
Usage
parameter file (config.yaml):
mqtt:
client:
protocol: 4 # MQTTv311
connection:
host: localhost
port: 1883
keepalive: 60
bridge:
# ping pong
- factory: mqtt_bridge.bridge:RosToMqttBridge
msg_type: std_msgs.msg:Bool
topic_from: /ping
topic_to: ping
- factory: mqtt_bridge.bridge:MqttToRosBridge
msg_type: std_msgs.msg:Bool
topic_from: ping
topic_to: /pong
you can use any msg types like sensor_msgs.msg:Imu
.
launch file:
File truncated at 100 lines see the full file
CONTRIBUTING
Repository Summary
Checkout URI | https://github.com/groove-x/mqtt_bridge.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2023-01-26 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
mqtt_bridge | 0.2.1 |
README
mqtt_bridge
mqtt_bridge provides a functionality to bridge between ROS and MQTT in bidirectional.
mqtt_bridge is not actively maintained now. Feel free to check out mqtt_client, a high-performance C++ ROS nodelet with recent development!
Principle
mqtt_bridge
uses ROS message as its protocol. Messages from ROS are serialized by json (or messagepack) for MQTT, and messages from MQTT are deserialized for ROS topic. So MQTT messages should be ROS message compatible. (We use rosbridge_library.internal.message_conversion
for message conversion.)
This limitation can be overcome by defining custom bridge class, though.
Demo
Prerequisites
$ sudo apt install python3-pip
$ sudo apt install ros-noetic-rosbridge-library
$ sudo apt install mosquitto mosquitto-clients
Install python modules
$ pip3 install -r requirements.txt
launch node
$ roslaunch mqtt_bridge demo.launch
Publish to /ping
,
$ rostopic pub /ping std_msgs/Bool "data: true"
and see response to /pong
.
$ rostopic echo /pong
data: True
---
Publish “hello” to /echo
,
$ rostopic pub /echo std_msgs/String "data: 'hello'"
and see response to /back
.
$ rostopic echo /back
data: hello
---
You can also see MQTT messages using mosquitto_sub
$ mosquitto_sub -t '#'
Usage
parameter file (config.yaml):
mqtt:
client:
protocol: 4 # MQTTv311
connection:
host: localhost
port: 1883
keepalive: 60
bridge:
# ping pong
- factory: mqtt_bridge.bridge:RosToMqttBridge
msg_type: std_msgs.msg:Bool
topic_from: /ping
topic_to: ping
- factory: mqtt_bridge.bridge:MqttToRosBridge
msg_type: std_msgs.msg:Bool
topic_from: ping
topic_to: /pong
you can use any msg types like sensor_msgs.msg:Imu
.
launch file:
File truncated at 100 lines see the full file
CONTRIBUTING
Repository Summary
Checkout URI | https://github.com/groove-x/mqtt_bridge.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2023-01-26 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
mqtt_bridge | 0.2.1 |
README
mqtt_bridge
mqtt_bridge provides a functionality to bridge between ROS and MQTT in bidirectional.
mqtt_bridge is not actively maintained now. Feel free to check out mqtt_client, a high-performance C++ ROS nodelet with recent development!
Principle
mqtt_bridge
uses ROS message as its protocol. Messages from ROS are serialized by json (or messagepack) for MQTT, and messages from MQTT are deserialized for ROS topic. So MQTT messages should be ROS message compatible. (We use rosbridge_library.internal.message_conversion
for message conversion.)
This limitation can be overcome by defining custom bridge class, though.
Demo
Prerequisites
$ sudo apt install python3-pip
$ sudo apt install ros-noetic-rosbridge-library
$ sudo apt install mosquitto mosquitto-clients
Install python modules
$ pip3 install -r requirements.txt
launch node
$ roslaunch mqtt_bridge demo.launch
Publish to /ping
,
$ rostopic pub /ping std_msgs/Bool "data: true"
and see response to /pong
.
$ rostopic echo /pong
data: True
---
Publish “hello” to /echo
,
$ rostopic pub /echo std_msgs/String "data: 'hello'"
and see response to /back
.
$ rostopic echo /back
data: hello
---
You can also see MQTT messages using mosquitto_sub
$ mosquitto_sub -t '#'
Usage
parameter file (config.yaml):
mqtt:
client:
protocol: 4 # MQTTv311
connection:
host: localhost
port: 1883
keepalive: 60
bridge:
# ping pong
- factory: mqtt_bridge.bridge:RosToMqttBridge
msg_type: std_msgs.msg:Bool
topic_from: /ping
topic_to: ping
- factory: mqtt_bridge.bridge:MqttToRosBridge
msg_type: std_msgs.msg:Bool
topic_from: ping
topic_to: /pong
you can use any msg types like sensor_msgs.msg:Imu
.
launch file:
File truncated at 100 lines see the full file