Open christian-rauch opened 1 year ago
Hi @christian-rauch If the pointcloud filter is enabled then alignment should automatically be used without having to set align_depth to true.
Hi @christian-rauch If the pointcloud filter is enabled then alignment should automatically be used without having to set align_depth to true.
I am sure that in the default configuration, the node will align depth and colour. If I don't use align_depth
, then the alignment in the point cloud is correct. But I am additionally setting align_depth
because I also need the aligned depth images on topic /aligned_depth_to_color/image_raw
. Enabling both somehow registers the images twice as if the point cloud registration would use the already registered image from /aligned_depth_to_color/image_raw
instead of the original depth image.
@MartyG-RealSense In summary: I want to subscribe to the registered depth images on /aligned_depth_to_color/image_raw
and the registered point cloud on /depth/color/points
. This is not possible at the moment.
What happens if you set align_depth to true and change the pointcloud texture configuration by setting pointcloud.stream_filter to 0
What happens if you set align_depth to true and change the pointcloud texture configuration by setting pointcloud.stream_filter to 0
Then I won't get colour.
With pointcloud.stream_filter
set to 0
ros2 topic echo /depth/color/points --field fields
gives
[sensor_msgs.msg.PointField(name='x', offset=0, datatype=7, count=1), sensor_msgs.msg.PointField(name='y', offset=4, datatype=7, count=1), sensor_msgs.msg.PointField(name='z', offset=8, datatype=7, count=1)]
I have highlighted this issue to my Intel RealSense colleagues on the ROS team. Thanks very much for your patience.
+1. Encountered the same issue of misaligned colored pointcloud after setting aligned_depth
to true as well.
See below for the full report.
22.04
[Operating System]2.51.1
[Driver]Connect the Camera Hardware (Eg. Realsense D455) to your local workstation via a USB3.0 port.
Set up the ROS2 workspace with realsense_ros ROS2 package:
cd $HOME
mkdir -p official_realsense_ws/src
cd ~/official_realsense_ws/src
# Download the realsense_ros repository - branch ros2_development
git clone https://github.com/IntelRealSense/realsense-ros.git -b ros2-development
cd ~/official_realsense_ws/
source /opt/ros/humble/setup.bash
colcon build
Run realsense_ros ROS2 package once colcon build
has completed:
cd ~/official_realsense_ws
source /opt/ros/humble/setup.bash
source install/setup.bash
ros2 launch realsense2_camera rs_launch.py depth_module.profile:=1280x720x30 pointcloud.enable:=true \
align_depth.enable:=true
.rviz
configuration file by creating a debug.rviz
file:cd ~/official_realsense_ws
mkdir rviz2
touch debug.rviz
nano debug.rviz
# Copy and paste the content below into `debug.rviz`
rviz2
to display the PointCloud result captured after executing Step 6.
cd ~/official_realsense_ws
source /opt/ros/humble/setup.bash
rviz2 -d rviz2/debug.rviz
The rviz
GUI should now have appeared.
You should see the following result after executing Step 6:
The above pointcloud is deduced to be misaligned when comparing it to the Expected Behaviour.
To obtain the expected behaviour, please run realsense_ros without align_depth.enable:=true
:
cd ~/official_realsense_ws
source /opt/ros/humble/setup.bash
source install/setup.bash
ros2 launch realsense2_camera rs_launch.py depth_module.profile:=1280x720x30 pointcloud.enable:=true
You should see the following result:
Both Actual Behaviour and Expected Behaviour are done with the following controlled Setup and Object:
The object in question is a water bottle with a yellow lid.
By comparing the difference in results between Actual Behaviour and Expected Behaviour, it would seem that running without align_depth.enable:=true
already has align_depth
set to true.
Setting align_depth.enable:=true
therefore seems to cause the color to be registered twice unnecessarily.
Thanks very much @cardboardcode for your report.
@MartyG-RealSense The report has been fully elaborated. Hope it helps.
After discussion between my Intel RealSense colleagues, an official internal report has been created about this issue so that it can be investigated further by the RealSense ROS development team at a future date. If other RealSense ROS users experience this issue then they are encouraged to report it on this discussion.
This issue should be kept open whilst the internal report is active.
Hi @christian-rauch, Can you please tell me which camera model are you using ? is it D455 as @cardboardcode reported above ?
Also I see that #2585 is related to this issue, specially at this comment: https://github.com/IntelRealSense/realsense-ros/issues/2585#issuecomment-1366808574 I'm investigating this and will update asap.
Thanks, Samer
Can you please tell me which camera model are you using ? is it D455 as @cardboardcode reported above ?
Yes, it is the D455.
Hi @SamerKhshiboun Do you have an update about this case that you can provide, please? Thanks!
Hi @MartyG-RealSense , I started to look on this, and managed to reproduce this. looks like when there is a bug when we are trying to texture the aligned frames... will continue analyzing this and will update asap.
Thanks very much @SamerKhshiboun for the update!
Hi @christian-rauch & @cardboardcode, Could you please try the PR #2775 and let us know if that works?
Thanks.
Hi @christian-rauch & @cardboardcode, Could you please try the PR #2775 and let us know if that works?
Thanks.
Will update here once I have done so. Thanks @Arun-Prasad-V 😄 👍
When I set the parameter
align_depth.enable
toTrue
, the coloured point cloud will have misaligned colour, i.e. the colour will not be correctly registered to the points.Consider the following ROS2 launch file:
The launch file will start the node, set VGA resolution @ 30 fps (
rgb_camera.profile
), align the colour with the depth (align_depth.enable
) and publish a coloured point cloud (pointcloud
).With
the point cloud is shown in RViz2 with misaligned colour: rs_not_aligned.zip. The image shows the point cloud of a RealSense box. It is clearly visible that the white background is registered to the majority of the box points in the foreground.
When set to
False
or removed, the colour is correctly aligned with the points: rs_aligned.zipIt looks like the colour is registered twice before it is assigned to the points.