Basic ROS 2 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 perform a binary installation, source your ROS 2 installation, then simply run:
sudo apt install ros-${ROS_DISTRO}-zbar-rosAlternatively, you can build from source.
Make sure you are in a ROS 2 workspace.
Clone this repository into your workspace's src directory by running:
git clone [email protected]:ros-drivers/zbar_ros.git src/zbar_rosInstall the dependencies using rosdep:
rosdep install --from-paths src --ignore-src -r -yBuild the package:
colcon buildYou have to source your workspace, then run the node. In your workspace, run:
source install/local_setup.bash
ros2 run zbar_ros barcode_reader
Subscriptions:
image(sensor_msgs/msg/Image)
Publisher:
symbol(zbar_ros_interfaces/msg/Symbol)barcode(std_msgs/msg/String) - DEPRECATED
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
