IntelRealSense / realsense-ros

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

Inconsistent Point Cloud Data Between Gazebo Simulation and Real-World RealSense D405 #3164

Closed FadiGEBRAYEL closed 3 weeks ago

FadiGEBRAYEL commented 1 month ago

Hello,

I am currently using the Intel RealSense D405 camera in a Gazebo simulation environment to replicate real-world scenarios. The purpose of my work is to scan a specific scene and emulate what a robot would see in real life using the camera in Gazebo. However, I am encountering significant inconsistencies between the point cloud data captured by the D405 camera in the simulation and the point cloud data captured in real life.

I am using the following xacro files for the camera setup:

_d405.gazebo.xacro

<?xml version="1.0"?>

0 0 0 0 1 0 0 0 1e+13 1 ${69.4*deg_to_rad} 640 480 RGB_INT8 0.1 100 gaussian 0.0 0.007 1 30 1 ${84*deg_to_rad} 1280 720 L_INT8 0.1 100 gaussian 0.0 0.05 1 90 0 ${84*deg_to_rad} 1280 720 L_INT8 0.1 100 gaussian 0.0 0.05 1 90 0 ${85.2*deg_to_rad} 1280 720 0.1 100 gaussian 0.0 0.100 1 90 0 ${camera_name} 30.0 30.0 30.0 depth/image_raw depth/camera_info color/image_raw color/camera_info infra1/image_raw infra1/camera_info infra2/image_raw infra2/camera_info ${color_optical_frame} ${depth_optical_frame} ${infrared1_optical_frame} ${infrared2_optical_frame} 0.2 10.0 ${publish_pointcloud} depth/color/points 0.25 9.0

_d405.urdf.xacro <?xml version="1.0"?>

test_d405_camera.urdf.xacro <?xml version="1.0"?>

Could you please provide guidance on how to better match the simulated point cloud data with the real-world data? Thank you for your assistance

ros version: noetic

MartyG-RealSense commented 1 month ago

Hi @FadiGEBRAYEL Thanks very much for your patience as I considered your question.

I note that you are using ROS1 Noetic.

I see a possivble cause of discrepancy between your real-world pointcloud and your Gazebo one. In your xacro, you have the scale set as '0.001'.

<mesh filename="file://$(find realsense2_description)/meshes/d405.stl" scale="0.001 0.001 0.001" />

However, the D405 model differs from most of the other RealSense 400 Series models in that its default depth scale is 0.01 because it is designed to specialize in close-range depth sensing.

MartyG-RealSense commented 1 month ago

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

MartyG-RealSense commented 3 weeks ago

Case closed due to no further comments received.