Skip to content
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

Realsense d435i is not detected on docker #10829

Closed
goyalvarun02 opened this issue Aug 26, 2022 · 33 comments
Closed

Realsense d435i is not detected on docker #10829

goyalvarun02 opened this issue Aug 26, 2022 · 33 comments

Comments

@goyalvarun02
Copy link

I am using Ubuntu 22.04 host machine and created a VM of ubuntu 18.04 to use Melodic version of ROS with Realsense camera.

But I am using docker on VM (ubuntu 18.04) , and when I tried to run
roslaunch realsense2_camera rs_camera.launch

I got an error :
"Failed to set power state" as shown in pic

I am new to librealsense please advise
WhatsApp Image 2022-08-26 at 1 38 32 PM

@goyalvarun02
Copy link
Author

WhatsApp Image 2022-08-26 at 2 06 30 PM
Copied the rules as well.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 26, 2022

Hi @goyalvarun02 Is the camera detected if you add initial_reset:=true to your roslaunch instruction to reset the camera at launch, please? For example:

roslaunch realsense2_camera rs_camera.launch initial_reset:=true

in regard to the rs-enumate-devices command that you attempted, the command (which should be input into the Ubuntu terminal) is:

rs-enumerate-devices

@goyalvarun02
Copy link
Author

goyalvarun02 commented Aug 26, 2022

Hi @MartyG-RealSense ,

PFA image of the output after running , device not found
roslaunch realsense2_camera rs_camera.launch initial_reset:=true
WhatsApp Image 2022-08-26 at 3 00 45 PM
WhatsApp Image 2022-08-26 at 3 00 40 PM

Pls advice

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 26, 2022

Can you confirm please that you used initial_reset, as your log image shows initial-reest (with a - instead of the underline _ )

@goyalvarun02
Copy link
Author

Hi @MartyG-RealSense I

I am really sorry for typo error .
PFA logs

WhatsApp Image 2022-08-26 at 3 20 06 PM

WhatsApp Image 2022-08-26 at 3 20 16 PM

@MartyG-RealSense
Copy link
Collaborator

No problem at all :) Which method did you use to install the librealsense SDK and the RealSense ROS wrapper? Did you install them separately (the SDK first and the wrapper second) or install them both at the same time from packages with the Method 1 instructions in the ROS wrapper?

@goyalvarun02
Copy link
Author

I first installed ROS-Melodic and then use command
sudo apt-get install ros-$ROS_DISTRO-realsense2-camera
sudo apt-get install ros-$ROS_DISTRO-realsense2-description

thereafter created a catkin_ws with clone of repository of xarm_ros and realsense . Compiled the realsense in Catkin_src and install.

@MartyG-RealSense
Copy link
Collaborator

Using sudo apt-get install ros-$ROS_DISTRO-realsense2-camera is fine. This will install both the librealsense SDK and the ROS wrapper from packages.

You will not likely need to install realsense2-description unless you are performing ROS robot simulations such as Gazebo.

Creating a catkin_ws with a clone of RealSense sounds as though it has the potential to cause a conflict with the package installation that you made before taking that step. If you have installed from packages then you should not then need to install from source with cloning.

@goyalvarun02
Copy link
Author

goyalvarun02 commented Aug 26, 2022

Okay So I can remove the realsense-ros repo , recompiled .

I tried that too, still getting an error
WhatsApp Image 2022-08-26 at 3 51 41 PM
WhatsApp Image 2022-08-26 at 3 51 55 PM

@MartyG-RealSense
Copy link
Collaborator

Does the error still occur if you delete the entire catkin_ws/src folder?

@goyalvarun02
Copy link
Author

I can not delete the entire SRC folder but have deleted the build and devel folder to clean recompiled. But still error occurred.

@MartyG-RealSense
Copy link
Collaborator

My recollection is that it is advised that only RealSense files should be installed in the catkin_ws workspace and not non-RealSense files.

Is the camera able to be detected if you run the realsense-viewer tool in the Ubuntu terminal?

@goyalvarun02
Copy link
Author

For other setup I have kept the non-Realsense files as well in catkin_ws it was working fine .

I did not find the command realsense-viewer in ubuntu ? Do I need to install anything for it.

@MartyG-RealSense
Copy link
Collaborator

I'm not certain whether the realsense-viewer tool is included in a librealsense build created with the ROS wrapper's apt-get installation instructions.

What details are listed if you do rs-enumerate-devices

@goyalvarun02
Copy link
Author

rs-enumerate-devices command not found .

I am trying to install in docker but still looking for it to install.

@MartyG-RealSense
Copy link
Collaborator

Which VM tool are you using, please? Intel recommend VMWare Workstation Player (and not Oracle VrtualBox) because it provides proper emulation of the USB 3 controller.

@goyalvarun02
Copy link
Author

goyalvarun02 commented Aug 26, 2022

I am using oracle VM and also done the enabling of Virtualization and USB 3 in Bios setting .

I have created a new catkin_ws as well , and still facing the same issue .

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 26, 2022

My knowledge of Docker setups is admittedly limited. Also, Ubuntu 22.04 is not yet officially supported by librealsense - there is an unofficial test installation at #10439 (comment) - though my understanding is that the host machine's Ubuntu version should not affect the librealsense build on the VM's Ubuntu that us using 18.04. I am also not familiar with xarm_ros.

What details are shown if you input lsusb in the Ubuntu terminal? lsusb is an Ubuntu tool rather than a RealSense one and so should work no matter what problems a RealSense installation has.

@goyalvarun02
Copy link
Author

Hi @MartyG-RealSense ,

When I do lsusb in host machine/ VM /Docker it shows intel real-sense is detected and USB 007 is used for it.

I am struggling and could not find the root cause of this issue .
Please advice.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 29, 2022

I went through the case again carefully from the beginning but did not find a clear possibility for the cause of the problem, aside from perhaps the USB port supplying insufficient power to the camera for it to do more than be detected by lsusb; or the Oracle VM not being able to process the camera's USB 3 connection despite the enabling of virtualization and USB 3 in the BIOS.

The typical diagnosis process for a Failed to set power state error in the RealSense ROS wrapper would involve first confirming whether the camera can work successfully with a librealsense program such as the RealSense Viewer or one of the librealsense example programs and tools (such as rs-enumerate-devices)

@goyalvarun02
Copy link
Author

goyalvarun02 commented Aug 30, 2022

Hi @MartyG-RealSense

I observed following things:

  1. When I run the cheese app in ubuntu , camera is able to show Videos (and does not on some machine I observed random behavior) .
  2. However, when I run the command in docker
    roslaunch realsense2_camera rs_camera.launch initial_reset:=true
    I observed the power error (as shown in pic) . But I can still see the output of "lsusb" in docker and can see device is identified .

PFA image
WhatsApp Image 2022-08-30 at 2 06 04 PM

You can let me know how to check with realsense-viewer and rs-enumerate-devices as I did not find the direct command to use .
Seeking your help to fix this issue

@goyalvarun02
Copy link
Author

goyalvarun02 commented Aug 30, 2022

Hi @MartyG-RealSense
I observed weird behavior , first (once I observed) it detect the camera later on it says disconnected (without doing anything)

PFA full logs as well .

root@ubuntu-22:/# roslaunch realsense2_camera rs_camera.launch
bash: roslaunch: command not found
root@ubuntu-22:/# source catkin_ws/devel/setup.bash
root@ubuntu-22:/# rs-enumerate-devices
bash: rs-enumerate-devices: command not found
root@ubuntu-22:/# roslaunch realsense2_camera rs_camera.launch
... logging to /root/.ros/log/8d092cf0-283a-11ed-a696-6cb3115d58d8/roslaunch-ubuntu-22-75.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://ubuntu-22:44361/

SUMMARY

PARAMETERS

  • /camera/realsense2_camera/accel_fps: -1
  • /camera/realsense2_camera/accel_frame_id: camera_accel_frame
  • /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...
  • /camera/realsense2_camera/align_depth: False
  • /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/allow_no_texture_points: False
  • /camera/realsense2_camera/base_frame_id: camera_link
  • /camera/realsense2_camera/calib_odom_file:
  • /camera/realsense2_camera/clip_distance: -2.0
  • /camera/realsense2_camera/color_fps: -1
  • /camera/realsense2_camera/color_frame_id: camera_color_frame
  • /camera/realsense2_camera/color_height: -1
  • /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
  • /camera/realsense2_camera/color_width: -1
  • /camera/realsense2_camera/confidence_fps: -1
  • /camera/realsense2_camera/confidence_height: -1
  • /camera/realsense2_camera/confidence_width: -1
  • /camera/realsense2_camera/depth_fps: -1
  • /camera/realsense2_camera/depth_frame_id: camera_depth_frame
  • /camera/realsense2_camera/depth_height: -1
  • /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
  • /camera/realsense2_camera/depth_width: -1
  • /camera/realsense2_camera/device_type:
  • /camera/realsense2_camera/enable_accel: False
  • /camera/realsense2_camera/enable_color: True
  • /camera/realsense2_camera/enable_confidence: True
  • /camera/realsense2_camera/enable_depth: True
  • /camera/realsense2_camera/enable_fisheye1: False /camera/realsense2_camera/enable_fisheye2: False
  • /camera/realsense2_camera/enable_fisheye: False
  • /camera/realsense2_camera/enable_gyro: False
  • /camera/realsense2_camera/enable_infra1: False
  • /camera/realsense2_camera/enable_infra2: False
  • /camera/realsense2_camera/enable_infra: False
  • /camera/realsense2_camera/enable_pointcloud: False
  • /camera/realsense2_camera/enable_pose: False
  • /camera/realsense2_camera/enable_sync: False
  • /camera/realsense2_camera/filters:
  • /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f...
  • /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o...
  • /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f...
  • /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o...
  • /camera/realsense2_camera/fisheye_fps: -1
  • /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
  • /camera/realsense2_camera/fisheye_height: -1
  • /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
  • /camera/realsense2_camera/fisheye_width: -1
  • /camera/realsense2_camera/gyro_fps: -1
  • /camera/realsense2_camera/gyro_frame_id: camera_gyro_frame
  • /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...
  • /camera/realsense2_camera/imu_optical_frame_id: camera_imu_optica...
  • /camera/realsense2_camera/infra1_frame_id: camera_infra1_frame
  • /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...
  • /camera/realsense2_camera/infra2_frame_id: camera_infra2_frame
  • /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...
  • /camera/realsense2_camera/infra_fps: 30
  • /camera/realsense2_camera/infra_height: 480
  • /camera/realsense2_camera/infra_rgb: False
  • /camera/realsense2_camera/infra_width: 848
  • /camera/realsense2_camera/initial_reset: False
  • /camera/realsense2_camera/json_file_path:
  • /camera/realsense2_camera/linear_accel_cov: 0.01
  • /camera/realsense2_camera/odom_frame_id: camera_odom_frame
  • /camera/realsense2_camera/ordered_pc: False
    .
    .
    .
    .
    .
    NODES
    /camera/
    realsense2_camera (nodelet/nodelet)
    realsense2_camera_manager (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [85]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 8d092cf0-283a-11ed-a696-6cb3115d58d8
process[rosout-1]: started with pid [96]
started core service [/rosout]
process[camera/realsense2_camera_manager-2]: started with pid [103]
[ INFO] [1661846747.775916405]: Initializing nodelet with 8 worker threads.
process[camera/realsense2_camera-3]: started with pid [104]
[ INFO] [1661846748.198984688]: RealSense ROS v2.3.2
[ INFO] [1661846748.199019381]: Built with LibRealSense v2.50.0
[ INFO] [1661846748.199032094]: Running with LibRealSense v2.50.0
[ INFO] [1661846748.231159698]:
[ INFO] [1661846748.421494474]: Device with serial number 817512070833 was found.

[ INFO] [1661846748.421541872]: Device with physical ID 2-1.4-107 was found.
[ INFO] [1661846748.421573016]: Device with name Intel RealSense D435 was found.
[ INFO] [1661846748.421971131]: Device with port number 2-1.4 was found.
[ INFO] [1661846748.421991746]: Device USB type: 2.1
[ WARN] [1661846748.422006549]: Device 817512070833 is connected using a 2.1 port. Reduced performance is expected.
[ INFO] [1661846748.423229800]: getParameters...
[ INFO] [1661846748.455955196]: setupDevice...
[ INFO] [1661846748.455989406]: JSON file is not provided
[ INFO] [1661846748.456004793]: ROS Node Namespace: camera
[ INFO] [1661846748.456025480]: Device Name: Intel RealSense D435
[ INFO] [1661846748.456046997]: Device Serial No: 817512070833
[ INFO] [1661846748.456077030]: Device physical port: 2-1.4-107
[ INFO] [1661846748.456097698]: Device FW version: 05.11.06.250
[ INFO] [1661846748.456121013]: Device Product ID: 0x0B07
[ INFO] [1661846748.456141808]: Enable PointCloud: Off
[ INFO] [1661846748.456176213]: Align Depth: Off
[ INFO] [1661846748.456196936]: Sync Mode: Off
[ INFO] [1661846748.456284924]: Device Sensors:
[ INFO] [1661846748.544880613]: Stereo Module was found.
[ INFO] [1661846748.554285931]: RGB Camera was found.
[ INFO] [1661846748.554368544]: (Confidence, 0) sensor isn't supported by current device! -- Skipping...
[ INFO] [1661846748.554431578]: num_filters: 0
[ INFO] [1661846748.554456386]: Setting Dynamic reconfig parameters.
[ INFO] [1661846751.114204130]: Done Setting Dynamic reconfig parameters.
[ INFO] [1661846751.114575690]: depth stream is enabled - width: 640, height: 480, fps: 15, Format: Z16
[ INFO] [1661846751.114882783]: color stream is enabled - width: 640, height: 480, fps: 15, Format: RGB8
[ INFO] [1661846751.114909376]: setupPublishers...
[ INFO] [1661846751.116791229]: Expected frequency for depth = 15.00000
[ INFO] [1661846751.137748406]: Expected frequency for color = 15.00000
[ INFO] [1661846751.153151322]: setupStreams...
[ INFO] [1661846751.389904480]: SELECTED BASE:Depth, 0
[ INFO] [1661846751.397255127]: RealSense Node Is Up!
[ WARN] [1661846754.893722186]:
30/08 08:05:54,894 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/08 08:05:54,945 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/08 08:05:54,995 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[ WARN] [1661846755.116401657]: Hardware Notification:RT IC2 Config error,1.66185e+12,Error,Hardware Error
[ERROR] [1661846755.116502274]: Performing Hardware Reset.
30/08 08:05:55,456 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/08 08:05:55,507 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/08 08:05:55,558 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/08 08:05:55,608 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/08 08:05:55,663 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/08 08:05:55,717 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/08 08:05:55,771 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[ERROR] [1661846755.825201573]: usb device disconnected
30/08 08:05:55,824 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No such device, number: 19
30/08 08:05:55,824 WARNING [140408359823104] (messenger-libusb.cpp:92) usb_request_queue returned error, endpoint: 132 error: No such device, number: 19
30/08 08:05:55,824 ERROR [140408359823104] (uvc-streamer.cpp:138) failed to submit UVC request, error: -13
30/08 08:05:55,824 WARNING [140408359823104] (messenger-libusb.cpp:92) usb_request_queue returned error, endpoint: 132 error: No such device, number: 19
30/08 08:05:55,824 ERROR [140408359823104] (uvc-streamer.cpp:138) failed to submit UVC request, error: -13
30/08 08:05:55,825 WARNING [140408330315520] (messenger-libusb.cpp:92) usb_request_queue returned error, endpoint: 130 error: No such device, number: 19
30/08 08:05:55,825 ERROR [140408330315520] (uvc-streamer.cpp:138) failed to submit UVC request, error: -13
30/08 08:05:55,825 WARNING [140409094887168] (messenger-libusb.cpp:92) usb_request_queue returned error, endpoint: 135 error: No such device, number: 19
30/08 08:05:55,825 WARNING [140408330315520] (messenger-libusb.cpp:92) usb_request_queue returned error, endpoint: 130 error: No such device, number: 19
30/08 08:05:55,825 ERROR [140408330315520] (uvc-streamer.cpp:138) failed to submit UVC request, error: -13
30/08 08:05:55,825 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No such device, number: 19
30/08 08:05:55,825 ERROR [140409111672576] (global_timestamp_reader.cpp:239) Error during time_diff_keeper polling: usb device disconnected
30/08 08:05:56,117 WARNING [140409094887168] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No such device, number: 19
30/08 08:05:56,117 ERROR [140408722028288] (error-handling.cpp:78) Error during polling error handler: usb device disconnected
[ERROR] [1661846756.305238686]: The device has been disconnected!
30/08 08:05:56,310 WARNING [140408330315520] (messenger-libusb.cpp:30) reset_endpoint returned error, index: 82, error: No such device, number: 13
30/08 08:05:56,332 WARNING [140408359823104] (messenger-libusb.cpp:30) reset_endpoint returned error, index: 84, error: No such device, number: 13
[ERROR] [1661846756.384666876]: Exception: failed to set power state
30/08 08:05:56,384 ERROR [140409094887168] (handle-libusb.h:51) failed to open usb interface: 0, error: RS2_USB_STATUS_NO_DEVICE
30/08 08:05:56,384 ERROR [140409145243392] (sensor.cpp:572) acquire_power failed: failed to set power state
30/08 08:05:57,117 ERROR [140409094887168] (handle-libusb.h:51) failed to open usb interface: 0, error: RS2_USB_STATUS_NO_DEVICE
30/08 08:05:57,117 ERROR [140408722028288] (sensor.cpp:572) acquire_power failed: failed to set power state
30/08 08:05:57,117 ERROR [140408722028288] (error-handling.cpp:78) Error during polling error handler: failed to set power state
[ INFO] [1661846757.411754108]:
[ WARN] [1661846757.432889050]: Device 1/1 failed with exception: failed to set power state
[ERROR] [1661846757.432932887]: The requested device with is NOT found. Will Try again.
30/08 08:05:57,432 ERROR [140408688457472] (handle-libusb.h:51) failed to open usb interface: 0, error: RS2_USB_STATUS_NO_DEVICE
30/08 08:05:57,432 ERROR [140408696850176] (sensor.cpp:572) acquire_power failed: failed to set power state
30/08 08:05:57,432 WARNING [140408696850176] (rs.cpp:310) null pointer passed for argument "device"
[ INFO] [1661846763.449497048]:
[ WARN] [1661846763.471534913]: Device 1/1 failed with exception: failed to set power state
[ERROR] [1661846763.471605264]: The requested device with is NOT found. Will Try again.
30/08 08:06:03,470 ERROR [140409103279872] (handle-libusb.h:51) failed to open usb interface: 0, error: RS2_USB_STATUS_NO_DEVICE
30/08 08:06:03,470 ERROR [140408696850176] (sensor.cpp:572) acquire_power failed: failed to set power state
30/08 08:06:03,471 WARNING [140408696850176] (rs.cpp:310) null pointer passed for argument "device"
[ INFO] [1661846769.499388386]:
[ WARN] [1661846769.521889680]: Device 1/1 failed with exception: failed to set power state
[ERROR] [1661846769.521929676]: The requested device with is NOT found. Will Try again.
30/08 08:06:09,521 ERROR [140409120065280] (handle-libusb.h:51) failed to open usb interface: 0, error: RS2_USB_STATUS_NO_DEVICE
30/08 08:06:09,521 ERROR [140408696850176] (sensor.cpp:572) acquire_power failed: failed to set power state
30/08 08:06:09,521 WARNING [140408696850176] (rs.cpp:310) null pointer passed for argument "device"
[ INFO] [1661846775.549624325]:
[ WARN] [1661846775.576715590]: Device 1/1 failed with exception: failed to set power state
[ERROR] [1661846775.576776596]: The requested device with is NOT found. Will Try again.
30/08 08:06:15,575 ERROR [140408688457472] (handle-libusb.h:51) failed to open usb interface: 0, error: RS2_USB_STATUS_NO_DEVICE
30/08 08:06:15,575 ERROR [140408696850176] (sensor.cpp:572) acquire_power failed: failed to set power state
30/08 08:06:15,576 WARNING [140408696850176] (rs.cpp:310) null pointer passed for argument "device"
[ INFO] [1661846781.604508143]:
[ WARN] [1661846781.633985287]: Device 1/1 failed with exception: failed to set power state
[ERROR] [1661846781.634049163]: The requested device with is NOT found. Will Try again.
30/08 08:06:21,633 ERROR [140409103279872] (handle-libusb.h:51) failed to open usb interface: 0, error: RS2_USB_STATUS_NO_DEVICE
30/08 08:06:21,633 ERROR [140408696850176] (sensor.cpp:572) acquire_power failed: failed to set power state
30/08 08:06:21,633 WARNING [140408696850176] (rs.cpp:310) null pointer passed for argument "device"
[ INFO] [1661846787.661767565]:
[ WARN] [1661846787.688535543]: Device 1/1 failed with exception: failed to set power state
[ERROR] [1661846787.688601885]: The requested device with is NOT found. Will Try again.
30/08 08:06:27,687 ERROR [140409120065280] (handle-libusb.h:51) failed to open usb interface: 0, error: RS2_USB_STATUS_NO_DEVICE
30/08 08:06:27,687 ERROR [140408696850176] (sensor.cpp:572) acquire_power failed: failed to set power state
30/08 08:06:27,688 WARNING [140408696850176] (rs.cpp:310) null pointer passed for argument "device"
^C[camera/realsense2_camera-3] killing on exit
[camera/realsense2_camera_manager-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
root@ubuntu-22:/#

.
.
.

@MartyG-RealSense
Copy link
Collaborator

Are pre-built executable versions of RealSense examples and tools such as rs-enumerate-devices and realsense-viewer present in the usr/local/bin folder of Ubuntu 18.04 after you installed the SDK and wrapper from packages with sudo apt-get install ros-$ROS_DISTRO-realsense2-camera please?

Launch commands for these examples and tools should be input into the Ubuntu terminal and not the ROS terminal.

As the roslaunch proceeds normally with the camera detected up until the RealSense Node is Up! message and then is no longer detected, it does again suggest a power related issue (the camera disconnecting as the power demands of the camera increase as the streams start publishing). Because you can output RGB from cheese, this suggests that the depth stream might be the cause of the Failed to set power state warnings.

Does it still disconnect if you add enable_depth:=false to your launch instruction so that it only publishes color?

@goyalvarun02
Copy link
Author

goyalvarun02 commented Aug 31, 2022

Hi @MartyG-RealSense

  1. I have checked /usr/local/bin folder for both working realsense2-camera setup (assume setup 1, where command works fine) and non working realsense-camera(assume setup 2, where command is not found). I observed in both rs-enumerate -device and realsense-viewer is not present.

Setup1 :
Realsense_1

Setup 2:
WhatsApp Image 2022-08-31 at 10 20 11 AM

  1. I run the roslaunch with enable_Depth:=false and output is same as earlier:
    WhatsApp Image 2022-08-31 at 10 24 44 AM
    WhatsApp Image 2022-08-31 at 10 24 57 AM

I have observed from cheese while RGB output If some movement happen it can seen in video , while using depth camera no movement can seen (or it stuck/hung ).

@MartyG-RealSense
Copy link
Collaborator

Let's try installing from packages only the examples and tools, not the librealsrnse SDK (which is already installed)

  1. Register the server's public key

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE

  1. Add the server to the list of repositories:

sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u

  1. Install only the examples and tools

sudo apt-get install librealsense2-utils

@goyalvarun02
Copy link
Author

Hi @MartyG-RealSense .

Here is the output of commands:

  1. Output of rs-enumerate-devices
    31/08 05:47:13,551 ERROR [139729328211648] (librealsense-exception.h:52) Cannot identify '/dev/video14 Last Error: No such file or directory
    31/08 05:47:13,568 ERROR [139729328211648] (librealsense-exception.h:52) Cannot identify '/dev/video14 Last Error: No such file or directory
    31/08 05:47:13,574 ERROR [139729328211648] (librealsense-exception.h:52) Cannot identify '/dev/video14 Last Error: No such file or directory
    31/08 05:47:13,579 ERROR [139729328211648] (librealsense-exception.h:52) Cannot identify '/dev/video14 Last Error: No such file or directory
    31/08 05:47:13,591 ERROR [139729328211648] (librealsense-exception.h:52) Cannot identify '/dev/video14 Last Error: No such file or directory
    Device info:
    Name : Intel RealSense D435
    Serial Number : 817512070833
    Firmware Version : 05.11.06.250
    Recommended Firmware Version : 05.13.00.50
    Physical Port : /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/video4linux/video0
    Debug Op Code : 15
    Advanced Mode : YES
    Product Id : 0B07
    Camera Locked : YES
    Usb Type Descriptor : 2.1
    Product Line : D400
    Asic Serial Number : 814113021595
    Firmware Update Id : 814113021595

Stream Profiles supported by Stereo Module
Supported modes:
stream resolution fps format
Infrared 1 1280x720 @ 6Hz Y8
Infrared 1 640x480 @ 30Hz Y8
Infrared 1 640x480 @ 15Hz Y8
Infrared 1 640x480 @ 6Hz Y8
Infrared 1 480x270 @ 60Hz Y8
Infrared 1 480x270 @ 30Hz Y8
Infrared 1 480x270 @ 15Hz Y8
Infrared 1 480x270 @ 6Hz Y8
Depth 1280x720 @ 6Hz Z16
Depth 640x480 @ 30Hz Z16
Depth 640x480 @ 15Hz Z16
Depth 640x480 @ 6Hz Z16
Depth 480x270 @ 60Hz Z16
Depth 480x270 @ 30Hz Z16
Depth 480x270 @ 15Hz Z16
Depth 480x270 @ 6Hz Z16

Stream Profiles supported by RGB Camera
Supported modes:
stream resolution fps format
Color 1280x720 @ 6Hz RGB8
Color 1280x720 @ 6Hz Y16
Color 1280x720 @ 6Hz BGRA8
Color 1280x720 @ 6Hz RGBA8
Color 1280x720 @ 6Hz BGR8
Color 1280x720 @ 6Hz YUYV
Color 640x480 @ 30Hz RGB8
Color 640x480 @ 30Hz Y16
Color 640x480 @ 30Hz BGRA8
Color 640x480 @ 30Hz RGBA8
Color 640x480 @ 30Hz BGR8
Color 640x480 @ 30Hz YUYV
Color 640x480 @ 15Hz RGB8
Color 640x480 @ 15Hz Y16
Color 640x480 @ 15Hz BGRA8
Color 640x480 @ 15Hz RGBA8
Color 640x480 @ 15Hz BGR8
Color 640x480 @ 15Hz YUYV
Color 640x480 @ 6Hz RGB8
Color 640x480 @ 6Hz Y16
Color 640x480 @ 6Hz BGRA8
Color 640x480 @ 6Hz RGBA8
Color 640x480 @ 6Hz BGR8
Color 640x480 @ 6Hz YUYV
Color 424x240 @ 60Hz RGB8
Color 424x240 @ 60Hz Y16
Color 424x240 @ 60Hz BGRA8
Color 424x240 @ 60Hz RGBA8
Color 424x240 @ 60Hz BGR8
Color 424x240 @ 60Hz YUYV
Color 424x240 @ 30Hz RGB8
Color 424x240 @ 30Hz Y16
Color 424x240 @ 30Hz BGRA8
Color 424x240 @ 30Hz RGBA8
Color 424x240 @ 30Hz BGR8
Color 424x240 @ 30Hz YUYV
Color 424x240 @ 15Hz RGB8
Color 424x240 @ 15Hz Y16
Color 424x240 @ 15Hz BGRA8
Color 424x240 @ 15Hz RGBA8
Color 424x240 @ 15Hz BGR8
Color 424x240 @ 15Hz YUYV
Color 424x240 @ 6Hz RGB8
Color 424x240 @ 6Hz Y16
Color 424x240 @ 6Hz BGRA8
Color 424x240 @ 6Hz RGBA8
Color 424x240 @ 6Hz BGR8
Color 424x240 @ 6Hz YUYV

  1. realsense-viewer
    WhatsApp Image 2022-08-31 at 1 48 53 PM

WhatsApp Image 2022-08-31 at 1 48 52 PM

Output of roslaunch command is still same :-(

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 31, 2022

It is good that realsense-viewer is working for you now. Your image of it highlights a couple of issues though.

  1. Your currently installed camera firmware driver version is shown as 5.11.6.250. This is severely out of date as it was first released in June 2019 and there have been 21 newer firmware versions released since then.

The recommended firmware version for use with SDK 2.51.0 is 5.13.0.50 and so I would strongly recommend updating your camera's firmware.

  1. The red warning Multiple realsense udev-rules were found! indicates that you have more than one version of the udev Ubuntu device handling rules installed on your computer, which can cause conflicts.

You can correct this easily by going to the location below on your computer and deleting the udev rule there, and then the error should disappear.

/etc/udev/rules.d/99-realsense-libusb.rules

@goyalvarun02
Copy link
Author

goyalvarun02 commented Sep 1, 2022

Hi @MartyG-RealSense

I have deleted the rules from /etc/udev/rules.d/99* and updated the firmware.
But after firmware update no device found :-(

After firmware update when I observed error , I reconnect the camera again it says need to update firmware , Why so ? May I know the reason If I have update firmware once it should be persistent.

I have used the method check update and install. i was trying to update firmware using "More" -> update firnware as well but there I could not find any signed image in bin :-( . I dont know whether firmware update earlier has been completed or not .

PFA images for your reference (output of lsusb, rs-enumerate device after firmware updates)
WhatsApp Image 2022-09-01 at 10 43 54 AM (1)
(
WhatsApp Image 2022-09-01 at 10 43 54 AM
)
WhatsApp Image 2022-09-01 at 10 43 53 AM

WhatsApp Image 2022-09-01 at 10 43 55 AM (2)
WhatsApp Image 2022-09-01 at 10 43 55 AM (1)
WhatsApp Image 2022-09-01 at 10 43 55 AM

@MartyG-RealSense
Copy link
Collaborator

When using the Update Firmware option in the Viewer, a firmware bin file should first be downloaded to your computer from the list at the link below. The most recent firmware at the time of writing this, 5.13.0.50, is at the top of the list.

Once the bin file is downloaded then when the Update Firmware option is selected, navigate the file selector pop-up window to the file at the computer location that it was downloaded to and select the file. The firmware update should then begin automatically.

https://dev.intelrealsense.com/docs/firmware-releases#d400-series-firmware-downloads

image

It is recommendable that the firmware update is performed using the official 1 meter long USB cable supplied with the camera if possible.

Your kindly provided images indicate to me that a firmware update commenced and reached the 30% point. At this point, the camera resets itself, disconnects for a moment and then is re-detected and continues the firmware installation process. In a small number of cases though, the camera may not be detected again after the reset at the 30% point and the firmware update fails.

Are you performing the firmware update outside of Docker, please?

Because the firmware is stored inside the camera hardware instead of on the computer, it is possible to perform the update on another computer if you have one available and then take the camera back to the original computer with the updated firmware inside it.

@MartyG-RealSense
Copy link
Collaborator

Hi @goyalvarun02 Do you require further assistance with this case, please? Thanks!

@goyalvarun02
Copy link
Author

Hi @MartyG-RealSense ,

After upgrading to latest FW , it works and I did not observer " Power state failure error" .

Thanks for help.

@MartyG-RealSense
Copy link
Collaborator

That's great to hear, @goyalvarun02 - thanks very much for the update!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to solution achieved and no further comments received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants