ros-drivers / zbar_ros

Lightweight ROS wrapper for zbar barcode/qrcode reader library (http://zbar.sourceforge.net/)

Home Page:http://wiki.ros.org/zbar_ros

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 git@github.com: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

About

Lightweight ROS wrapper for zbar barcode/qrcode reader library (http://zbar.sourceforge.net/)

http://wiki.ros.org/zbar_ros

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 82.6%Language:CMake 17.4%