-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Misaligned point clouds from driver and depth_image_proc #3240
Comments
Hi @SDADEEC A difference between the rs_camera and rs_rgbd launches is that by default rs_camera generates an unordered pointcloud by default, whilst rs_rgbd generates an ordered pointcloud. You can set the rs_camera pointcloud to an ordered one to see whether it brings the results closer to those of rs_rgbd's ordered cloud.
|
Hi @MartyG-RealSense, thanks very much for the suggestion. I set the point cloud from the driver to be ordered, but it looks like the rgbd cloud is still not well aligned with the driver cloud (red cloud is from the driver and the white cloud is from the rgbd images.): I've checked the two clouds messages, the left is the driver cloud and the right is the rgbd cloud. I noticed the length from the two point clouds in the "data" field are not equal. Do you have any idea on why this is happening? For |
Usually when aligning depth to color in the ROS wrapper, you do not need to consider the configuration of the depth and color streams. You simply set the align_depth parameter to True and aligned-image topics are automatically published. You do not need to perform rectification on images, and would not be able to do so as the rectification process takes place automatically in the camera hardware before the depth and color frames even reach the computer. Actually, in the rs_camera.launch file you do not need to set align_depth to true when publishing a pointcloud (unless you need to use the aligned topics for something too) as depth and color will be mapped together anyway when the pointcloud filter is enabled. So you could be aligning the images twice by enabling align_depth. Is the rs_camera pointcloud more accurate if you set align_depth to false? You can test this without editing the launch file by adding align_depth:=false to the roslaunch instruction, as the command will then override the setting stored in the launch file.
|
Hi @MartyG-RealSense, I'm not sure how to check whether the point cloud published by the driver, or the one from rgbd images is more accurate. My case is that I want to record the point cloud published by the driver. But it is too big in size, I decide to record the rgbd images instead and recover the point cloud from them (i.e., one color image topic and one
What I found is that in From what you said, is that mean when I set |
When the pointcloud filter is enabled, by default the pointcloud is based upon the This is reflected in your launch file for generating pointclouds from RGBD images.
You are welcome to try experimenting with remapping to a different color topic, but the default is likely to be the best choice. |
Is that mean for |
Both the depth and color images have distortion models applied to them, so there should be some distortion incorporated into the aligned image because the original images had it. |
OK, in that case, for a pixel (u,v) in the |
When depth-color alignment is performed, the field of view size of the depth sensor is resized to match the field of view size of the RGB color sensor, and the depth coordinates are mapped onto matching RGB coordinates. Also, after alignment the 0,0,0 origin point of depth changes from the centerline of the left IR sensor to the centerline of the RGB sensor. |
OK, I see. Thanks for the explanation. So the coordinates of But this raises a question, in realsense2_camera/launch/rs_rgbd.launch, the block to generate point clouds from rgbd images is shown below when <group if="$(eval depth_registered_processing and hw_registered_processing)">
<!-- Publish registered XYZRGB point cloud with hardware registered input (ROS Realsense depth alignment) -->
<node pkg="nodelet" type="nodelet" name="points_xyzrgb_hw_registered"
args="load depth_image_proc/point_cloud_xyzrgb $(arg manager) $(arg bond)" respawn="$(arg respawn)">
<remap from="rgb/image_rect_color" to="$(arg rgb)/image_rect_color" />
<remap from="rgb/camera_info" to="$(arg rgb)/camera_info" />
<remap from="depth_registered/image_rect" to="$(arg depth_registered)/image_raw" />
<remap from="depth_registered/points" to="$(arg depth_registered_pub)/points" />
</node>
</group> The depth image topic is still using the Is this correct? Is |
At #1029 a RealSense ROS user asks a similar question about these color topics and the creator of the RealSense ROS1 wrapper advises that the |
Hi @SDADEEC Do you require further assistance with this case, please? Thanks! |
I think I got what I wanted. Thanks so much for the help. |
You are very welcome. I'm pleased that I could help. Thanks very much for the update! |
Issue Description
Hi, I'm trying to compare the point clouds generated from the driver by setting
enable_pointcloud
to true, and from the rgb-d images usingdepth_image_proc
for D455 in ROS 1.I found there are some misalignments in the point clouds generated from the two methods (1~3 cm). In the screenshot below, the red cloud is from the driver and the white cloud is from the rgbd images.
Here is my driver launch file:
And the launch file to generate point clouds from rgbd images
I noticed d455 has some distortions in the camera_info (1580) which is different from other cameras like d435i (1430). Is that mean the driver internally performs some rectification then generate the point clouds? If so, how to properly rectify the rgbd images and how to generate the identical point clouds from them compared to the clouds from driver?
The text was updated successfully, but these errors were encountered: