stereolabs / zed-ros-wrapper

ROS wrapper for the ZED SDK
https://www.stereolabs.com/docs/ros/
MIT License
438 stars 386 forks source link

Unable to detect ZED2 camera on Jetson Xavier NX [BUG] #776

Closed jyang-cpr closed 2 years ago

jyang-cpr commented 2 years ago

Describe the bug Connected a ZED2 camera to the Jetson Xavier via the USB 3 port.

Verified that HID f781 and UVC f780 modules are detected via lsusb:

Bus 002 Device 004: ID 2b03:f780  
Bus 002 Device 002: ID 0bda:0489 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 13d3:3549 IMC Networks 
Bus 001 Device 011: ID 2b03:f781  
Bus 001 Device 010: ID 0424:2512 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0bda:5489 Realtek Semiconductor Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output of dmesg after unplugging then replugging the camera:

[ 1531.555941] usb 2-3.1: Disable of device-initiated U1 failed.
[ 1531.557929] usb 2-3.1: Disable of device-initiated U2 failed.
[ 1532.400236] usb 1-2.1: USB disconnect, device number 4
[ 1532.669233] usb 1-2.1-port1: attempt power cycle
[ 1532.670933] usb 2-3.1: USB disconnect, device number 3
[ 1532.726471] usb 2-3: usb_suspend_both: status 0
[ 1532.726631] usb usb2: usb_suspend_both: status 0
[ 1532.982810] usb 1-2.1.2: USB disconnect, device number 5
[ 1533.166493] usb 1-2: usb_suspend_both: status 0
[ 1537.574411] usb 1-2.1: new high-speed USB device number 10 using tegra-xusb
[ 1537.594687] usb 1-2.1: New USB device found, idVendor=0424, idProduct=2512
[ 1537.594748] usb 1-2.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1537.595504] hub 1-2.1:1.0: USB hub found
[ 1537.595564] hub 1-2.1:1.0: 2 ports detected
[ 1537.886417] usb 1-2.1.2: new full-speed USB device number 11 using tegra-xusb
[ 1537.912439] usb 1-2.1.2: New USB device found, idVendor=2b03, idProduct=f781
[ 1537.912446] usb 1-2.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1537.912451] usb 1-2.1.2: Product: ZED-2 HID INTERFACE
[ 1537.912455] usb 1-2.1.2: Manufacturer: STEREOLABS
[ 1537.912458] usb 1-2.1.2: SerialNumber: 26488301
[ 1537.919722] hid-generic 0003:2B03:F781.0002: hidraw0: USB HID v1.11 Device [STEREOLABS ZED-2 HID INTERFACE] on usb-3610000.xhci-2.1.2/input0
[ 1538.002672] usb 2-3.1: new SuperSpeed USB device number 4 using tegra-xusb
[ 1538.023345] usb 2-3.1: New USB device found, idVendor=2b03, idProduct=f780
[ 1538.023363] usb 2-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1538.023368] usb 2-3.1: Product: ZED 2
[ 1538.023372] usb 2-3.1: Manufacturer: Technologies, Inc.

Tried roslaunching zed_no_tf.launch and zed2.launch, getting the same error for both:

ROS_MASTER_URI=http://localhost:11311

