Building a dense point cloud with a stereo camera in ROS 2 requires horizontal alignment and rectification of the left and right camera frames. Developers should verify the presence of rectified topics, such as /left/image_rect and /right/image_rect, before processing.
The stereo_image_proc package from the image_pipeline stack is used to generate the point cloud. To resolve coordinate system mismatches between OpenCV and ROS, a static transform publisher must be configured to rotate the optical frame relative to the camera base.
Dynamic parameter tuning via rqt_reconfigure allows for real-time adjustment of disparity algorithm settings, such as correlation window size, block size, and uniqueness ratio, to improve depth map quality and reduce noise.
Performance issues, such as image freezing in RViz2, can be mitigated by adjusting QoS profiles to RELIABLE, limiting OpenCV multi-threading with cv2.setNumThreads(1), and optimizing NumPy operations. These changes enabled stable streaming at 13–15 FPS.





