IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.51k stars 1.74k forks source link

Realsense Image Turns White #2391

Closed dverstandig closed 2 years ago

dverstandig commented 2 years ago

Hello,

I am using a Realsense D455 and I am having issues when bringing up the Realsense camera through ROS.

Every so often, the ROS image will look like this:

white_image

We have a perception stack running using the Realsense ROSimage, so having this white image is pretty problematic. The resolution so far has been to re-launch the camera until this issue goes away, but we would like a more permanent fix.

The camera is running on an Nvidia Jetson Xavier NX with RealSense ROS v2.3.2 and LibRealSense v2.50.0.

I've also attached a copy of the logs when running the bring up: realsense_bringup.txt

Any help resolving this issue would be greatly appreciated!

Thanks, Dylan

MartyG-RealSense commented 2 years ago

Hi @dverstandig Is your D455 camera being used outdoors where it may be exposed to strong sunlight? If it is then the recent D455 case at https://github.com/IntelRealSense/librealsense/issues/10534 should be a useful reference to begin the investigation of your issue with.

That particular case was resolved by adding a filter product over the lenses on the outside of the camera, as described at https://github.com/IntelRealSense/librealsense/issues/10534#issuecomment-1161414848

dverstandig commented 2 years ago

Hi,

Thanks for the quick reply! We are not using this outdoor. There are some lights that illuminate the room, but no more than a regular well-lit room.

Using a filter is certainly an option, but would like to see if there are other reasons for this issue that could be causing this in a indoor environment.

MartyG-RealSense commented 2 years ago

There have been a small number of cases - such as https://github.com/IntelRealSense/librealsense/issues/8880 - where the infrared image has periodically had a problem that randomly occurred indoors. In that particular case they concluded that use of USB cables other than the official 1 meter cable supplied with the camera was likely the cause of their problem.

A couple of other past suspected causes in indoor cases were sunlight being reflected into the path of the camera by a glass office door opening, and the camera being in dimly lit conditions until an office staff member switched the light on and flooded the room suddenly with brightness.

dverstandig commented 2 years ago

Hi,

We've had this happen on numerous cameras in several different environments. We are currently using the default USB cable provided by Realsense.

We've had some environments that had access to sunlight, but the latest test had no access to sunlight, only light provided by indoor lighting.

MartyG-RealSense commented 2 years ago

Are you using fluorescent lighting such as ceiling strip lights in your office? These can cause interference with RealSense images because they contain a heated gas that flickers at frequencies that are difficult to see with the human eye.

If you do have such lights then you can test whether they are a disruptive influence by changing an RGB setting called power line frequency to match the operating frequency of the lights in your particular location. In North America regions this frequency is typically 60 Hz, whilst in European regions it is typically 50 Hz.

In ROS the controlling parameter is /camera/rgb_camera/power_line_frequency with values '0' for Disabled, '1' for 50Hz and '2' for 60Hz.

dverstandig commented 2 years ago

Thanks for the reply, seems like this is exactly what is happening.

I am trying to find the rosparam /camera/rgb_camera/power_line_frequency, but I dont see it anywhere. rosparam list does not return a 'power_line_frequency' and dynamic recofnigre does not show this as an option: image

Could you help me locate this param? I also dont see it referenced anywhere in the code.

Also, I am using nodelet.launch.xml to launch the camera

Thanks, Dylan

MartyG-RealSense commented 2 years ago

In your log, just before launch completes it says that it is removing the power_line_frequency option from rqt_reconfigure (also known as dynamic reconfigure), making it presumably inaccessible in the rqt_reconfigure interface during runtime after launch. This message occurs quite commonly in roslaunch logs, so does not necessarily mean that there is a problem with the launch.

image

dverstandig commented 2 years ago

Thanks!

I was able to set the value to 2 (60Hz), but after a few launches I had the same issue of the image turning white. I doubled checked and the value is set to 60Hz in dynamic reconfigure:

image

I also tried to edit the powerline frequency in dynamic reconfigure, and none of the options (Disabled, 50Hz, 60Hz) returned the image to its correct exposure level.

MartyG-RealSense commented 2 years ago

What is the temperature of the camera when the issue occurs? In the RealSense ROS wrapper you can monitor internal camera temperatures in the /diagnostics topic.

If the ASIC temperature is exceeding 42 degrees C when the problem occurs then this could suggest that image problems are being caused by an excessive internal temperature event inside the camera. If the camera is disconnected then temperature may fall back to a lower level and then the excessive temperature of > 42 degrees C may return at some point after the camera is reconnected as temperature increases above the critical 'tipping point' again.

dverstandig commented 2 years ago

Hi,

It seems like the temperature is ok, looking at /diagnostics when the image turns white, the value looks to be 35 degrees C

---
header:
  seq: 1136
  stamp:
    secs: 1656095516
    nsecs: 972740476
  frame_id: ''
status:
  -
    level: 0
    name: "camera/front/realsense2_camera_manager: Asic Temperature"
    message: "OK"
    hardware_id: "105322250472"
    values:
      -
        key: "Index"
        value: "35"
MartyG-RealSense commented 2 years ago

I note that you have auto-exposure enabled in the rgb_camera settings in the above rqt_reconfigure diagram. If the indoor location that the camera is used in has a constant lighting level, would it be possible to try disabling RGB auto-exposure to see whether it prevents the image from turning white?

MartyG-RealSense commented 2 years ago

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

dverstandig commented 2 years ago

Hi,

Thanks for getting back to me. Disabling the auto exposure mitigates the issue for now, but we have some environments where the lighting conditions are not constant.

For now, I think we can close this issue, and when the time comes, I can open a new issue if required.

Thank you for the help troubleshooting!

MartyG-RealSense commented 2 years ago

You are very welcome. Thanks very much for the update!