magazino / pylon_camera

ROS-Driver for Basler Cameras
BSD 3-Clause "New" or "Revised" License
78 stars 108 forks source link

==== New Official Version of Driver available

The new official driver (an extended version of this package with some bug-fixes and new functionality) is available at https://github.com/basler/pylon-ros-camera.

==== ROS-Driver for Basler Cameras

developed by Magazino GmbH, using the pylon Software Camera Suite by Basler AG

This package offers many functions of the Basler pylon API inside the ROS-Framwork.

The package supports Baslers USB 3.0, GigE as well as the DART cameras.

Images can continuously be published over \/image_raw or the \/image_rect topic. The latter just in case the intrinsic calibration matrices are provided through the camera_info_url parameter.

The camera-characteristic parameter such as hight, width, projection matrices and camera_frame were published over the \/camera_info topic. Furthermore an action-based image grabbing with desired exposure, gain, gamma and / or brightness is provided. Hence one can grab a sequence of images with above target settings as well as a single image.

Adapting camera's settings regarding binning (in x and y direction), exposure, gain, gamma and brightness can be done using provided 'set_*' services. These changes effect the continuous image acquisition and hence the images provided through the image topics.

The default node operates in Software-Trigger Mode. This means that the image acquisition is triggered with a certain rate and the camera is not running in the continuous mode.

The package opens either a predefined camera (using a given 'device_user_id' parameter) or, if no camera id is predefined the first camera device it can find.

|


Installation


The package has been tested for ROS-Indigo and ROS-Kinetic.

The pylon_camera-pkg requires the pylonSDK to be installed on your system. Please download and install the pylon debian package for your architecture from:

https://www.baslerweb.com/de/support/downloads/downloads-software/

In order to build the package, you need to configure rosdep (i.e. the ROS command-line tool for checking and installing system dependencies for ROS packages) such that it knows how to resolve this dependency. This can be achieved by executing the following commands:

sudo sh -c 'echo "yaml https://raw.githubusercontent.com/magazino/pylon_camera/indigo-devel/rosdep/pylon_sdk.yaml " > /etc/ros/rosdep/sources.list.d/15-plyon_camera.list'

rosdep update

Then, clone the pylon_camera-pkg, and the camera_control_msgs-pkg and install the pylon SDK in your catkin_ws:

cd ~/catkin_ws/src/ && git clone https://github.com/magazino/pylon_camera.git && git clone https://github.com/magazino/camera_control_msgs.git

rosdep install --from-paths . --ignore-src --rosdistro=$ROS_DISTRO -y

Build the pylon_camera package as you would build a standard ROS-package unsing p.e.

cd ~/catkin_ws && catkin_make

|


Parameters


All parameters are listed in the default config file: config/default.yaml

Common parameters

Image Intensity Settings

The following settings do NOT have to be set. Each camera has default values which provide an automatic image adjustment resulting in valid images

Optional and device specific parameter


Usage


The pylon_camera_node can be started over the launch file which includes a config file with desired parameters as frame rate or exposure time

roslaunch pylon_camera pylon_camera_node.launch or rosrun pylon_camera pylon_camera_node

Images were only published if another node connects to the image topic. The published images can be seen using the image_view node from the image_pipeline stack:

rosrun image_view image_view image:=/pylon_camera_node/image_raw


Questions


Please provide your questions via http://answers.ros.org/questions/ and tag them with pylon_camera