Skip to content

setting align_depth causes misaligned coloured point cloud #2595

Open
@christian-rauch

Description

@christian-rauch

When I set the parameter align_depth.enable to True, 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:

launch:
- node_container:
    pkg: rclcpp_components
    exec: component_container
    name: camera_container
    namespace: realsense
    composable_node:
    -   pkg: realsense2_camera
        plugin: realsense2_camera::RealSenseNodeFactory
        name: camera
        param:
        -   name: rgb_camera.profile
            value: 640x480x30
        -   name: "align_depth.enable"
            value: True
        -   name: pointcloud.enable
            value: True
        -   name: pointcloud.stream_filter
            value: 2 # RS2_STREAM_COLOR

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

        -   name: "align_depth.enable"
            value: True

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.zip

It looks like the colour is registered twice before it is assigned to the points.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions