Spinnaker SDK with ROS
AnsweredHello,
I have Spinnaker SDK version 2.3.0.77 with Ubuntu 18.04 on my Raspberry Pi 4. I also installed ROS melodic to use ROS with Spinnaker.
I follow all the installation step, and at the end I run roslaunch spinnaker_camera_driver camera.launch. I ended up that running that the ROS master is setted up to be Raspberry Pi 4. Infact if I made my pc as ROS master and then run roslaunch spinnaker_camera_driver camera.launch on raspberry pi 4 shell, I'm not able to see ROS topics and nodes as when Raspberry is the master.
This is what I have in the first Raspi shell when my PC is the master:
ubuntu@ubuntu~$ source ~/catkin_ws/devel/setup.bash
ubuntu@ubuntu:~$ export ROS_MASTER_URI=http://172.20.10.3:11311
ubuntu@ubuntu:~$ roslaunch spinnaker_camera_driver camera.launch
... logging to /home/ubuntu/.ros/log/d6f67ec2-5961-11ee-b6e7-d83add344901/roslaunch-rpi-lumio-8522.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://rpi-lumio:41053/
SUMMARY
========
PARAMETERS
* /camera/spinnaker_camera_nodelet/acquisition_frame_rate: 30
* /camera/spinnaker_camera_nodelet/acquisition_frame_rate_enable: True
* /camera/spinnaker_camera_nodelet/auto_white_balance: Continuous
* /camera/spinnaker_camera_nodelet/device_type: USB3
* /camera/spinnaker_camera_nodelet/frame_id: camera
* /camera/spinnaker_camera_nodelet/image_format_color_coding: BayerRG8
* /camera/spinnaker_camera_nodelet/isp_enable: False
* /camera/spinnaker_camera_nodelet/serial: 0
* /rosdistro: melodic
* /rosversion: 1.14.13
NODES
/camera/
camera_nodelet_manager (nodelet/nodelet)
image_proc_debayer (nodelet/nodelet)
spinnaker_camera_nodelet (nodelet/nodelet)
ROS_MASTER_URI=http://172.20.10.3:11311
process[camera/camera_nodelet_manager-1]: started with pid [8535]
process[camera/spinnaker_camera_nodelet-2]: started with pid [8536]
process[camera/image_proc_debayer-3]: started with pid [8537]
[ INFO] [1695399903.955379805]: Initializing nodelet with 4 worker threads.
[ERROR] [1695399904.051540830]: Failed to load nodelet [/camera/image_proc_debayer] of type [image_proc/debayer] even after refreshing the cache: According to the loaded plugin descriptions the class image_proc/debayer with base class type nodelet::Nodelet does not exist. Declared types are imu_filter_madgwick/ImuFilterNodelet laser_filters/scan_to_cloud_filter_chain nodelet_tutorial_math/Plus phidgets_imu/PhidgetsImuNodelet spinnaker_camera_driver/SpinnakerCameraNodelet
[ERROR] [1695399904.051792048]: The error before refreshing the cache was: According to the loaded plugin descriptions the class image_proc/debayer with base class type nodelet::Nodelet does not exist. Declared types are imu_filter_madgwick/ImuFilterNodelet laser_filters/scan_to_cloud_filter_chain nodelet_tutorial_math/Plus phidgets_imu/PhidgetsImuNodelet spinnaker_camera_driver/SpinnakerCameraNodelet
[FATAL] [1695399904.052307556]: Failed to load nodelet '/camera/image_proc_debayer` of type `image_proc/debayer` to manager `camera_nodelet_manager'
[camera/image_proc_debayer-3] process has died [pid 8537, exit code 255, cmd /opt/ros/melodic/lib/nodelet/nodelet load image_proc/debayer camera_nodelet_manager __name:=image_proc_debayer __log:=/home/ubuntu/.ros/log/d6f67ec2-5961-11ee-b6e7-d83add344901/camera-image_proc_debayer-3.log].
log file: /home/ubuntu/.ros/log/d6f67ec2-5961-11ee-b6e7-d83add344901/camera-image_proc_debayer-3*.log
[ INFO] [1695399905.247394210]: [SpinnakerCamera]: Number of cameras detected: 1
[ INFO] [1695399905.854318898]: [SpinnakerCamera::connect]: Using Serial: 0
[ INFO] [1695399905.855051997]: [SpinnakerCamera::connect]: Detected device type: USB3Vision
[ INFO] [1695399906.432694331]: [SpinnakerCamera::connect]: Camera model name: Blackfly S BFS-U3-13Y3M
[ INFO] [1695399906.437444953]: [SpinnakerCamera]: (22392339) DeviceLinkThroughputLimit set to 500000000.
[ INFO] [1695399906.469762978]: [SpinnakerCamera]: (22392339) BinningHorizontal set to 1.
[ INFO] [1695399906.478653554]: [SpinnakerCamera]: (22392339) BinningVertical set to 1.
[ INFO] [1695399906.486384495]: [SpinnakerCamera]: (22392339) DecimationHorizontal set to 1.
[ INFO] [1695399906.494057201]: [SpinnakerCamera]: (22392339) DecimationVertical set to 1.
[ INFO] [1695399906.501542257]: [SpinnakerCamera]: (22392339) ReverseX set to 0.
[ INFO] [1695399906.509086363]: [SpinnakerCamera]: (22392339) ReverseY set to 0.
[ INFO] [1695399906.515040615]: [SpinnakerCamera]: (22392339) OffsetX set to 0.
[ INFO] [1695399906.520028362]: [SpinnakerCamera]: (22392339) OffsetY set to 0.
[ INFO] [1695399906.524752171]: [SpinnakerCamera]: (22392339) Width set to 1280.
[ INFO] [1695399906.529141640]: [SpinnakerCamera]: (22392339) Height set to 1024.
[ INFO] [1695399906.532757828]: [SpinnakerCamera]: (22392339) OffsetX set to 0.
[ INFO] [1695399906.536246046]: [SpinnakerCamera]: (22392339) OffsetY set to 0.
[ WARN] [1695399906.538035438]: [SpinnakerCamera]: (22392339) Entry name BayerRG8 not available.
[ WARN] [1695399906.538246974]: Available:
[ WARN] [1695399906.538889582]: - EnumEntry_PixelFormat_Mono8 (display Mono8, symbolic Mono8)
[ WARN] [1695399906.539142910]: - EnumEntry_PixelFormat_Mono16 (display Mono16, symbolic Mono16)
[ WARN] [1695399906.539454937]: - EnumEntry_PixelFormat_Mono10Packed (display Mono10Packed, symbolic Mono10Packed)
[ WARN] [1695399906.540148467]: - EnumEntry_PixelFormat_Mono12Packed (display Mono12Packed, symbolic Mono12Packed)
[ WARN] [1695399906.540835626]: - EnumEntry_PixelFormat_Mono10p (display Mono10p, symbolic Mono10p)
[ WARN] [1695399906.541107564]: - EnumEntry_PixelFormat_Mono12p (display Mono12p, symbolic Mono12p)
[ INFO] [1695399906.547317144]: [SpinnakerCamera]: (22392339) IspEnable set to 0.
[ INFO] [1695399906.550052783]: [SpinnakerCamera]: (22392339) AcquisitionFrameRateEnable set to 1.
[ INFO] [1695399906.554458732]: [SpinnakerCamera]: (22392339) AcquisitionFrameRate set to 29.9994.
[ INFO] [1695399906.556956337]: [SpinnakerCamera]: (22392339) AcquisitionFrameRateEnable set to 1.
[ INFO] [1695399906.559815871]: [SpinnakerCamera]: (22392339) TriggerMode set to Off.
[ INFO] [1695399906.562074054]: [SpinnakerCamera]: (22392339) TriggerSource set to Line0.
[ INFO] [1695399906.562477276]: [SpinnakerCamera]: (22392339) TriggerSelector set to FrameStart.
[ INFO] [1695399906.564955772]: [SpinnakerCamera]: (22392339) TriggerActivation set to FallingEdge.
[ INFO] [1695399906.567070319]: [SpinnakerCamera]: (22392339) TriggerMode set to Off.
[ INFO] [1695399906.568291707]: [SpinnakerCamera]: (22392339) LineSelector set to Line0.
[ INFO] [1695399906.569906171]: [SpinnakerCamera]: (22392339) LineMode set to Input.
[ INFO] [1695399906.571956520]: [SpinnakerCamera]: (22392339) LineSource set to Off.
[ INFO] [1695399906.574201019]: [SpinnakerCamera]: (22392339) ExposureMode set to Timed.
[ INFO] [1695399906.577324789]: [SpinnakerCamera]: (22392339) ExposureAuto set to Continuous.
[ INFO] [1695399906.580407007]: [SpinnakerCamera]: (22392339) AutoExposureExposureTimeUpperLimit set to 5000.
[ INFO] [1695399906.581182806]: [SpinnakerCamera]: (22392339) GainSelector set to All.
[ INFO] [1695399906.585226399]: [SpinnakerCamera]: (22392339) GainAuto set to Continuous.
[ INFO] [1695399906.589199499]: [SpinnakerCamera]: (22392339) BlackLevel set to 1.7.
[ INFO] [1695399906.590966078]: [SpinnakerCamera]: (22392339) GammaEnable set to 1.
[ INFO] [1695399906.593665072]: [SpinnakerCamera]: (22392339) Gamma set to 1.
[ INFO] [1695399906.595202894]: [SpinnakerCamera]: (22392339) AutoAlgorithmSelector set to Ae.
[ INFO] [1695399906.596703220]: [SpinnakerCamera]: (22392339) AasRoiEnable set to 1.
[ INFO] [1695399906.598320165]: [SpinnakerCamera]: (22392339) AutoExposureLightingMode set to Normal.
[camera/spinnaker_camera_nodelet-2] process has finished cleanly
log file: /home/ubuntu/.ros/log/d6f67ec2-5961-11ee-b6e7-d83add344901/camera-spinnaker_camera_nodelet-2*.log
(I don't know why I have that error).
and this is what I have in the second raspi shell:
ubuntu@ubuntu:~$ source ~/catkin_ws/devel/setup.bash
ubuntu@ubuntu:~$ export ROS_MASTER_URI=http://172.20.10.3:11311
ubuntu@ubuntu:~$ rosnode list
/camera/camera_nodelet_manager
/matlab_global_node_24767
ubuntu@ubuntu:~$ rostopic list
/rosout
/tf
this is what I obtain when Raspi is the master:
ubuntu@ubuntu:~$ rostopic list
/camera/camera_info
/camera/camera_nodelet_manager/bond
/camera/image
/camera/image_raw
/camera/spinnaker_camera_nodelet/parameter_descriptions
/camera/spinnaker_camera_nodelet/parameter_updates
/diagnostics
/rosout
/rosout_agg
/tf
ubuntu@ubuntu:~$ rosnode list
/camera/camera_nodelet_manager
/camera/spinnaker_camera_nodelet
/matlab_global_node_38657
/rosout
Is there anything I can modify inside camera.launch to make it work and have the same output of when raspi is the master? or are there other things I can do?
thank you
-
Official comment
Hello Silvia,
I'm afraid we can not provide that much support here, since we did not develop this driver ourselves.
https://github.com/ros-drivers/flir_camera_driverFrom the outputs it seems like you want to set Pixel Format BayerRG8, while your camera is a mono camera and supports Pixel format Mono8, Mono10, etc. only. Could this be the issue here? Could you please try to change the setting to the Mono8 Pixel Format?
Also, have you tried to compare the launch file of the Raspberry Pi and your PC?
Thanks,
Markus -
Hello Markus,
I set pixel format with Mono8 and now there is no more warning. But I didn't get another thing now. Running camera.launch on the raspberry, raspberry becomes the master of the ros network and new topics and nodes are generated. In particular as reported here https://www.flir.com/support-center/iis/machine-vision/application-note/using-ros-with-spinnaker/ , 'This (roslaunch spinnaker_camera_driver camera.launch) starts streaming images at the default frame rate and publishes them to the ‘/camera/image_raw’ topic.'. The problem is that when I try to subscribe the images in Matlab, it seems no image are streammed on this topic (see the image).
what could be the problem?
thank you very much
0 -
Hi Silvia,
As a next step, could you please try if you get images using the rqt_image_view tool like described in the article?
Thanks,
Markus0
Please sign in to leave a comment.
Comments
3 comments