process[zed2/zed2_state_publisher-1]: started with pid [10218]
process[zed2/zed_node-2]: started with pid [10219]
[ INFO] [1630356372.596185016]: Initializing nodelet with 2 worker threads.
[ INFO] [1630356372.722562105]: ********** Starting nodelet '/zed2/zed_node' **********
[ INFO] [1630356372.722813917]: SDK version : 3.5.3
[ INFO] [1630356372.723155394]: *** GENERAL PARAMETERS ***
[ INFO] [1630356372.726444818]:  * Camera Name          -> zed2
[ INFO] [1630356372.733562267]:  * Camera Resolution        -> HD720
[ INFO] [1630356372.736856747]:  * Camera Grab Framerate    -> 30
[ INFO] [1630356372.740814118]:  * Gpu ID           -> -1
[ INFO] [1630356372.743154248]:  * Camera ID            -> -1
[ INFO] [1630356372.745574764]:  * Verbose          -> DISABLED
[ INFO] [1630356372.752620755]:  * Camera Flip          -> DISABLED
[ INFO] [1630356372.764725957]:  * Self calibration     -> ENABLED
[ INFO] [1630356372.792453724]:  * Camera Model by param    -> zed2
[ INFO] [1630356372.792642783]: *** VIDEO PARAMETERS ***
[ INFO] [1630356372.804973492]:  * Image resample factor    -> 1
[ INFO] [1630356372.809949949]:  * Extrinsic param. frame   -> X RIGHT - Y DOWN - Z FWD
[ INFO] [1630356372.810128576]: *** DEPTH PARAMETERS ***
[ INFO] [1630356372.824630613]:  * Depth quality        -> PERFORMANCE
[ INFO] [1630356372.827076569]:  * Depth Sensing mode       -> STANDARD
[ INFO] [1630356372.832592106]:  * OpenNI mode          -> DISABLED
[ INFO] [1630356372.836587109]:  * Depth Stabilization      -> ENABLED
[ INFO] [1630356372.839093962]:  * Minimum depth        -> 0.3 m
[ INFO] [1630356372.849018876]:  * Maximum depth        -> 20 m
[ INFO] [1630356372.856745869]:  * Depth resample factor    -> 1
[ INFO] [1630356372.857002225]: *** POSITIONAL TRACKING PARAMETERS ***
[ INFO] [1630356372.864482271]:  * Positional tracking      -> ENABLED
[ INFO] [1630356372.869174468]:  * Path rate            -> 2 Hz
[ INFO] [1630356372.872530837]:  * Path history size        -> 1
[ INFO] [1630356372.885051245]:  * Odometry DB path     -> /home/administrator/.ros/zed_area_memory.area
[ INFO] [1630356372.896496469]:  * Save Area Memory on closing  -> DISABLED
[ INFO] [1630356372.909922362]:  * Area Memory          -> ENABLED
[ INFO] [1630356372.923992841]:  * IMU Fusion           -> ENABLED
[ INFO] [1630356372.932669225]:  * Floor alignment      -> DISABLED
[ INFO] [1630356372.944612312]:  * Init Odometry with first valid pose data -> ENABLED
[ INFO] [1630356372.951344475]:  * Two D mode           -> DISABLED
[ INFO] [1630356372.964537181]: *** MAPPING PARAMETERS ***
[ INFO] [1630356372.976315338]:  * Mapping          -> DISABLED
[ INFO] [1630356372.976609678]: *** OBJECT DETECTION PARAMETERS ***
[ INFO] [1630356372.991698604]:  * Object Detection     -> DISABLED
[ INFO] [1630356372.992057873]: *** SENSORS PARAMETERS ***
[ INFO] [1630356373.004682123]:  * Sensors timestamp sync   -> DISABLED
[ INFO] [1630356373.005004688]: *** SVO PARAMETERS ***
[ INFO] [1630356373.012513470]:  * SVO input file:      -> 
[ INFO] [1630356373.020565269]:  * SVO REC compression      -> H265 (HEVC)
[ INFO] [1630356373.029049105]: *** COORDINATE FRAMES ***
[ INFO] [1630356373.064564188]:  * map_frame            -> map
[ INFO] [1630356373.064912929]:  * odometry_frame       -> odom
[ INFO] [1630356373.065104324]:  * base_frame           -> base_link
[ INFO] [1630356373.065271046]:  * camera_frame         -> zed2_camera_center
[ INFO] [1630356373.065425320]:  * imu_link         -> zed2_imu_link
[ INFO] [1630356373.065575947]:  * left_camera_frame        -> zed2_left_camera_frame
[ INFO] [1630356373.065743373]:  * left_camera_optical_frame    -> zed2_left_camera_optical_frame
[ INFO] [1630356373.065935312]:  * right_camera_frame       -> zed2_right_camera_frame
[ INFO] [1630356373.066085682]:  * right_camera_optical_frame   -> zed2_right_camera_optical_frame
[ INFO] [1630356373.066717883]:  * depth_frame          -> zed2_left_camera_frame
[ INFO] [1630356373.067098145]:  * depth_optical_frame      -> zed2_left_camera_optical_frame
[ INFO] [1630356373.067873260]:  * disparity_frame      -> zed2_left_camera_frame
[ INFO] [1630356373.068437845]:  * disparity_optical_frame  -> zed2_left_camera_optical_frame
[ INFO] [1630356373.069073374]:  * confidence_frame     -> zed2_left_camera_frame
[ INFO] [1630356373.069640582]:  * confidence_optical_frame -> zed2_left_camera_optical_frame
[ INFO] [1630356373.084684324]:  * Broadcast odometry TF    -> ENABLED
[ INFO] [1630356373.095012891]:  * Broadcast map pose TF    -> ENABLED
[ INFO] [1630356373.104550408]:  * Broadcast IMU pose TF    -> ENABLED
[ INFO] [1630356373.104862380]: *** DYNAMIC PARAMETERS (Init. values) ***
[ INFO] [1630356373.109268717]:  * [DYN] Depth confidence   -> 50
[ INFO] [1630356373.116570841]:  * [DYN] Depth texture conf.    -> 100
[ INFO] [1630356373.125141335]:  * [DYN] pub_frame_rate     -> 15 Hz
[ INFO] [1630356373.130772361]:  * [DYN] point_cloud_freq   -> 15 Hz
[ INFO] [1630356373.136711969]:  * [DYN] brightness     -> 4
[ INFO] [1630356373.144631701]:  * [DYN] contrast       -> 4
[ INFO] [1630356373.149729088]:  * [DYN] hue            -> 0
[ INFO] [1630356373.156624838]:  * [DYN] saturation     -> 4
[ INFO] [1630356373.173035287]:  * [DYN] sharpness      -> 4
[ INFO] [1630356373.177604634]:  * [DYN] gamma          -> 8
[ INFO] [1630356373.184500608]:  * [DYN] auto_exposure_gain -> ENABLED
[ INFO] [1630356373.208571714]:  * [DYN] auto_whitebalance  -> ENABLED
[ INFO] [1630356373.295374974]:  * Camera coordinate system -> Right HANDED Z UP and X FORWARD
[ INFO] [1630356373.296145738]:  *** Opening ZED 2...
[ INFO] [1630356374.709370502]: ZED connection -> CAMERA NOT DETECTED
[ INFO] [1630356378.400521815]: ZED connection -> CAMERA NOT DETECTED
[ INFO] [1630356381.697798998]: ZED connection -> CAMERA NOT DETECTED

