neufieldrobotics/spinnaker_sdk_camera_driver

Unable to set PixelFormat to BGR8

Opened this issue · 1 comments

System Description
Camera Name and Model:BFLY-U3-23S6C-C
Operating System:Ubuntu 18.04
Spinnaker Version: 2.2.0.48
ROS Version: melodic 1.14.3

Computer details
Processor: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz

Do the cameras work with SpinView?
Yes, it can show RGB image.

Describe the bug
By commenting several lines mentions by FATAL errors, the gray scale image can be visualized through rqt_image_view.
But it still have error when changing color to true, while SpinView can show RGB image.

Error Messages
roslaunch spinnaker_sdk_camera_driver acquisition.launch
... logging to /home/robot2/.ros/log/acac6bf2-a83e-11ec-8a67-f4d108339898/roslaunch-robot2-910-24701.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://robot2-910:38815/

SUMMARY

PARAMETERS

  • /acquisition_node/binning: 2
  • /acquisition_node/cam_aliases: ['cam0']
  • /acquisition_node/cam_ids: [18355343]
  • /acquisition_node/color: True
  • /acquisition_node/delay: 1.0
  • /acquisition_node/distortion_coeffs: [[-0.021141875266...
  • /acquisition_node/distortion_model: plumb_bob
  • /acquisition_node/exposure_time: 0
  • /acquisition_node/external_trigger: False
  • /acquisition_node/flip_horizontal: [False]
  • /acquisition_node/flip_vertical: [False]
  • /acquisition_node/frames: 3400
  • /acquisition_node/gain: 0
  • /acquisition_node/image_height: 1080
  • /acquisition_node/image_width: 1440
  • /acquisition_node/intrinsic_coeffs: [[1886.9232141485...
  • /acquisition_node/live: False
  • /acquisition_node/live_grid: False
  • /acquisition_node/master_cam: 18355343
  • /acquisition_node/max_rate_save: False
  • /acquisition_node/projection_coeffs: [[913.700317, 0.0...
  • /acquisition_node/rectification_coeffs: [[1.0, 0.0, 0.0, ...
  • /acquisition_node/region_of_interest/height: 0
  • /acquisition_node/region_of_interest/width: 0
  • /acquisition_node/region_of_interest/x_offset: 0
  • /acquisition_node/region_of_interest/y_offset: 0
  • /acquisition_node/save: False
  • /acquisition_node/save_path: ~
  • /acquisition_node/save_type: bmp
  • /acquisition_node/skip: 20
  • /acquisition_node/soft_framerate: 20
  • /acquisition_node/target_grey_value: 0
  • /acquisition_node/tf_prefix:
  • /acquisition_node/time: False
  • /acquisition_node/to_ros: True
  • /acquisition_node/utstamps: False
  • /rosdistro: melodic
  • /rosversion: 1.14.3

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

ROS_MASTER_URI=http://localhost:11311

process[vision_nodelet_manager-1]: started with pid [24716]
process[acquisition_node-2]: started with pid [24717]
[ INFO] [1647779781.468808743]: Initializing nodelet with 8 worker threads.
[ INFO] [1647779781.564471604]: Initializing nodelet
[ INFO] [1647779781.565330707]: [ OK ] USB memory: 1000 MB
[ INFO] [1647779781.565403721]: *** PARAMETER SETTINGS ***
[ INFO] [1647779781.565437236]: ** Date = 20220320
[ INFO] [1647779781.566003782]: Save path set via parameter to: /home/robot2
[ INFO] [1647779781.566031351]: Camera IDs:
[ INFO] [1647779781.566438799]: 18355343
[ INFO] [1647779781.566812453]: Camera Aliases:
[ INFO] [1647779781.566833431]: 18355343 >> cam0
[ INFO] [1647779781.567204194]: External trigger: false
[ INFO] [1647779781.567873531]: Unique time stamps for each camera: false
[ INFO] [1647779781.568181510]: color set to: true
[ INFO] [1647779781.568566525]: 18355343 flip_horizontal 0
[ INFO] [1647779781.568919339]: 18355343 flip_vertical 0
[ INFO] [1647779781.569265452]: Exporting images to ROS: true
[ INFO] [1647779781.569593694]: Showing live images setting: false
[ INFO] [1647779781.569946773]: Showing grid-style live images setting: false
[ INFO] [1647779781.570312210]: Max Rate Save Mode: false
[ INFO] [1647779781.570621499]: Displaying timing details: false
[ INFO] [1647779781.570925149]: No. of images to skip set to: 20
[ INFO] [1647779781.571218234]: Init sleep delays set to : 1.00 sec
[ INFO] [1647779781.571490337]: 'exposure_time'=0, Setting autoexposure
[ INFO] [1647779781.571697555]: 'gain' Parameter was zero or negative, using Auto gain based on target grey value
[ INFO] [1647779781.572001137]: 'target_grey_value'=0, Setting AutoExposureTargetGreyValueAuto to Continuous/ auto
[ INFO] [1647779781.572271215]: Binning set to: 2
[ INFO] [1647779781.572519116]: Using Software rate control, rate set to: 20
[ INFO] [1647779781.572785367]: Saving images set to: 0
[ INFO] [1647779781.573452687]: tf_prefix set to:
[ INFO] [1647779781.574373466]: Region of Interest set to width: 0 height: 0 offset_x: 0 offset_y: 0
[ INFO] [1647779781.574673725]: Camera Intrinsic Paramters:
[ INFO] [1647779781.574926437]: 1886.923214 0.000000 604.721488 0.000000 1886.666877 493.477267 0.000000 0.000000 1.000000
[ INFO] [1647779781.575151651]: Camera Distortion Paramters:
[ INFO] [1647779781.575192451]: -0.021142 -0.373387 2.385983 3.282457
[ INFO] [1647779781.575449834]: Camera Rectification Paramters:
[ INFO] [1647779781.575475599]: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
[ INFO] [1647779781.575798343]: Camera Projection Paramters:
[ INFO] [1647779781.575835167]: 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] [1647779781.575846865]: Camera coeffs provided, camera info messges will be published.
[ INFO] [1647779781.575926838]: *** SYSTEM INFORMATION ***
[ INFO] [1647779781.575938083]: Creating system instance...
[ INFO] [1647779781.575947664]: spinnaker_sdk_camera_driver package version: 1.1.1
[ INFO] [1647779782.571878698]: Spinnaker library version: 2.2.0.48
[ INFO] [1647779782.571943715]: Retreiving list of cameras...
[ INFO] [1647779782.579781382]: Numer of cameras found: 1
[ INFO] [1647779782.579896802]: Cameras connected: 1
[ INFO] [1647779782.581048972]: -18355343 Blackfly BFLY-U3-23S6C FW:v1.8.3.00 FPGA:v2.02
[ INFO] [1647779782.647405477]: Dynamic Reconfigure: Level : 4294967295
[ INFO] [1647779782.648083962]: *** FLUSH SEQUENCE ***
[ INFO] [1647779782.648104807]: Initializing cameras...
[ INFO] [1647779782.757467257]: Deinitializing cameras...
[ INFO] [1647779782.762850258]: All cameras deinitialized.
[ INFO] [1647779784.763082049]: Initializing cameras...
[FATAL] [1647779784.891854336]: Unable to set PixelFormat to BGR8 (entry retrieval). Aborting...
[FATAL] [1647779784.891935268]: Error: Spinnaker: LogicalErrorException NULL pointer dereferenced [-2005]
[ WARN] [1647779784.891954428]: 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] [1647779785.117272730]: Failed to load nodelet '/acquisition_nodeof typeacquisition/Captureto managervision_nodelet_manager'
[acquisition_node-2] process has died [pid 24717, exit code 255, cmd /opt/ros/melodic/lib/nodelet/nodelet load acquisition/Capture vision_nodelet_manager __name:=acquisition_node __log:=/home/robot2/.ros/log/acac6bf2-a83e-11ec-8a67-f4d108339898/acquisition_node-2.log].
log file: /home/robot2/.ros/log/acac6bf2-a83e-11ec-8a67-f4d108339898/acquisition_node-2*.log
[vision_nodelet_manager-1] process has died [pid 24716, exit code -11, cmd /opt/ros/melodic/lib/nodelet/nodelet manager __name:=vision_nodelet_manager __log:=/home/robot2/.ros/log/acac6bf2-a83e-11ec-8a67-f4d108339898/vision_nodelet_manager-1.log].
log file: /home/robot2/.ros/log/acac6bf2-a83e-11ec-8a67-f4d108339898/vision_nodelet_manager-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Screenshots
Screenshot from 2022-03-20 20-31-00
Screenshot from 2022-03-20 20-34-07

We set the color mode at

It is possible that your camera doesn't have BGR8 but has some other color mode. I think you can look it up in SpinView settings.