luxonis / depthai-ros

Official ROS Driver for DepthAI Sensors.
MIT License
239 stars 173 forks source link

[BUG] {No available devices after SIGTERM} #413

Open martinlucan opened 9 months ago

martinlucan commented 9 months ago

Hi @Serafadam ,

while using OAK-FFC-4P custom camera module I occasionally face the issue when the camera is not being found by the host PC. It regularly happens when the camera was previously killed by SIGTERM. Do you know what might be the case? Please, see the output log:


SUMMARY
========

PARAMETERS
 * /oak/camera_i_base_frame: oak-d_frame
 * /oak/camera_i_cam_pitch: 0.0
 * /oak/camera_i_cam_pos_x: 0.0
 * /oak/camera_i_cam_pos_y: 0.0
 * /oak/camera_i_cam_pos_z: 0.0
 * /oak/camera_i_cam_roll: 0.0
 * /oak/camera_i_cam_yaw: 0.0
 * /oak/camera_i_enable_imu: True
 * /oak/camera_i_enable_ir: True
 * /oak/camera_i_floodlight_brightness: 0.0
 * /oak/camera_i_imu_from_descr: False
 * /oak/camera_i_ip: 
 * /oak/camera_i_laser_dot_brightness: 800.0
 * /oak/camera_i_mx_id: 
 * /oak/camera_i_nn_type: spatial
 * /oak/camera_i_parent_frame: oak-d-base-frame
 * /oak/camera_i_pipeline_type: stereo
 * /oak/camera_i_publish_tf_from_calibration: False
 * /oak/camera_i_usb_port_id: 
 * /oak/camera_i_usb_speed: SUPER_PLUS
 * /oak/nn_i_nn_config_path: depthai_ros_drive...
 * /oak/stereo_i_publish_left_rect: True
 * /oak/stereo_i_publish_right_rect: True
 * /robot_description: <?xml version="1....
 * /rosdistro: noetic
 * /rosversion: 1.16.0

NODES
  /
    oak (nodelet/nodelet)
    oak_nodelet_manager (nodelet/nodelet)
    oak_state_publisher (robot_state_publisher/robot_state_publisher)
    set_log_level (rosservice/rosservice)

ROS_MASTER_URI=http://localhost:11311

process[set_log_level-1]: started with pid [115394]
process[oak_state_publisher-2]: started with pid [115395]
process[oak_nodelet_manager-3]: started with pid [115396]
process[oak-4]: started with pid [115397]
[ INFO] [1695047161.437818122]: Loading nodelet /oak of type depthai_ros_driver/Camera to manager oak_nodelet_manager with the following remappings:
[ INFO] [1695047161.442854749]: waitForService: Service [/oak_nodelet_manager/load_nodelet] has not been advertised, waiting...
[ INFO] [1695047161.456336435]: Initializing nodelet with 12 worker threads.
[ INFO] [1695047161.463674415]: waitForService: Service [/oak_nodelet_manager/load_nodelet] is now available.
[2023-09-18 16:26:01.695] [depthai] [info] DEPTHAI_DEBUG enabled, lowered DEPTHAI_LEVEL to 'debug'
[2023-09-18 16:26:01.695] [depthai] [debug] Library information - version: 2.22.0, commit:  from , build: 2023-06-20 18:09:51 +0000
[2023-09-18 16:26:01.696] [depthai] [debug] Initialize - finished
[ INFO] [1695047161.697871563]: No ip/mxid/usb_id specified, connecting to the next available device.
[2023-09-18 16:26:01.809] [depthai] [debug] Resources - Archive 'depthai-bootloader-fwp-0.0.26.tar.xz' open: 3ms, archive read: 107ms
[2023-09-18 16:26:02.166] [depthai] [debug] Resources - Archive 'depthai-device-fwp-f033fd9c7eb0b3578d12f90302e87759c78cfb36.tar.xz' open: 3ms, archive read: 463ms
[set_log_level-1] process has finished cleanly
log file: /home/martinlucan/.ros/log/298f4a44-5627-11ee-91e7-958d63f75c32/set_log_level-1*.log
[ERROR] [1695047165.747481996]: No available devices
[DEBUG] [1695047165.750262705]: Param camera_i_mx_id with value 
[DEBUG] [1695047165.752705438]: Param camera_i_ip with value 
[DEBUG] [1695047165.755099328]: Param camera_i_usb_port_id with value 
Serafadam commented 9 months ago

Hi, sorry for the delay as I was on vacation. Could you check if there are any leftover ROS processes after killing the camera?

martinlucan commented 1 month ago

Hi @Serafadam yes, there was a camera-related node leftover. Even though I killed it manually, I did not manage to launch the camera afterward.

Serafadam commented 1 month ago

Hi, in new release we have fixed an issue with powercycling PoE cameras, this might also help here, it will be available with the next release (you can test it by using DepthAI 2.26.0 from ros-testing PPA)