-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Jazzy] Fails to connect to Grasshopper USB3 on WSL Ubuntu 24.04 with #224
Comments
I have not seen this one before. What does lsusb -t tell you? Does the cam show as USB3 at 5000 Mbits/s? |
Thanks for the quick reply! I've pulled commit 30c8e0c and build it. It's still producing the warnings when it fails to set the parameters like the other branches. I've updated the Grasshopper config with 'dump_node_map': True, this prints "dumping node map!" but no more to the console. Extra log info has been added to the SpinnakerWrapperImpl::startCamera function to identify that the exception is thrown in the call to set_acquisition_mode_continuous(). Is it possible it's not getting a valid nodeMap at all for some reason?
Once the USB camera is attached to WSL using usbipd, in Ubuntu I see this:
SpinView in Windows detected and captures from the camera without issue. I've tried several reboots and disconnects. |
Verbose lsusb output:
|
I was really looking for "lsusb -t". The -t shows a tree, with the speed of the devices. My gut tells me this is not a bug in the ROS2 driver, but a system or permission issue. The question is also why the different behavior with the system packages vs compiled from source? Are the packages treated differently permissions wise than random code run by the user? Is running ROS2 humble on the 22.04 machine an option? Not sure what to do if that one fails as well. I believe SpinView uses the Spinakker SDK underneath, so the hope is if SpinView works, so should the ROS2 driver. Also check the system log (/var/log/syslog and dmesg on Ubuntu). Maybe some clue there as to what the problem is. |
I wasn't planning on setting up ROS on the 22.04 machine, but right now it's looking like a useful option! I'll get it installed and let you know what I find. Here are lsusb outputs:
Here is the output of dmesg, I think covering the failed node startup (syslog contains the same messages as far as I can tell):
|
After installing ROS2 humble and the spinnaker_camera_driver using apt on the 22.04 machine, the node is still failing to start the camera. If I run spinview in the same console immediately after this it detects and opens the camera without any problems. I've also tried changing the owner and group of the install folder when building the driver from source to root:root to match that of the Debian package installed version. This hasn't affects the failure. Do you have any idea what commit of the repo has been build into the debian packages distributed via apt? It would be really useful to get the same behavior built from source? I should be able to dig a lot more into the nodemap issue that seems to be causing the problem, but that will probably have to wait until next week now. Thanks for your help so far!
|
On Humble (Ubuntu 22.04) the apt package version says 3.0.0, which corresponds to tag 3.0.0 on the ros2-release branch. So checking out tag 3.0.0 on ros2-release should get you the exact sources used for humble. On Jazzy though it looks to me as we are still on apt package 2.0.20 (not synced yet), so for that you need to check out tag 2.0.20 from ros2-release. |
Quick Update. I've built the 2.0.20 tag on Ubuntu 20.04 and it still fails to configure the camera, unlike the Debian package version. Patching in the binary and shared object to the installed locations results in the node still failing to configure the camera. I'm not sure what the difference is but the binary and library built are significantly larger than the Debian packaged ones:
We're currently building a native Ubuntu 22.04 machine to see if that resolves the issue. |
Another Update. The node works first time when installed on a native Ubuntu 22.04 machine with the same hardware. So whatever the issue is it's something to do with WSL2. However spinview works fine under WSL2 so whatever the issue it must be solvable. Interestingly the Spinnaker SDK examples build for Ubuntu 22.04 under WSL2 also fail. This will probably be my last update since we've found a working solution. I hope this information comes in useful at some point. |
Thanks for bringing this to a conclusion, although it is not exactly what you had in mind. |
Is this behavior also observed when using SpinVIew?
We have SpinView setup on an Ubuntu 22.04 WSL VM on the same machine and it's working fine. SpinView doesn't appear to support Ubuntu 24.04, we've tried to install it but it's compiled against older libraries and fails to run.
Describe the bug
Initially installed ros-jazzy-spinnaker-camera-driver using apt, and completed installation steps. The default frame-rate needed to be reduced from 100 to 30, after that all configuration parameters were updated correctly. Then the node crashes with:
$ ros2 launch spinnaker_camera_driver driver_node.launch.py camera_type:=grasshopper serial:="'22415660'"
[INFO] [launch]: All log files can be found below ------
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [camera_driver_node-1]: process started with pid [11628]
[camera_driver_node-1] [INFO] [1734086532.785963064] [22415660]: reading ros parameters for camera with serial: 22415660
[camera_driver_node-1] [INFO] [1734086532.786021228] [22415660]: not adjusting time stamps!
[camera_driver_node-1] [INFO] [1734086532.786052676] [22415660]: parameter definitions file: /opt/ros/jazzy/share/spinnaker_camera_driver/config/grasshopper.yaml
[camera_driver_node-1] [INFO] [1734086532.791310840] [flir_camera]: using default calibration URL
[camera_driver_node-1] [INFO] [1734086532.791363332] [flir_camera]: camera calibration URL: file:///home/pete/.ros/camera_info/flir_camera.yaml
[camera_driver_node-1] [INFO] [1734086533.834352174] [22415660]: using spinnaker lib version: 4.0.0.116
[camera_driver_node-1] [INFO] [1734086533.834708895] [22415660]: found camera with serial number: 22415660
[camera_driver_node-1] [INFO] [1734086534.130849470] [22415660]: setting AnalogControl/GainAuto to: Continuous
[camera_driver_node-1] [INFO] [1734086534.138087939] [22415660]: setting AcquisitionControl/ExposureAuto to: Continuous
[camera_driver_node-1] [INFO] [1734086534.148790629] [22415660]: setting AcquisitionControl/AcquisitionFrameRateAuto to: Off
[camera_driver_node-1] [INFO] [1734086534.155266723] [22415660]: setting AcquisitionControl/AcquisitionFrameRate to: 30
[camera_driver_node-1] [INFO] [1734086534.164425589] [22415660]: setting AcquisitionControl/TriggerMode to: Off
[camera_driver_node-1] [INFO] [1734086534.174008761] [22415660]: setting ChunkDataControl/ChunkModeActive to: 1
[camera_driver_node-1] [INFO] [1734086534.179369043] [22415660]: setting ChunkDataControl/ChunkSelector to: ExposureTime
[camera_driver_node-1] [INFO] [1734086534.184912093] [22415660]: setting ChunkDataControl/ChunkEnable to: 1
[camera_driver_node-1] [INFO] [1734086534.196011401] [22415660]: setting ChunkDataControl/ChunkSelector to: Gain
[camera_driver_node-1] [INFO] [1734086534.199726988] [22415660]: setting ChunkDataControl/ChunkEnable to: 1
[camera_driver_node-1] [INFO] [1734086534.206759401] [22415660]: setting ChunkDataControl/ChunkSelector to: Timestamp
[camera_driver_node-1] [INFO] [1734086534.210746451] [22415660]: setting ChunkDataControl/ChunkEnable to: 1
[camera_driver_node-1] terminate called after throwing an instance of 'Spinnaker::Exception'
[camera_driver_node-1] what(): Spinnaker: Could not start acquisition. Please try reconnecting the device. [-1010]
[ERROR] [camera_driver_node-1]: process has died [pid 11628, exit code -6, cmd '/opt/ros/jazzy/lib/spinnaker_camera_driver/camera_driver_node --ros-args -r _node:=flir_camera --params-file /tmp/launch_params_ahfwup1j --params-file /tmp/launch_params_ktkflpv -r ~/control:=/exposure_control/control'].
$ ros2 launch spinnaker_camera_driver driver_node.launch.py camera_type:=grasshopper serial:="'22415660'"
[INFO] [launch]: All log files can be found below --------
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [camera_driver_node-1]: process started with pid [11541]
[camera_driver_node-1] [INFO] [1734086074.526915221] [22415660]: reading ros parameters for camera with serial: 22415660
[camera_driver_node-1] [INFO] [1734086074.526969740] [22415660]: not adjusting time stamps!
[camera_driver_node-1] [INFO] [1734086074.527003655] [22415660]: parameter definitions file: /home/pete/flir_camera_driver/install/spinnaker_camera_driver/share/spinnaker_camera_driver/config/grasshopper.yaml
[camera_driver_node-1] [INFO] [1734086074.529106717] [flir_camera]: using default calibration URL
[camera_driver_node-1] [INFO] [1734086074.529161812] [flir_camera]: camera calibration URL: file:///home/pete/.ros/camera_info/flir_camera.yaml
[camera_driver_node-1] [INFO] [1734086075.565260727] [22415660]: using spinnaker lib version: 4.0.0.116
[camera_driver_node-1] [INFO] [1734086075.565566967] [22415660]: found camera with serial number: 22415660
[camera_driver_node-1] [INFO] [1734086075.914411701] [Spinnaker Wrapper]: Initialized camera [serial: 22415660] from: [USB Interface 0]
[camera_driver_node-1] [INFO] [1734086075.914508199] [22415660]: setting AnalogControl/GainAuto to: Continuous
[camera_driver_node-1] no category node: Root vs AnalogControl/GainAuto
[camera_driver_node-1] no category node: Root vs AnalogControl/GainAuto
[camera_driver_node-1] no category node: Root vs AnalogControl/GainAuto
[camera_driver_node-1] [WARN] [1734086075.914551927] [22415660]: setting AnalogControl/GainAuto failed: node AnalogControl/GainAuto not found!
[camera_driver_node-1] [WARN] [1734086075.914553789] [22415660]: AnalogControl/GainAuto set to: UNKNOWN instead of: Continuous
[camera_driver_node-1] [INFO] [1734086075.914651925] [22415660]: setting AcquisitionControl/ExposureAuto to: Continuous
[camera_driver_node-1] no category node: Root vs AcquisitionControl/ExposureAuto
[camera_driver_node-1] no category node: Root vs AcquisitionControl/ExposureAuto
[camera_driver_node-1] no category node: Root vs AcquisitionControl/ExposureAuto
[camera_driver_node-1] [WARN] [1734086075.914660579] [22415660]: setting AcquisitionControl/ExposureAuto failed: node AcquisitionControl/ExposureAuto not found!
[camera_driver_node-1] [WARN] [1734086075.914662661] [22415660]: AcquisitionControl/ExposureAuto set to: UNKNOWN instead of: Continuous
[camera_driver_node-1] [INFO] [1734086075.914670640] [22415660]: setting AcquisitionControl/AcquisitionFrameRateAuto to: Off
[camera_driver_node-1] no category node: Root vs AcquisitionControl/AcquisitionFrameRateAuto
[camera_driver_node-1] no category node: Root vs AcquisitionControl/AcquisitionFrameRateAuto
[camera_driver_node-1] no category node: Root vs AcquisitionControl/AcquisitionFrameRateAuto
[camera_driver_node-1] [WARN] [1734086075.914677213] [22415660]: setting AcquisitionControl/AcquisitionFrameRateAuto failed: node AcquisitionControl/AcquisitionFrameRateAuto not found!
[camera_driver_node-1] [WARN] [1734086075.914679053] [22415660]: AcquisitionControl/AcquisitionFrameRateAuto set to: UNKNOWN instead of: Off
[camera_driver_node-1] [INFO] [1734086075.914697199] [22415660]: setting AcquisitionControl/AcquisitionFrameRate to: 100
[camera_driver_node-1] no category node: Root vs AcquisitionControl/AcquisitionFrameRate
[camera_driver_node-1] no category node: Root vs AcquisitionControl/AcquisitionFrameRate
[camera_driver_node-1] no category node: Root vs AcquisitionControl/AcquisitionFrameRate
[camera_driver_node-1] [WARN] [1734086075.914706253] [22415660]: setting AcquisitionControl/AcquisitionFrameRate failed: node AcquisitionControl/AcquisitionFrameRate not found!
[camera_driver_node-1] [INFO] [1734086075.914717407] [22415660]: setting AcquisitionControl/TriggerMode to: Off
[camera_driver_node-1] no category node: Root vs AcquisitionControl/TriggerMode
[camera_driver_node-1] no category node: Root vs AcquisitionControl/TriggerMode
[camera_driver_node-1] no category node: Root vs AcquisitionControl/TriggerMode
[camera_driver_node-1] [WARN] [1734086075.914723807] [22415660]: setting AcquisitionControl/TriggerMode failed: node AcquisitionControl/TriggerMode not found!
[camera_driver_node-1] [WARN] [1734086075.914725476] [22415660]: AcquisitionControl/TriggerMode set to: UNKNOWN instead of: Off
[camera_driver_node-1] [INFO] [1734086075.914741546] [22415660]: setting ChunkDataControl/ChunkModeActive to: 1
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkModeActive
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkModeActive
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkModeActive
[camera_driver_node-1] [WARN] [1734086075.914749272] [22415660]: setting ChunkDataControl/ChunkModeActive failed: node ChunkDataControl/ChunkModeActive not found!
[camera_driver_node-1] [INFO] [1734086075.914761793] [22415660]: setting ChunkDataControl/ChunkSelector to: ExposureTime
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkSelector
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkSelector
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkSelector
[camera_driver_node-1] [WARN] [1734086075.914768078] [22415660]: setting ChunkDataControl/ChunkSelector failed: node ChunkDataControl/ChunkSelector not found!
[camera_driver_node-1] [WARN] [1734086075.914769635] [22415660]: ChunkDataControl/ChunkSelector set to: UNKNOWN instead of: ExposureTime
[camera_driver_node-1] [INFO] [1734086075.914774921] [22415660]: setting ChunkDataControl/ChunkEnable to: 1
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkEnable
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkEnable
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkEnable
[camera_driver_node-1] [WARN] [1734086075.914781434] [22415660]: setting ChunkDataControl/ChunkEnable failed: node ChunkDataControl/ChunkEnable not found!
[camera_driver_node-1] [INFO] [1734086075.914787044] [22415660]: setting ChunkDataControl/ChunkSelector to: Gain
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkSelector
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkSelector
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkSelector
[camera_driver_node-1] [WARN] [1734086075.914793313] [22415660]: setting ChunkDataControl/ChunkSelector failed: node ChunkDataControl/ChunkSelector not found!
[camera_driver_node-1] [WARN] [1734086075.914794876] [22415660]: ChunkDataControl/ChunkSelector set to: UNKNOWN instead of: Gain
[camera_driver_node-1] [INFO] [1734086075.914799871] [22415660]: setting ChunkDataControl/ChunkEnable to: 1
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkEnable
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkEnable
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkEnable
[camera_driver_node-1] [WARN] [1734086075.914807774] [22415660]: setting ChunkDataControl/ChunkEnable failed: node ChunkDataControl/ChunkEnable not found!
[camera_driver_node-1] [INFO] [1734086075.914813094] [22415660]: setting ChunkDataControl/ChunkSelector to: Timestamp
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkSelector
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkSelector
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkSelector
[camera_driver_node-1] [WARN] [1734086075.914819424] [22415660]: setting ChunkDataControl/ChunkSelector failed: node ChunkDataControl/ChunkSelector not found!
[camera_driver_node-1] [WARN] [1734086075.914821087] [22415660]: ChunkDataControl/ChunkSelector set to: UNKNOWN instead of: Timestamp
[camera_driver_node-1] [INFO] [1734086075.914849949] [22415660]: setting ChunkDataControl/ChunkEnable to: 1
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkEnable
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkEnable
[camera_driver_node-1] no category node: Root vs ChunkDataControl/ChunkEnable
[camera_driver_node-1] [WARN] [1734086075.914856868] [22415660]: setting ChunkDataControl/ChunkEnable failed: node ChunkDataControl/ChunkEnable not found!
[camera_driver_node-1] terminate called after throwing an instance of 'Spinnaker::Exception'
[camera_driver_node-1] what(): Spinnaker: Invalid handle of type EnumNode. [-1006]
[ERROR] [camera_driver_node-1]: process has died [pid 11541, exit code -6, cmd '/home/pete/flir_camera_driver/install/spinnaker_camera_driver/lib/spinnaker_camera_driver/camera_driver_node --ros-args -r __node:=flir_camera --params-file /tmp/launch_params_y2oq2m9w --params-file /tmp/launch_params_nb1k_c8t -r ~/control:=/exposure_control/control'].
The text was updated successfully, but these errors were encountered: