-
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
setting align_depth causes misaligned coloured point cloud, similar but not the same issue as 2595 #3050
Comments
Hi @elvintoh82 You are correct that the recommendation would usually be to not enable align_depth if you are using the pointcloud, since the pointcloud will map depth and color together anyway. I appreciate that you require the aligned topics though. Is there any improvement if you have align_depth = true and set the pointcloud to use the infrared stream to texture the pointcloud instead of the color stream using the pointcloud.stream_filter parameter?
|
Thanks @MartyG-RealSense , I will go and try to change the texture types and see if it usable, and also see if it will influence the behaviour of the pointcloud alignment or not. By the way, I tried searching for the available options to the other argument pointcloud.stream_filter ==> to see what are all the values available and what they would represent, but I can't seem to find any documentation regarding it (specifically pointcloud.stream_filter, not just filters in general). I even tried searching the code base for this repo for the text "pointcloud.stream_filter" and only 3 hits came back, none of which actually gave the list of options/descriptions. Regardless, I do hope that realsense would be able to address this bug where the pointcloud gets misaligned whenever the align_depth is enabled. Thanks! |
Looking at other issues related to align_depth.enable, I found one possibly related issue (but theirs was regarding RGBD instead of point cloud i think). Do you reckon it is a related problem? Conceptually, I would think that a published pointcloud WITHOUT align_depth(to colour) should have a frame_id as "depth_optical_frame". Whereas a published pointcloud WITH align_depth(to colour) should have a frame_id as "color_optical_frame". Is this a valid concept? I will go and check what is the pointcloud's frame_id tomorrow. |
Thanks very much @elvintoh82 A fix for this alignment / pointcloud issue - #2775 - was implemented in the ROS2 wrapper on 27 June 2023. That was the same day that wrapper 4.54.1 was released and the fix is included in the release notes for 4.54.1. So because you have wrapper 4.54.1 installed then this particular cause of mis-alignment should already have been addressed. Regarding |
I have also checked on who the frame_ids are. For now. |
Thanks so much for your detailed feedback. Please do let me know how your frame_id edit works out. Good luck! |
Hi I managed to do hijack the pointcloud topic and changed the frame_id form color_optical_frame to depth_optical_frame and then republish it out (using another temp topic name). It works properly and that pointcloud looks aligned and proper in RVIZ now. Thanks! |
I have highlighted your fix to my Intel RealSense colleagues on the ROS team. Thanks for sharing! |
My colleagues on the ROS team confirmed that a later PR fix had already been made in September 2023 at #2868 to fix the misalignment issue. The fix is in the 2.54.1 wrapper if it is built from source code but is not yet in the version installed from the ROS server package. So you should build the wrapper from source code to obtain the fixed version. |
Thanks for getting back on the implemented fix. I shall find a chance to build it from source and try it, although i don't foresee I have much opportunity to do that anytime soon. |
Thanks very much. The alternative would be to wait for the next ROS wrapper release and install the wrapper from ROS server package. |
Hi @elvintoh82 Do you require further assistance with this case, please? Thanks! |
At this stage, I'm fine already thanks. I'll just wait for the next update to the apt install method instead. Meanwhile, I'l also just using the hijack method to overcome the cosmetic problem. Much Thanks! @MartyG-RealSense |
You are very welcome, @elvintoh82 - thanks very much for the update! |
I'm running ROS Humble inside docker where I also
apt install ros-humble-realsense2-*
My setup:
When I run the ros2 launch realsense2_camera rs_launch.py with the following arguments:
Note that there is a green colour silicon mat in real life, it is perfectly aligned to the edge of the table in real life(you can also see the urdf model of the table on rviz). However, on rviz where the pointcloud is displayed live, the points of the green mat is not aligned with the edge of the urdf table.
The purpose of me putting the brown box is to show that this problem is NOT related to issue #2595.
I notice that the pointcloud that is published is always misaligned by around 4-5cm to the right. Note that I am not referring to an issue where the depth information is not aligned to the rgb information that has been raised previously by issue #2595. This is a different problem. I know for a fact that this pointcloud is misaligned because I mount the D455 camera onto the robot end effector, and that the robot is mounted on a known position of the table.
Here we can see that the green mats' points are now properly aligned to the edge of the urdf table.
Furthermore, once I change the argument
align_depth.enable ==> false
. The problem of the misaligned pointcloud disappears.Suggestions might include just leaving the align_depth.enable argument as false, but I desire the following topics:
Could someone please look into this? Thanks.
Issue Description
The pointcloud that is published when using
align_depth.enable==>true
is misaligned to real physical space. This is NOT the same as issue #2595 although the title description is the same.The text was updated successfully, but these errors were encountered: