neufieldrobotics / spinnaker_sdk_camera_driver

Point Grey (FLIR) Spinnaker based camera driver (Blackfly S etc.)
MIT License
126 stars 91 forks source link

Does this camera driver work with ROS Melodic? #70

Closed michael5511b closed 4 years ago

michael5511b commented 4 years ago

I have ROS Melodic running on Ubuntu 18.04. Since "ros-kinetic-cv-bridge" and "ros-kinetic-image-transport" in the prerequisites are not supported anymore, I substituted them with the melodic versions, which resulted in numerous catkin_make errors, such as not being able to find the "opencv" folder, after renaming the "opencv4" folder in the usr/include directory to "opencv", it resulted in more errors such as not being able to include .

Is there a workaround for this? Is there an updated version for this driver? Or is using Kinetic the only way?

Thank you!

ghost commented 4 years ago

So far we have only tested this on Kinetic, so not sure about issues with Melodic. However, I believe Melodic comes with Opencv 3.x, so if your error message shows opencv4 it could be a conflict with a version of Opencv you installed separately from ROS. Also we haven't tried this code with the Chameleon model, but in theory it should be able to work with any camera that works with Spinnaker's SpinView app. Please paste your error messages here so we might see what is going on...

ayuguchi commented 4 years ago

FYI, I confirmed this code can work on ROS Melodic using a FLIR camera.

SlouchyCat commented 4 years ago

FYI, I confirmed this code can work on ROS Melodic using a FLIR camera.

Hi @shahvi and @ayuguchi ,

I cannot get this working on Melodic. Here is my error:

`SUMMARY

PARAMETERS

NODES / acquisition_node (nodelet/nodelet) vision_nodelet_manager (nodelet/nodelet)

auto-starting new master process[master]: started with pid [31628] ROS_MASTER_URI=http://localhost:11311

setting /run_id to 53b0ceae-7ba3-11ea-9de2-94e6f7c21e33 process[rosout-1]: started with pid [31639] started core service [/rosout] process[vision_nodelet_manager-2]: started with pid [31646] process[acquisition_node-3]: started with pid [31647] [ INFO] [1586575200.930454169]: Initializing nodelet with 8 worker threads. [ INFO] [1586575200.974120641]: Initializing nodelet [ INFO] [1586575200.974997940]: [ OK ] USB memory: 1000 MB [ INFO] [1586575200.975096490]: PARAMETER SETTINGS [ INFO] [1586575200.975140196]: ** Date = 20200411 [ INFO] [1586575200.975602631]: Save path set via parameter to: /home/lifeline [ INFO] [1586575200.975632901]: Camera IDs:

[ INFO] [1586575200.976343571]: Camera Aliases: [ INFO] [1586575200.976360056]: 18012444 >> cam0 [ INFO] [1586575200.977003973]: Unique time stamps for each camera: false [ INFO] [1586575200.977330360]: color set to: false [ INFO] [1586575200.977634905]: Exporting images to ROS: true [ INFO] [1586575200.977907535]: Showing live images setting: false [ INFO] [1586575200.978214523]: Showing grid-style live images setting: false [ INFO] [1586575200.978519801]: Max Rate Save Mode: false [ INFO] [1586575200.978795673]: Displaying timing details: false [ INFO] [1586575200.979066652]: No. of images to skip set to: 20 [ INFO] [1586575200.979399505]: Init sleep delays set to : 1.00 sec [ WARN] [1586575200.979696647]: 'fps' Parameter not set, using default behavior: fps=20.00 [ INFO] [1586575200.979981402]: 'exposure_time'=0, Setting autoexposure [ INFO] [1586575200.980326307]: 'target_grey_value'=0, Setting AutoExposureTargetGreyValueAuto to Continuous/ auto [ INFO] [1586575200.980645617]: Binning set to: 1 [ INFO] [1586575200.980946484]: Using Software rate control, rate set to: 30 [ INFO] [1586575200.981313674]: Saving images set to: 0 [ INFO] [1586575200.981679313]: Camera Intrinsic Paramters: [ INFO] [1586575200.981903821]: 1886.923214 0.000000 604.721488 0.000000 1886.666877 493.477267 0.000000 0.000000 1.000000 [ INFO] [1586575200.982285837]: Camera Distortion Paramters: [ INFO] [1586575200.982308804]: -0.021142 -0.373387 2.385983 3.282457 [ INFO] [1586575200.982679390]: Camera Rectification Paramters: [ INFO] [1586575200.982750023]: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 [ INFO] [1586575200.983189278]: Camera Projection Paramters: [ INFO] [1586575200.983223830]: 913.700317 0.000000 953.448302 0.000000 0.000000 1063.296631 777.871993 0.000000 0.000000 0.000000 1.000000 0.000000 [ INFO] [1586575200.983234622]: Camera coeffs provided, camera info messges will be published. [ INFO] [1586575200.983330352]: Creating system instance... [ INFO] [1586575200.985263724]: Retreiving list of cameras... [ INFO] [1586575203.423048827]: Numer of cameras found: 1 [ INFO] [1586575203.423160470]: Cameras connected: 1

[ INFO] [1586575203.498812230]: Dynamic Reconfigure: Level : 4294967295 [ INFO] [1586575203.499843281]: FLUSH SEQUENCE [ INFO] [1586575203.499872748]: Initializing cameras... [ INFO] [1586575204.268089470]: Deinitializing cameras... [ INFO] [1586575204.272803693]: All cameras deinitialized. [ INFO] [1586575206.273022376]: Initializing cameras... [FATAL] [1586575206.478705421]: Error: Spinnaker: GenICam::OutOfRangeException= Value = 1 must be equal or greater than Min = 2. : OutOfRangeException thrown in node 'BinningHorizontal' while calling 'BinningHorizontal.SetValue()' (file 'IntegerT.h', line 79) [-2002] [ WARN] [1586575206.478737825]: Most likely cause for this error is if your camera can't support color and your are trying to set it to color mode [FATAL] [1586575206.661764244]: Failed to load nodelet '/acquisition_nodeof typeacquisition/capture_nodeletto managervision_nodelet_manager' terminate called after throwing an instance of 'Spinnaker::Exception' what(): Spinnaker: GenICam::AccessException= Node is not writable. : AccessException thrown in node 'TriggerSoftware' while calling 'TriggerSoftware.Execute()' (file 'CommandT.h', line 61) [-2006] [acquisition_node-3] process has died [pid 31647, exit code 255, cmd /opt/ros/melodic/lib/nodelet/nodelet load acquisition/capture_nodelet vision_nodelet_manager __name:=acquisition_node log:=/home/lifeline/.ros/log/53b0ceae-7ba3-11ea-9de2-94e6f7c21e33/acquisition_node-3.log]. log file: /home/lifeline/.ros/log/53b0ceae-7ba3-11ea-9de2-94e6f7c21e33/acquisition_node-3*.log [vision_nodelet_manager-2] process has died [pid 31646, exit code -6, cmd /opt/ros/melodic/lib/nodelet/nodelet manager name:=vision_nodelet_manager __log:=/home/lifeline/.ros/log/53b0ceae-7ba3-11ea-9de2-94e6f7c21e33/vision_nodelet_manager-2.log]. log file: /home/lifeline/.ros/log/53b0ceae-7ba3-11ea-9de2-94e6f7c21e33/vision_nodelet_manager-2*.log `

Any help would be greatly appreciated!

ayuguchi commented 4 years ago

@SlouchyCat I recommend before starting to run a camera on this repo, you should confirm to work it through Spinview.

SlouchyCat commented 4 years ago

@SlouchyCat I recommend before starting to run a camera on this repo, you should confirm to work it through Spinview.

It is working in Spinview. Im using Blackfly S BFS-U3-13Y3C. Can u also post your camera model for the benefit of others?

Janphr commented 4 years ago

I got it to work by simply programming a driver from scratch for my Blackfly S BFS-PGE-16S2C GigE. My model returns the device id instead of the serial number for example, that was one of the bugs and I needed some things differently implemented anyway. Your error was caused by the combination of binning (1 or 2) and the pixel format. On my model binning 1 works only for 1 channel format (mono) and ISP needs to be enabled. Binning 2 for everything else...