Skip to content

Latest commit

 

History

History
75 lines (49 loc) · 2.19 KB

README.md

File metadata and controls

75 lines (49 loc) · 2.19 KB

Zbar ROS

Build and Test (humble) Build and Test (iron) Build and Test (jazzy) Build and Test (rolling)

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.

Usage

Installation

Binary Installation

To perform a binary installation, source your ROS 2 installation, then simply run:

sudo apt install ros-${ROS_DISTRO}-zbar-ros

Source Installation (Alternative)

Alternatively, 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_ros

Install the dependencies using rosdep:

rosdep install --from-paths src --ignore-src -r -y

Build the package:

colcon build

Usage

You have to source your workspace, then run the node. In your workspace, run:

source install/local_setup.bash
ros2 run zbar_ros barcode_reader

Topics

Subscriptions:

  • image (sensor_msgs/msg/Image)

Publisher:

  • symbol (zbar_ros_interfaces/msg/Symbol)
  • barcode (std_msgs/msg/String) - DEPRECATED

Debugging the barcode_reader node

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