12 Replies Latest reply on Jun 21, 2018 10:26 AM by gmathur

    Cannot run ROS more than once with Realsense D415 and Intel Compute Stick

    gmathur

      I have been trying to get ROS working with the Realsense D415 and the Intel compute stick BOXSTK1AW32SC

       

      1. Followed the instructions here to boot it into Ubuntu 16.04 LTS using isorespin.sh and Ubuntu 16.04 LTS

          linuxium.com.au: Customizing Ubuntu ISOs: Documentation and examples of how to use 'isorespin.sh'

      2. Then installed ROS using the method discussed here:

          kinetic/Installation/Ubuntu - ROS Wiki

      3. Followed by the RealSense latest SDK v2.12.0 using the instructions below.

          librealsense/distribution_linux.md at development · IntelRealSense/librealsense · GitHub

      4. Plugging in the Realsense D415 camera shows me the following

      dmesg

      [  151.649510] Linux video capture interface: v2.00

      [  151.676062] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) 415 (8086:0ad3)

      [  151.678475] uvcvideo: Unable to create debugfs 2-6 directory.

      [  151.678856] uvcvideo 2-1:1.0: Entity type for entity Intel(R) RealSense(TM) 415 RGB was not initialized!

      [  151.678863] uvcvideo 2-1:1.0: Entity type for entity Processing 2 was not initialized!

      [  151.678869] uvcvideo 2-1:1.0: Entity type for entity Intel(R) RealSense(TM) 415 RGB was not initialized!

      [  151.678873] uvcvideo 2-1:1.0: Entity type for entity Camera 1 was not initialized!

      [  151.679636] input: Intel(R) RealSense(TM) 415: Int as /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/input/input6

      [  151.680234] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) 415 (8086:0ad3)

      [  151.681296] uvcvideo: Unable to create debugfs 2-6 directory.

      [  151.681750] uvcvideo 2-1:1.3: Entity type for entity Processing 7 was not initialized!

      [  151.681758] uvcvideo 2-1:1.3: Entity type for entity Extension 8 was not initialized!

      [  151.681763] uvcvideo 2-1:1.3: Entity type for entity Camera 6 was not initialized!

      [  151.682564] usbcore: registered new interface driver uvcvideo

      [  151.682568] USB Video Class driver (1.1.2.realsense-1.2.0)

      5. Also compiled librealsense from the repo. Running rs-depth example from librealsense works fine.

       

      But

       

      The first time I run ROS now, the camera starts up and either runs for a few mins or dies within 30 seconds

      roslaunch realsense2_camera rs_camera.launch

      SUMMARY

      ========

       

       

      PARAMETERS

      * /camera/realsense2_camera/accel_fps: 1000

      * /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...

      * /camera/realsense2_camera/align_depth: False

      * /camera/realsense2_camera/camera_aligned_depth_to_color_frame_id: camera_aligned_de...

      * /camera/realsense2_camera/camera_aligned_depth_to_fisheye_frame_id: camera_aligned_de...

      * /camera/realsense2_camera/camera_aligned_depth_to_infra1_frame_id: camera_aligned_de...

      * /camera/realsense2_camera/camera_aligned_depth_to_infra2_frame_id: camera_aligned_de...

      * /camera/realsense2_camera/color_fps: 30

      * /camera/realsense2_camera/color_height: 480

      * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...

      * /camera/realsense2_camera/color_width: 640

      * /camera/realsense2_camera/depth_fps: 30

      * /camera/realsense2_camera/depth_height: 480

      * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...

      * /camera/realsense2_camera/depth_width: 640

      * /camera/realsense2_camera/enable_color: True

      * /camera/realsense2_camera/enable_depth: True

      * /camera/realsense2_camera/enable_fisheye: True

      * /camera/realsense2_camera/enable_imu: True

      * /camera/realsense2_camera/enable_infra1: True

      * /camera/realsense2_camera/enable_infra2: True

      * /camera/realsense2_camera/enable_pointcloud: False

      * /camera/realsense2_camera/enable_sync: False

      * /camera/realsense2_camera/fisheye_fps: 30

      * /camera/realsense2_camera/fisheye_height: 480

      * /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...

      * /camera/realsense2_camera/fisheye_width: 640

      * /camera/realsense2_camera/gyro_fps: 1000

      * /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...

      * /camera/realsense2_camera/infra1_fps: 30

      * /camera/realsense2_camera/infra1_height: 480

      * /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...

      * /camera/realsense2_camera/infra1_width: 640

      * /camera/realsense2_camera/infra2_fps: 30

      * /camera/realsense2_camera/infra2_height: 480

      * /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...

      * /camera/realsense2_camera/infra2_width: 640

      * /camera/realsense2_camera/json_file_path:

      * /camera/realsense2_camera/serial_no:

      * /rosdistro: kinetic

      * /rosversion: 1.12.13

       

       

      NODES

        /camera/

          realsense2_camera (nodelet/nodelet)

          realsense2_camera_manager (nodelet/nodelet)

       

       

      ROS_MASTER_URI=http://10.1.10.44:11311/

       

       

      process[camera/realsense2_camera_manager-1]: started with pid [21321]

      process[camera/realsense2_camera-2]: started with pid [21322]

      [ INFO] [1529260022.012281354]: Initializing nodelet with 4 worker threads.

      [ INFO] [1529260022.213021884]: RealSense ROS v2.0.3

      [ INFO] [1529260022.213161460]: Running with LibRealSense v2.12.0

      17/06 11:27:02,216 WARNING [140247913064320] (backend-hid.cpp:1091) Failed to read busnum/devnum. Device Path: /sys/bus/iio/devices/iio:device0

      17/06 11:27:02,407 WARNING [140247913064320] (backend-hid.cpp:1091) Failed to read busnum/devnum. Device Path: /sys/bus/iio/devices/iio:device0

      [ INFO] [1529260023.113075126]: getParameters...

      [ INFO] [1529260024.083102146]: setupDevice...

      [ INFO] [1529260024.083614272]: JSON file is not provided

      [ INFO] [1529260024.084078935]: ROS Node Namespace: camera

      [ INFO] [1529260024.084623737]: Device Name: Intel RealSense D415

      [ INFO] [1529260024.085053450]: Device Serial No: 810512061779

      [ INFO] [1529260024.085484876]: Device FW version: 05.09.11.00

      [ INFO] [1529260024.085911539]: Device Product ID: 0x0AD3

      [ INFO] [1529260024.086329615]: Enable PointCloud: Off

      [ INFO] [1529260024.086576278]: Align Depth: Off

      [ INFO] [1529260024.086861041]: Sync Mode: Off

      [ INFO] [1529260024.088835595]: Device Sensors:

      [ INFO] [1529260024.090294411]: Stereo Module was found.

      [ INFO] [1529260024.090797075]: RGB Camera was found.

      [ INFO] [1529260024.092218903]: (Fisheye, 0) sensor isn't supported by current device! -- Skipping...

      [ INFO] [1529260024.092715704]: (Gyro, 0) sensor isn't supported by current device! -- Skipping...

      [ INFO] [1529260024.093070179]: (Accel, 0) sensor isn't supported by current device! -- Skipping...

      [ INFO] [1529260024.093420343]: setupPublishers...

      [ INFO] [1529260024.133592427]: Expected frequency for depth = 30.00000

      [ INFO] [1529260024.701865412]: Expected frequency for infra1 = 30.00000

      [ INFO] [1529260025.285574293]: Expected frequency for infra2 = 30.00000

      [ INFO] [1529260025.824500716]: Expected frequency for color = 30.00000

      [ INFO] [1529260026.675438922]: setupStreams...

      [ INFO] [1529260026.722345558]: depth stream is enabled - width: 640, height: 480, fps: 30

      [ INFO] [1529260026.723922224]: infra1 stream is enabled - width: 640, height: 480, fps: 30

      [ INFO] [1529260026.725249602]: infra2 stream is enabled - width: 640, height: 480, fps: 30

      [ INFO] [1529260026.760400789]: color stream is enabled - width: 640, height: 480, fps: 30

      [ INFO] [1529260026.815681243]: publishStaticTransforms...

      [ INFO] [1529260026.827296580]: RealSense Node Is Up!

      17/06 11:27:07,409 WARNING [140247278741248] (backend-hid.cpp:1091) Failed to read busnum/devnum. Device Path: /sys/bus/iio/devices/iio:device0

      17/06 11:27:12,421 WARNING [140247278741248] (backend-hid.cpp:1091) Failed to read busnum/devnum. Device Path: /sys/bus/iio/devices/iio:device0

      [camera/realsense2_camera_manager-1] process has died [pid 21321, exit code -11, cmd /opt/ros/kinetic/lib/nodelet/nodelet manager __name:=realsense2_camera_manager __log:=/home/g/.ros/log/8b3bf5cc-7256-11e8-9c82-000c2931041e/camera-realsense2_camera_manager-1.log].

      log file: /home/g/.ros/log/8b3bf5cc-7256-11e8-9c82-000c2931041e/camera-realsense2_camera_manager-1*.log

      [camera/realsense2_camera-2] process has finished cleanly

      log file: /home/g/.ros/log/8b3bf5cc-7256-11e8-9c82-000c2931041e/camera-realsense2_camera-2*.log

      all processes on machine have died, roslaunch will exit

      shutting down processing monitor...

      ... shutting down processing monitor complete

      done

       

      And if I try a second time around, it never even starts up.

       

      SUMMARY

      ========

       

       

      PARAMETERS

      * /camera/realsense2_camera/accel_fps: 1000

      * /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...

      * /camera/realsense2_camera/align_depth: False

      * /camera/realsense2_camera/camera_aligned_depth_to_color_frame_id: camera_aligned_de...

      * /camera/realsense2_camera/camera_aligned_depth_to_fisheye_frame_id: camera_aligned_de...

      * /camera/realsense2_camera/camera_aligned_depth_to_infra1_frame_id: camera_aligned_de...

      * /camera/realsense2_camera/camera_aligned_depth_to_infra2_frame_id: camera_aligned_de...

      * /camera/realsense2_camera/color_fps: 30

      * /camera/realsense2_camera/color_height: 480

      * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...

      * /camera/realsense2_camera/color_width: 640

      * /camera/realsense2_camera/depth_fps: 30

      * /camera/realsense2_camera/depth_height: 480

      * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...

      * /camera/realsense2_camera/depth_width: 640

      * /camera/realsense2_camera/enable_color: True

      * /camera/realsense2_camera/enable_depth: True

      * /camera/realsense2_camera/enable_fisheye: True

      * /camera/realsense2_camera/enable_imu: True

      * /camera/realsense2_camera/enable_infra1: True

      * /camera/realsense2_camera/enable_infra2: True

      * /camera/realsense2_camera/enable_pointcloud: False

      * /camera/realsense2_camera/enable_sync: False

      * /camera/realsense2_camera/fisheye_fps: 30

      * /camera/realsense2_camera/fisheye_height: 480

      * /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...

      * /camera/realsense2_camera/fisheye_width: 640

      * /camera/realsense2_camera/gyro_fps: 1000

      * /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...

      * /camera/realsense2_camera/infra1_fps: 30

      * /camera/realsense2_camera/infra1_height: 480

      * /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...

      * /camera/realsense2_camera/infra1_width: 640

      * /camera/realsense2_camera/infra2_fps: 30

      * /camera/realsense2_camera/infra2_height: 480

      * /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...

      * /camera/realsense2_camera/infra2_width: 640

      * /camera/realsense2_camera/json_file_path:

      * /camera/realsense2_camera/serial_no:

      * /rosdistro: kinetic

      * /rosversion: 1.12.13

       

       

      NODES

        /camera/

          realsense2_camera (nodelet/nodelet)

          realsense2_camera_manager (nodelet/nodelet)

       

       

      ROS_MASTER_URI=http://10.1.10.44:11311/

       

       

      process[camera/realsense2_camera_manager-1]: started with pid [21378]

      process[camera/realsense2_camera-2]: started with pid [21379]

      [ INFO] [1529260079.029740103]: Initializing nodelet with 4 worker threads.

      [ INFO] [1529260079.233914267]: RealSense ROS v2.0.3

      [ INFO] [1529260079.234134980]: Running with LibRealSense v2.12.0

      17/06 11:27:59,237 WARNING [139830800779136] (backend-hid.cpp:1091) Failed to read busnum/devnum. Device Path: /sys/bus/iio/devices/iio:device0

      17/06 11:27:59,455 WARNING [139830800779136] (backend-hid.cpp:1091) Failed to read busnum/devnum. Device Path: /sys/bus/iio/devices/iio:device0

      [ INFO] [1529260080.137524482]: getParameters...

      [ INFO] [1529260081.097467980]: setupDevice...

      [ INFO] [1529260081.098547333]: JSON file is not provided

      [ INFO] [1529260081.099187897]: ROS Node Namespace: camera

      [ INFO] [1529260081.099881487]: Device Name: Intel RealSense D415

      [ INFO] [1529260081.100399263]: Device Serial No: 810512061779

      [ INFO] [1529260081.100920140]: Device FW version: 05.09.11.00

      [ INFO] [1529260081.101428754]: Device Product ID: 0x0AD3

      [ INFO] [1529260081.101924018]: Enable PointCloud: Off

      [ INFO] [1529260081.102492807]: Align Depth: Off

      [ INFO] [1529260081.103115609]: Sync Mode: Off

      [ INFO] [1529260081.105376291]: Device Sensors:

      [ INFO] [1529260081.107198409]: Stereo Module was found.

      [ INFO] [1529260081.107737260]: RGB Camera was found.

      [ INFO] [1529260081.108609963]: (Fisheye, 0) sensor isn't supported by current device! -- Skipping...

      [ INFO] [1529260081.108786763]: (Gyro, 0) sensor isn't supported by current device! -- Skipping...

      [ INFO] [1529260081.108927339]: (Accel, 0) sensor isn't supported by current device! -- Skipping...

      [ INFO] [1529260081.109100252]: setupPublishers...

      [ INFO] [1529260081.145510560]: Expected frequency for depth = 30.00000

      [ INFO] [1529260081.686841840]: Expected frequency for infra1 = 30.00000

      [ INFO] [1529260082.216313923]: Expected frequency for infra2 = 30.00000

      [ INFO] [1529260082.749814718]: Expected frequency for color = 30.00000

      [ INFO] [1529260083.295038048]: setupStreams...

      [ INFO] [1529260083.340251382]: depth stream is enabled - width: 640, height: 480, fps: 30

      [ INFO] [1529260083.341752949]: infra1 stream is enabled - width: 640, height: 480, fps: 30

      [ INFO] [1529260083.343107415]: infra2 stream is enabled - width: 640, height: 480, fps: 30

      [ INFO] [1529260083.377375204]: color stream is enabled - width: 640, height: 480, fps: 30

      17/06 11:28:03,412 WARNING [139830133532416] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,412 WARNING [139830133532416] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,413 WARNING [139830133532416] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,413 WARNING [139830133532416] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,414 WARNING [139830102607616] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,414 WARNING [139830102607616] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,414 WARNING [139830102607616] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,415 WARNING [139830102607616] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,435 WARNING [139830091740928] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,436 WARNING [139830091740928] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,436 WARNING [139830091740928] (backend-v4l2.cpp:866) Empty frame has arrived.

      17/06 11:28:03,437 WARNING [139830091740928] (backend-v4l2.cpp:866) Empty frame has arrived.

      [ INFO] [1529260083.448080014]: publishStaticTransforms...

      [ INFO] [1529260083.459726361]: RealSense Node Is Up!

      17/06 11:28:04,457 WARNING [139830167103232] (backend-hid.cpp:1091) Failed to read busnum/devnum. Device Path: /sys/bus/iio/devices/iio:device0

      17/06 11:28:08,419 WARNING [139830133532416] (backend-v4l2.cpp:883) Frames didn't arrived within 5 seconds

      17/06 11:28:08,420 WARNING [139830102607616] (backend-v4l2.cpp:883) Frames didn't arrived within 5 seconds

      17/06 11:28:09,471 WARNING [139830167103232] (backend-hid.cpp:1091) Failed to read busnum/devnum. Device Path: /sys/bus/iio/devices/iio:device0

      17/06 11:28:13,425 WARNING [139830133532416] (backend-v4l2.cpp:883) Frames didn't arrived within 5 seconds

      17/06 11:28:13,426 WARNING [139830102607616] (backend-v4l2.cpp:883) Frames didn't arrived within 5 seconds

      [camera/realsense2_camera_manager-1] process has died [pid 21378, exit code -11, cmd /opt/ros/kinetic/lib/nodelet/nodelet manager __name:=realsense2_camera_manager __log:=/home/g/.ros/log/8b3bf5cc-7256-11e8-9c82-000c2931041e/camera-realsense2_camera_manager-1.log].

      log file: /home/g/.ros/log/8b3bf5cc-7256-11e8-9c82-000c2931041e/camera-realsense2_camera_manager-1*.log

      [camera/realsense2_camera-2] process has finished cleanly

      log file: /home/g/.ros/log/8b3bf5cc-7256-11e8-9c82-000c2931041e/camera-realsense2_camera-2*.log

      all processes on machine have died, roslaunch will exit

      shutting down processing monitor...

      ... shutting down processing monitor complete

      done

       

      At this point if I try and run any of the SDK examples e.g. rs-depth I get the following:

      There are 1 connected RealSense devices.

       

       

      Using device 0, an Intel RealSense D415

          Serial number: 810512061779

          Firmware version: 05.09.11.00

       

       

      rs_error was raised when calling rs2_pipeline_wait_for_frames(pipe:0x80d3b0):

          Frame didn't arrived within 5000

      Segmentation fault (core dumped)

       

      Does anyone have an idea of what might be going on?