IntelRealSense / librealsense

Intel® RealSense™ SDK

Home Page:https://www.intelrealsense.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specific Version Requirements for RealSense SDK and ROS Wrapper to Support L515 on ROS 2 Humble

Liu-Jinxin opened this issue · comments

Required Info
Camera Model L515
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version Ubuntu 22.04 Humble
Kernel Version (Linux Only) 6.5.0-35-generic
SDK Version 2.5.1 / ???

Issue Description

Hello,

I am currently working on integrating the Intel RealSense L515 camera with ROS 2 Humble. I am looking for specific guidance on the versions of the RealSense SDK and the ROS wrapper that are required to ensure compatibility and optimal performance with ROS 2 Humble.

Could you please specify the recommended versions of the RealSense SDK and the corresponding ROS wrapper that should be used with the L515 camera in a ROS 2 Humble environment? Additionally, any tips on configuration settings or troubleshooting common issues would be highly appreciated.

Thank you for your support.

Best regards,
Jinxin

Hi @Liu-Jinxin You should use your L515 on Ubuntu 22.04 with librealsense SDK version 2.54.1 or 2.54.2 with RealSense ROS2 wrapper 4.54.1 (which is currently compatible with Humble and Iron).

The easiest installation method for you may be to follow the steps below.

  1. Install ROS2 Humble if you have not done so already.

  2. Install librealsense 2.54.1 from packages:

sudo apt install ros-humble-librealsense2*

  1. Install the 4.54.1 wrapper from packages:

sudo apt install ros-humble-realsense2-*


The package version of the 4.54.1 wrapper will be significantly out of date compared to the source code version of the wrapper. So you may prefer to build the latest version of 4.54.1 from source code instead of packages in step 3.

To do this, please visit the link below and expand open the section titled Step 3: Install Intel RealSense ROS2 wrapper. Then scroll down to the Option 2: Install from source section for instructions on performing a colcon build.

https://github.com/IntelRealSense/realsense-ros?tab=readme-ov-file#installation-on-ubuntu

Hi @Liu-Jinxin You should use your L515 on Ubuntu 22.04 with librealsense SDK version 2.54.1 or 2.54.2 with RealSense ROS2 wrapper 4.54.1 (which is currently compatible with Humble and Iron).

The easiest installation method for you may be to follow the steps below.

  1. Install ROS2 Humble if you have not done so already.
  2. Install librealsense 2.54.1 from packages:

sudo apt install ros-humble-librealsense2*

  1. Install the 4.54.1 wrapper from packages:

sudo apt install ros-humble-realsense2-*

The package version of the 4.54.1 wrapper will be significantly out of date compared to the source code version of the wrapper. So you may prefer to build the latest version of 4.54.1 from source code instead of packages in step 3.

To do this, please visit the link below and expand open the section titled Step 3: Install Intel RealSense ROS2 wrapper. Then scroll down to the Option 2: Install from source section for instructions on performing a colcon build.

https://github.com/IntelRealSense/realsense-ros?tab=readme-ov-file#installation-on-ubuntu

Thanks! I have tried your suggestion, and it works. But this output still has warning "frame's time domain is HARDWARE_CLOCK. Timestamps may reset periodically.". I was wondering how to solve it. Thanks for your help in advance.

➜  ros2_ws ros2 launch realsense2_camera rs_launch.py
[INFO] [launch]: All log files can be found below /home/jinxin/.ros/log/2024-05-28-20-30-39-776635-jinxin-ws-2516895
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [realsense2_camera_node-1]: process started with pid [2516896]
[realsense2_camera_node-1] [INFO] [1716899439.954742969] [camera.camera]: RealSense ROS v4.54.1
[realsense2_camera_node-1] [INFO] [1716899439.954797155] [camera.camera]: Built with LibRealSense v2.54.1
[realsense2_camera_node-1] [INFO] [1716899439.954802128] [camera.camera]: Running with LibRealSense v2.54.1
[realsense2_camera_node-1] [INFO] [1716899440.104304637] [camera.camera]: Device with serial number f0190751 was found.
[realsense2_camera_node-1] 
[realsense2_camera_node-1] [INFO] [1716899440.104337081] [camera.camera]: Device with physical ID /sys/devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/video4linux/video0 was found.
[realsense2_camera_node-1] [INFO] [1716899440.104341642] [camera.camera]: Device with name Intel RealSense L515 was found.
[realsense2_camera_node-1] [INFO] [1716899440.104414879] [camera.camera]: Device with port number 2-1 was found.
[realsense2_camera_node-1] [INFO] [1716899440.104419246] [camera.camera]: Device USB type: 3.2
[realsense2_camera_node-1] [INFO] [1716899440.104767494] [camera.camera]: getParameters...
[realsense2_camera_node-1] [INFO] [1716899440.104863476] [camera.camera]: JSON file is not provided
[realsense2_camera_node-1] [INFO] [1716899440.104868495] [camera.camera]: Device Name: Intel RealSense L515
[realsense2_camera_node-1] [INFO] [1716899440.104871822] [camera.camera]: Device Serial No: f0190751
[realsense2_camera_node-1] [INFO] [1716899440.104874942] [camera.camera]: Device physical port: /sys/devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/video4linux/video0
[realsense2_camera_node-1] [INFO] [1716899440.104878302] [camera.camera]: Device FW version: 1.5.8.1
[realsense2_camera_node-1] [INFO] [1716899440.104881134] [camera.camera]: Device Product ID: 0x0B64
[realsense2_camera_node-1] [INFO] [1716899440.104883821] [camera.camera]: Sync Mode: Off
[realsense2_camera_node-1] [INFO] [1716899440.119838796] [camera.camera]: Set ROS param depth_module.profile to default: 640x480x30
[realsense2_camera_node-1] [INFO] [1716899440.121843747] [camera.camera]: Set ROS param rgb_camera.profile to default: 1280x720x30
[realsense2_camera_node-1] [INFO] [1716899440.121987504] [camera.camera]: Set ROS param gyro_fps to default: 100
[realsense2_camera_node-1] [INFO] [1716899440.122000350] [camera.camera]: Set ROS param accel_fps to default: 200
[realsense2_camera_node-1] [INFO] [1716899440.125533347] [camera.camera]: Stopping Sensor: Depth Module
[realsense2_camera_node-1] [INFO] [1716899440.145120787] [camera.camera]: Starting Sensor: Depth Module
[realsense2_camera_node-1] [INFO] [1716899440.149108020] [camera.camera]: Open profile: stream_type: Confidence(0), Format: RAW8, Width: 640, Height: 480, FPS: 30
[realsense2_camera_node-1] [INFO] [1716899440.149120929] [camera.camera]: Open profile: stream_type: Infra(0), Format: Y8, Width: 640, Height: 480, FPS: 30
[realsense2_camera_node-1] [INFO] [1716899440.149124875] [camera.camera]: Open profile: stream_type: Depth(0), Format: Z16, Width: 640, Height: 480, FPS: 30
[realsense2_camera_node-1] [INFO] [1716899440.149178776] [camera.camera]: Stopping Sensor: RGB Camera
[realsense2_camera_node-1] [INFO] [1716899440.274076464] [camera.camera]: Starting Sensor: RGB Camera
[realsense2_camera_node-1] [INFO] [1716899440.276190913] [camera.camera]: Open profile: stream_type: Color(0), Format: RGB8, Width: 1280, Height: 720, FPS: 30
[realsense2_camera_node-1] [INFO] [1716899440.276960947] [camera.camera]: RealSense Node Is Up!
[realsense2_camera_node-1] [WARN] [1716899440.356599541] [camera.camera]: 
[realsense2_camera_node-1] [WARN] [1716899440.356621402] [camera.camera]: frame's time domain is HARDWARE_CLOCK. Timestamps may reset periodically.

This warning appears frequently in the logs of RealSense ROS wrapper users. If the streams are publishing normally in RViz then it is likely that you can safely ignore it.

This warning appears frequently in the logs of RealSense ROS wrapper users. If the streams are publishing normally in RViz then it is likely that you can safely ignore it.

Thank you for the information. It seems that with the L515, the warning might be related to the image timestamps being significantly delayed compared to other topics, which could pose challenges for time synchronization in ROS 2. This issue was not observed with the D-series cameras.

Could this delay in timestamps be the cause of the warning we are observing? Additionally, is there a potential fix or workaround to address this issue to ensure better synchronization with ROS 2? Any guidance or updates in this regard would be greatly appreciated.

On the 400 Series camera range, global timestamps are enabled by default but on the L515 model they are disabled by default. Please try adding the command below to the end of your launch instruction.

global_time_enabled:=true

@MartyG-RealSense Thank you for your suggestion. I added global_time_enabled and set it to true in my ROS2 launch file. Unfortunately, the issue persists, and the delay appears to be unstable, fluctuating between 3 to 7 seconds across different launches. Any further advice or potential solutions to stabilize the timestamp delay would be greatly appreciated.

{'name': 'global_time_enabled',             'default': 'true', 'description': 'enable global time'},

Have you tried unplugging the micro-sized end of the USB cable from the base of the L515 camera, reversing the connector's orientation and plugging it back into the L515 camera, please (USB-C cables are two-way insertion at the micro-sized end). The L515 typically performs better when the micro-sized connector is inserted into the camera base in one particular orientation of the two available.