I also attempted to run the hello-zed tutorial via the Python API: https://www.stereolabs.com/docs/tutorials/hello-zed/. I was unable to open the camera successfully. I also tried using a different ZED2 camera, which produced the same issues. I also tried switching between the four USB 3 ports on the Jetson Xavier, with no success.

Device information:

To Reproduce Steps to reproduce the behavior:

  1. Plug ZED2 camera into Jetson Xavier via USB 3 port
  2. Install ZED SDK version compatible for Jetson Xavier/CUDA 10.2/JetPack 4.4 from here: https://download.stereolabs.com/zedsdk/3.5/jp44/jetsons
  3. Install and build zed-ros-wrapper
  4. Run roslaunch zed_no_tf.launch or roslaunch zed2.launch
  5. Obtain ZED connection -> CAMERA NOT DETECTED error

Expected behavior

Screenshots

Additional context

Myzhar commented 2 years ago

Hi @jyang-cpr this seems to be a hardware problem. Please write an email to support@stereolabs.com attaching the report generated by the ZED Diagnostic tool. Please also test the camera with a different device (Desktop PC, laptop) to verify if the problem persists. Thank you

jyang-cpr commented 2 years ago

@Myzhar

Thanks for the response. I tested the ZED2 camera on a Jetson Xavier AGX (not NX) running JetPack 4.6, and everything is working fine. Just doesn't seem to work on the Jetson NX with JetPack 4.4. I'll contact support@stereolabs.com with the diagnostics info, incase it is a hardware issue.

jyang-cpr commented 2 years ago

Just placing this information here incase it's helpful in the future:

I upgraded the Jetson NX to JetPack 4.6 (CUDA 10.2), and this error goes away. In fact, JetPack 4.6 is allowing the ZED2 camera to work reliably on the Jetson Xavier NX, Jetson Xavier AGX, and the Jetson Nano, as I tested all of these platforms last week. The only caveat is that because the ZED SDK has not been released for JP4.6 yet, I have been using the ZED SDK for JP4.4 (https://download.stereolabs.com/zedsdk/3.5/jp44/jetsons). I hope and assume that the ZED2 camera will continue to work reliably once the SDK for JP4.6 is released :)

Myzhar commented 2 years ago

SDK v3.6 with JP4.6 support is in the final test phase. It will be released very soon