Problem with RTAM-Map and stereo camera
▲ 2 r/RobotSLAM+1 crossposts

Problem with RTAM-Map and stereo camera

I have a PS5 HD stereo camera configured to stream frames in ROS 2, and I want to try running RTAB-Map for ROS 2 with it. I have properly calibrated and rectified both cameras.

Currently, I'm running into an issue: after operating for a while, a red background appears, and the image in the Odometry panel looks "doubled" (the left and right frames seem to overlap with vertical and angular shifts). Upon starting SLAM, key points are detected properly, and a few yellow points appear in the 3D map point cloud window.

https://preview.redd.it/f9bepfij7kjh1.png?width=638&format=png&auto=webp&s=53b124e4d98cdda914bbcf6829493953ed088479

I verified the image rectification, and it looks correct. The topics being passed to rtabmap_ros are also correct.

Here is the command I use to launch rtabmap_ros:

ros2 launch rtabmap_launch rtabmap.launch.py \                                                                                                                      
        stereo:=true \                                                                                                                                                  
        left_image_topic:=/left/image_rect \                                                                                                                            
        right_image_topic:=/right/image_rect \                                                                                                                          
        left_camera_info_topic:=/left/camera_info \                                                                                                                     
        right_camera_info_topic:=/right/camera_info \                                                                                                                   
        frame_id:=camera_link_optical \                                                                                                                                 
        approx_sync:=true \                                                                                                                                             
        rtabmap_viz:=true

I tried debugging the issue with Antigravity AI, which pointed out a transformation error in my ps5_stereo_processing.launch.py file.

I had:

Node(
            package='tf2_ros',
            executable='static_transform_publisher',
            name='static_tf_pub',
            arguments=['0', '0', '0', '0', '0', '0', 'map', 'camera_link_optical']
        ),

According to it, it should be:

Node(
        package='tf2_ros',
        executable='static_transform_publisher',
        name='camera_to_optical_tf',
        arguments=['0', '0', '0', '-1.5707963', '0', '-1.5707963', 'camera_link', 'camera_link_optical']
    ),

Here is the output from tf_monitor when I applied the fix above:

https://preview.redd.it/hrjlo7168kjh1.png?width=880&format=png&auto=webp&s=cf5ac6c4a3e3e24c702df33ba38adfe2aa2de1cd

Was this advice from the AI valid? What else could be causing this issue?

reddit.com
u/cv_geek — 6 days ago
▲ 4 r/robotics+1 crossposts

Camera calibration & Uncalibrated Stereo study gallery

https://preview.redd.it/2w371u474rgh1.png?width=746&format=png&auto=webp&s=6d5d5057f32db6aa119e6cc337233600ca0697c8

Debanik Roy on LinkedIn created a complete and easy-to-understand derivation of Camera Calibration & Uncalibrated Stereo — from pinhole projection to homogeneous coordinates, K/R/t extraction, lens distortion, depth from disparity, epipolar geometry, and 3D triangulation. Every equation explained step by step, no shortcuts.

You can swipe through the full derivations.

Link to his post: https://www.linkedin.com/feed/update/urn:li:activity:7488629203144204288/

reddit.com
u/cv_geek — 20 days ago
▲ 1 r/ROS+1 crossposts

I built a ROS 2 node for PlayStation 5 HD camera - waitking for feedback

Hi community.

I have built a simple ROS 2 node for the official PlayStation 5 HD camera to get it work with my own camera. Now it's not yet published but I think about making it public on github.
What do you think if that can be useful for community?

u/cv_geek — 2 months ago