ROS package which listens and subscribes to a topic which uses sensor_msgs/Image or sensor_msgs/CompressedImage as message type. This image will be published as command to openHAB using a bridge between openHAB and ROS.

In a minimal installation you need at least openhab_bridge and openhab_msgs.

Another word for openhab_bridge_image_listener is openhab_bridge_image_converter.

Install the openhab_bridge_image_listener

In the next step you have to install the openhab_bridge_image_listener in your catkin workspace:

cd ~/catkin_ws/src
git clone --branch <branchname> https://github.com/Michdo93/openhab_bridge_image_listener
cd ~/catkin_ws
catkin_make

Please replace <branchname> with your branch, as example kinetic-devel, melodic-devel or noetic-devel.

Usage

You can run it like described in the following:

rosrun openhab_bridge_image_listener CompressedImagePublisher.py --topic <topic>
rosrun openhab_bridge_image_listener ImagePublisher.py --topic <topic>

Please replace <topic> with a topic where you can subscribe a sensor_msgs/Image or sensor_msgs/CompressedImage.

If your image will be published to /topic/to/my/image you have to use /topic/to/my/image as argument for the parameter --topic. In this current example this image will be published to /openhab/items/testImage/command. So you have to make sure, that in openHAB an Image Item with the name testImage exists.

If you want to run it and publish it to a specific item you have to use the name argument:

rosrun openhab_bridge_image_listener CompressedImagePublisher.py --topic <topic> --name <item_name>
rosrun openhab_bridge_image_listener ImagePublisher.py --topic <topic> --name <item_name>

Please replace <item_name> with an Item name you are using in openHAB.

Example

https://raw.githubusercontent.com/Michdo93/test2/main/ros_bridge.JPG

Wiki: openhab_bridge_image_listener (last edited 2022-10-25 20:27:49 by Michdo93)