Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

ROS package with configurations for Synchronization and Triggering of Basler cameras

Notifications You must be signed in to change notification settings

RZin/basler-synchronization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package offers configurations for Synchronization and Triggering of Basler cameras

Dependencies:

  • pylon-ros-camera

Configuration parameters:

  • camera_frame: pylon_camera -- The tf frame under which the images were published

  • device_user_id: "" -- If empty, the first camera found in the device list will be used

  • camera_info_url: " file:///home/user/calib.yaml" -- a file generated by camera_calibration package

  • image_encoding: "mono16" -- 'mono8', 'mono16', 'bgr8', 'rgb8', 'bayer_bggr8'...

  • binning_x/y: 1 -- reduces the resolution to (width / binning_x) x (height / binning_y)

  • frame_rate: 30.0 -- Calling the GrabImages-Action can result in a higher framerate

  • shutter_mode: "global" -- he supported modes: "rolling", "global" and "global_reset"

key setting services:

set_image_encoding - 'mono8' or 'rgb8' set_light_source_preset - 0=Off, 1=5000K, 2=6500K, 3=T2800K set_noise_reduction - value set_sharpness_enhancement - value

key services for triggering:

set_trigger_mode set_trigger_selector set_trigger_source execute

For hardware triggering we should do:

set_trigger_mode data : true = activate set_trigger_source value : 1 = Line1 set_trigger_selector value : 0 = Frame start

For software triggering we should do:

set_trigger_mode data : true = activate set_trigger_selector value : 0 = Frame start set_trigger_source value : 0 = Software execute_software_trigger -

full list of services is available here

launch files:

  • basler_test0.launch -> for testing acA1920-40uc parameters
  • basler_test1.launch -> for testing acA1440-220um parameters
  • basler_synch.launch -> for two cameras synchronization (hardware triggering)

Frequently used commands:

Testing:

  • roslaunch mrbasler basler_test0.launch
  • roslaunch mrbasler basler_test1.launch
  • rostopic echo /pylon_camera_node/currentParams
  • rosservice call /pylon_camera_node/set_brightness '{target_brightness : "150", brightness_continuous : "1", exposure_auto : "1", gain_auto : "1"}'
  • rosservice call /pylon_camera_node/set_brightness '{target_brightness : "10", brightness_continuous : "1", exposure_auto : "0", gain_auto : "1"}'
  • rosservice call /pylon_camera_node/set_light_source_preset "1"
  • rosservice call /pylon_camera_node/set_image_encoding 'rgb8'
  • rosservice call /pylon_camera_node/set_image_encoding 'mono8'

Synchronization:

  • rosrun pylon_camera write_device_user_id_to_camera 0 (for camera acA1920-40uc)
  • rosrun pylon_camera write_device_user_id_to_camera 1 (for camera acA1440-220um)
  • rostopic echo /pylon_camera_node0/image_raw/header/stamp | tee ~/catkin_ws/src/pylon-ros-camera/mrbasler/tests/output0.txt
  • rostopic echo /pylon_camera_node1/image_raw/header/stamp | tee ~/catkin_ws/src/pylon-ros-camera/mrbasler/tests/output1.txt

Calibration:

  • rosrun camera_calibration cameracalibrator.py --size 9x7 --square 0.035 image:=/pylon_camera_node/image_raw camera:=/camera

Test hardware triggering:

rosservice call /pylon_camera_node/set_trigger_mode "true" (activate)
rosservice call /pylon_camera_node/set_trigger_source 1 (line 1)
rosservice call /pylon_camera_node/set_trigger_selector 0 (Frame start)

rosservice call /pylon_camera_node/set_line_selector 3 (line 4)
rosservice call /pylon_camera_node/set_line_mode 1 (output)
rosservice call /pylon_camera_node/set_line_source 0 (exposure)

addicional calls:

  • rosservice call /pylon_camera_node1/set_exposure 40000 (for camera acA1440-220um)
  • rosservice call /pylon_camera_node0/set_light_source_preset "2" (for camera acA1920-40uc)

About

ROS package with configurations for Synchronization and Triggering of Basler cameras

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published