Basic ROS2 wrapper for the zbar (http://zbar.sourceforge.net/) barcode reader library. Reads image stream from image
topic, and outputs detected barcodes to barcode
topic. Works with 1D and 2D barcodes.
To install the dependencies, run:
rosdep install --from-paths src --ignore-src -r -y
If you see sudo: rosdep: command not found
, install rosdep first and rerun the command above.
In your workspace, run:
colcon build
You have to source your workspace, then run the node. In your workspace, run:
. install/local_setup.bash
ros2 run zbar_ros barcode_reader
Subscriptions:
image
(sensor_msgs/msg/Image.msg
)
Publisher:
barcode
(std_msgs/msg/String.msg
)
To debug whether the node is
- receiving msgs on
image
- detecting your 1d or 2d QT code
- publishing the result on
barcode
run with debug logging enabled as below:
ros2 run zbar_ros barcode_reader --ros-args --log-level DEBUG