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

L515 Camera point_cloud and aligned_depth map frames drop (No stream match for pointcloud chosen texture Process - Color) #11530

Closed
julienfal opened this issue Mar 6, 2023 · 19 comments

Comments

@julienfal
Copy link

julienfal commented Mar 6, 2023

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model { L515}
Firmware Version (1.01.05.08.01)
Operating System & Version { Linux (Ubuntu 18.04)
Kernel Version (Linux Only) (4.15.0)
Platform PC
SDK Version { 2.53.1}
Language {python }
Segment {Robot}

Issue Description

I'm using the L515 realsense camera for recording into a rosbog the RGB images (topic: /camera/color/image_raw) with the associated point cloud(/camera/depth/color/points) or aligned depth map (Camera/aligned_depth_to_color/image_raw).
It works well but during a record of 1 min there is a kind of "Frame drop" and if the record is longer we got multiples frames drop approximately one per minutes.

First problem: When we are recording the pointcloud at first everything goes well, but at a random moment we got the message: No stream match for pointcloud chosen texture Process - Color and that cause like a 10 frames drop for the point cloud that means that for 10 rgb frames we don't have any point cloud that are taken.

Second problem but maybe related to the first one: When we record using the arg align_depth:= true we got the same problem but the only things that change is that we don't have any warning message

This is the parameters that we are using for the point cloud when we use roslaunch realsense2_camera rs_camera.launch filters:=pointcloud

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: pointcloud
  • /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
  • /camera/realsense2_camera/pointcloud_texture_index: 0
  • /camera/realsense2_camera/pointcloud_texture_stream: RS2_STREAM_COLOR
  • /camera/realsense2_camera/pose_frame_id: camera_pose_frame
  • /camera/realsense2_camera/pose_optical_frame_id: camera_pose_optic...
  • /camera/realsense2_camera/publish_odom_tf: True
  • /camera/realsense2_camera/publish_tf: True
  • /camera/realsense2_camera/reconnect_timeout: 6.0
  • /camera/realsense2_camera/rosbag_filename: 
  • /camera/realsense2_camera/serial_no: 
  • /camera/realsense2_camera/stereo_module/exposure/1: 7500
  • /camera/realsense2_camera/stereo_module/exposure/2: 1
  • /camera/realsense2_camera/stereo_module/gain/1: 16
  • /camera/realsense2_camera/stereo_module/gain/2: 16
  • /camera/realsense2_camera/tf_publish_rate: 0.0
  • /camera/realsense2_camera/topic_odom_in: odom_in
  • /camera/realsense2_camera/unite_imu_method: 
  • /camera/realsense2_camera/usb_port_id: 
  • /camera/realsense2_camera/wait_for_device_timeout: -1.0
  • /camera/rgb_camera/auto_exposure: False
  • /camera/rgb_camera/auto_exposure_priority: False
  • /camera/rgb_camera/exposure: 200
  • /rosdistro: melodic
  • /rosversion: 1.14.13 NODES
      /camera/
        realsense2_camera (nodelet/nodelet)
        realsense2_camera_manager (nodelet/nodelet) auto-starting new master
    process[master]: started with pid [6516]
    ROS_MASTER_URI=http://192.168.2.57:11311/ setting /run_id to 85635e46-bc12-11ed-943e-2c59e50350ac
    process[rosout-1]: started with pid [6590]
    started core service [/rosout]
    process[camera/realsense2_camera_manager-2]: started with pid [6598]
    process[camera/realsense2_camera-3]: started with pid [6605]
    [ INFO] [1678102326.358122025]: Initializing nodelet with 8 worker threads.
    [ INFO] [1678102326.885985000]: RealSense ROS v2.3.2
    [ INFO] [1678102326.886034677]: Built with LibRealSense v2.53.1
    [ INFO] [1678102326.886055621]: Running with LibRealSense v2.53.1
    [ INFO] [1678102326.923774930]:  
    [ INFO] [1678102327.153499981]: Device with serial number f1151068 was found. [ INFO] [1678102327.153627180]: Device with physical ID /sys/devices/pci0000:00/0000:00:14.0/usb4/4-3/4-3:1.0/video4linux/video0 was found.
    [ INFO] [1678102327.153685332]: Device with name Intel RealSense L515 was found.
    [ INFO] [1678102327.154625671]: Device with port number 4-3 was found.
    [ INFO] [1678102327.154666429]: Device USB type: 3.2
    [ INFO] [1678102327.159479408]: getParameters...
    [ INFO] [1678102327.360047602]: setupDevice...
    [ INFO] [1678102327.360108848]: JSON file is not provided
    [ INFO] [1678102327.360152875]: ROS Node Namespace: camera
    [ INFO] [1678102327.360226653]: Device Name: Intel RealSense L515
    [ INFO] [1678102327.360288187]: Device Serial No: f1151068
    [ INFO] [1678102327.360331749]: Device physical port: /sys/devices/pci0000:00/0000:00:14.0/usb4/4-3/4-3:1.0/video4linux/video0
    [ INFO] [1678102327.360382122]: Device FW version: 01.05.08.01
    [ INFO] [1678102327.360448536]: Device Product ID: 0x0B64
    [ INFO] [1678102327.360511192]: Enable PointCloud: On
    [ INFO] [1678102327.360590164]: Align Depth: Off
    [ INFO] [1678102327.360675361]: Sync Mode: On
    [ INFO] [1678102327.360847291]: Device Sensors: 
    [ INFO] [1678102327.361707807]: L500 Depth Sensor was found.
    [ INFO] [1678102327.365257533]: RGB Camera was found.
    [ INFO] [1678102327.365524515]: Motion Module was found.
    [ INFO] [1678102327.365632274]: Add Filter: pointcloud
    [ INFO] [1678102327.366626651]: num_filters: 1
    [ INFO] [1678102327.366656389]: Setting Dynamic reconfig parameters.
    [ INFO] [1678102327.494830300]: Done Setting Dynamic reconfig parameters.
    [ INFO] [1678102327.498622661]: depth stream is enabled - width: 640, height: 480, fps: 30, Format: Z16
    [ INFO] [1678102327.501062923]: color stream is enabled - width: 1280, height: 720, fps: 30, Format: RGB8
    [ INFO] [1678102327.501153952]: setupPublishers...
    [ INFO] [1678102327.510460813]: Expected frequency for depth = 30.00000
    [ INFO] [1678102327.604335297]: Expected frequency for color = 30.00000
    [ INFO] [1678102327.663150045]: setupStreams...
    [ INFO] [1678102327.727845113]: SELECTED BASE:Depth, 0
    [ INFO] [1678102327.929416785]: RealSense Node Is Up!
    [ WARN] [1678102327.931582246]: 
    [ WARN] [1678102327.931725496]: frame's time domain is HARDWARE_CLOCK. Timestamps may reset periodically.
    [ INFO] [1678102477.668086942]: publishing unordered pointcloud.
    [ WARN] [1678102515.212162012]: No stream match for pointcloud chosen texture Process - Color

Is someone have any idea for resolving that problem?

@MartyG-RealSense
Copy link
Collaborator

Hi @julienfal You are correct that the message No stream match for pointcloud chosen texture Process - Color
coincides with frame drops, as advised at IntelRealSense/realsense-ros#588 (comment) by the Intel RealSense team member who developed the ROS1 wrapper.

You could try defining a roslaunch instruction with a custom stream configuration that has a lower resolution and FPS to see whether this reduces the frequency of the warnings. For example:

roslaunch realsense2_camera rs_camera.launch filters:=pointcloud depth_width:=640 depth_height:=480 depth_fps:=15 color_width:=640 color_height:=480 color_fps:=15

If you are using the pointcloud filter then you should not need to use align_depth:=true as the pointcloud should automatically map color onto the depth coordinates anyway. Having both the pointcloud filter and align_depth enabled may cause performance issues.

@julienfal
Copy link
Author

Thank you for your quick response.
Yes of course we didn't enable the point cloud and align_depth at the same time.
However, the depth fps cannot be changed to less than 30 for this L515 camera.
We tried with your parameters but with 30 fps for the depth frame but we still have the frame drop.
Is another way to change the fps of the depth sensor, maybe with a python script ?

@MartyG-RealSense
Copy link
Collaborator

You are correct about the 30 FPS limit for the depth stream on the L515 camera. My apologies, thanks for pointing that out.

The rate at which messages are published can be modified in ROS by setting a rate, though doing so may not be necessary for this particular problem.

https://roboticsbackend.com/ros-rate-roscpy-roscpp/#:~:text=ROS%20Rate%20explained,-Let's%20start%20with

Does performance after a minute of recording improve if you add initial_reset:=true to your roslaunch instruction to reset the camera at launch?

Does it improve if you add global_time_enabled:=true to enable Global Time?

@julienfal
Copy link
Author

It seems that after the initial_reset command now the point cloud is correctly publish during at least 53 sec and can go to 1 min without error but still have the error after that time ( I made the test approximately 10 times).
After doing a launch with the initial_reset I launch without that but the point cloud still good until 53 sec, we got that because we ran with the reset before ?
The global_time_enabled changes nothing to the problem.
if we can reach 1min 20 without any problem it would be perfect but I don't know if it's possible. I also tried that with a lower camera resolution but that changes nothing.

@MartyG-RealSense
Copy link
Collaborator

Are you recording the rosbag in ROS using the rosbag record function please? This function has a parameter called --split that can be used to set a maximum recording duration or file size. When that defined limit is reached, the recording is automatically closed and a new bag recording automatically starts and continues onwards until the next time that the limit is reached.

If having more than one bag file is acceptable to you then closing and re-opening the recording process may correct the loss of frames that you are experiencing at the one minute point and allow a longer period to be recorded across multiple bags.

Examples of --split commands for time and file-size are provided below.

--split

Split the bag when maximum size or duration is reached

$ rosbag record --split --size=1024 /chatter
$ rosbag record --split --duration=30 /chatter
$ rosbag record --split --duration=5m /chatter
$ rosbag record --split --duration=2h /chatter

@julienfal
Copy link
Author

Okay I'll try that, my command line for recording was : rosbag record -b 0 --duration=70 /topics

@julienfal
Copy link
Author

I tried and it stills dropping around 58 sec, do you think it could be an hardware problem in the camera? Like a setting to change?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 6, 2023

It sounds like it could be a memory leak, where a computer's available memory capacity is progressively consumed over time during the running of an application until that application becomes unstable and then may freeze / crash. You can test for a memory leak in Ubuntu by using a system monitoring tool such as htop to monitor available memory over time during the recording process to see if the free memory is declining in real-time.

@julienfal
Copy link
Author

julienfal commented Mar 6, 2023

It seems that the memory stays ok during all the process at first before starting the launch and the recording the memory is at 3.5G/15.6G and during the recording it goes to 4.20G/15.6G.
I'm stopping for today but I'll be able tomorrow to try other things. Thanks for all your answers today !

@MartyG-RealSense
Copy link
Collaborator

You are very welcome. I look forward to your next update. Good luck!

@julienfal
Copy link
Author

Hi!
A little Resume from yesterday : As you told me when I add initial_reset:=true the point cloud last at least 53 sec.
But I still don't know why it stopped.
All the test that we made yesterday was with these lines adding in the launch file

  • /camera/rgb_camera/auto_exposure_priority: false
  • /camera/rgb_camera/auto_exposure: false
  • /camera/rgb_camera/exposure: 200

I made some test this morning when i try different launch file configuration here are my tests:

1st test: I remove all the 3 lines

  • Consequences: I don't have any frame drop for the point cloud but i can't have a stable frame fps even if I launch the camera with roslaunch realsense2_camera rs_camera.launch filters:=pointcloud color_width:=1280 color_height:=720 color_fps:=30 initial_reset:=true it looks like at first it stays at 30 fps for 3 sec and after it just goes to 15 fps naturally

2nd test: I just add /camera/rgb_camera/auto_exposure_priority: false in the launch file

  • Consequences: the Frame rate is now consistent when I want 30 fps it stays at 30 but I have the frame drop much more quickly like around 20 sec and even sometimes in less than 10 sec
  • If i try using 15 fps everything works well, no frames drop but i think 15 fps is too low for my application so i really need 30 fps

3th test: I just add /camera/rgb_camera/auto_exposure: false /camera/rgb_camera/exposure: 200 in the launch file

  • Consequences: The frame rate is stable at 30 fps but point cloud frame drop around after 53 sec

4th test: I just add /camera/rgb_camera/exposure: 200 in the launch file

  • Consequences : Frame rate stable at 30 fps but point cloud drop and still good for 15 fps

5th test : I just add /camera/rgb_camera/auto_exposure_priority: false
/camera/rgb_camera/auto_exposure: false in the launch file

  • Consequences: with 30 fps point cloud drop much more quickly around 25 sec, with 15 fps point cloud still good

All of this test was launch with the initial_reset:=true each time.

I don't really get it because normally the Camera should be able to run the point cloud with 30 fps according to the datasheet and I don't think that the problems come from my PC. Do you have other idea that I can test to see if that improve something ? It looks like setting manually the exposure in the launch file help already to stabilize the point cloud.

@MartyG-RealSense
Copy link
Collaborator

If depth and color streams are enabled and auto-exposure is enabled then it can result in a drop in FPS, such as a halving. A fix for this is to set auto-exposure to manual and disable an RGB option called auto_exposure_priority. This forces the SDK to try to maintain the FPS at a constant rate instead of being permitted to vary, as described at #10051

@julienfal
Copy link
Author

When you say auto-exposure to manual it just putting that settings equal to False and after giving a manual exposure value? If yes I already tried that but still have the frame drop for the point cloud after 50 sec.

@julienfal
Copy link
Author

it seems that it can be a problem of exposure time because when I change the value of that this impact a lot the frame drop.
What is the best exposure time for 30 FPS ? Actually it is set to 200 and when i try to go to 400 i loose the consistent fps speed but i have the consistent point cloud and when i try to go lower to 200 I have the consistent fps speed but i still have the point cloud frame drop

@MartyG-RealSense
Copy link
Collaborator

Using a manual exposure can cause FPS to drop if the value is within a certain range, as described by a RealSense team member at #1957 (comment)

@julienfal
Copy link
Author

Yes of course but I was just wondering if it exists an optimize exposure time for 30 FPS for the L515 specifically.

@MartyG-RealSense
Copy link
Collaborator

Depth exposure is not customizable on L515 lidar depth cameras like it is on the 400 Series stereo cameras as the L515 is a different camera technology. L515 uses a short exposure time of <100 ns per depth point.

RGB exposure is customizable though and is '156' by default, so 156 would be the optimal exposure time for RGB. With the 200 and 400 values that you are using, it sounds as though it is RGB exposure that you are configuring.

@MartyG-RealSense
Copy link
Collaborator

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

@MartyG-RealSense
Copy link
Collaborator

Case closed due to 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