This ros package acts as a bridge between FIWARE and ROS through MQTT.
This ROS node receives a command from FIWARE orion context broker through MQTT.
When receiving a command, this node publish a series of geometry_msgs/Twist
messages to /turtle1/cmd_vel
topic. By doing so, turtlesim
moves according to the received command.
This ROS node subscribes for /turtle1/temperature
topic.
When receiving a std_msgs/Float32
message from its topic, this node publishes the received temperature
to FIWARE orion context broker through MQTT.
ROS kinetic
$ cd ~/ros_ws/src
$ git clone https://github.com/tech-sketch/fiware-ros-turtlesim.git
$ cd fiware-ros-turtlesim
$ pip install -r requirements/common.txt
-
start X server.
-
open a terminal and start
roscore
.terminal1:$ cd ~/ros_ws terminal1:$ source devel/setup.bash terminal1:$ roscore
-
open another terminal and start
turtlesim
.terminal2:$ cd ~/ros_ws terminal2:$ source devel/setup.bash terminal2:$ rosrun turtlesim turtlesim_node
-
configure
config/params.yaml
- set
mqtt.host
andmqtt.port
- If necessary, set
mqtt.cafile
,mqtt.sername
andmqtt.password
- set
-
open another terminal and start
fiware-ros-turtlesim
.terminal3:$ cd ~/ros_ws terminal3:$ source devel/setup.bash terminal3:$ roslaunch fiware-ros-turtlesim fiware-ros-turtlesim.launch
Copyright (c) 2018 TIS Inc.