ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

RTABMap Ground Plain Off

asked 2023-03-20 10:06:38 -0600

MarkRobotics gravatar image

updated 2023-03-26 02:17:38 -0600

Hi,

I've having problems getting the ground plan on rtabmap to show correctly. The pic below shows the ground plan beneath the grid floor. How can I correct this please. I've tried some static transforms but they haven't worked.

https://www.dropbox.com/s/8rng8qk9c8k...

image description

Incorrect Camera Optical Frame??

https://www.dropbox.com/s/xgminqnsig6...

Full TF tree:

https://www.dropbox.com/s/s8en0mc5wvl...

RTABMap Startup Parameters

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.16.0
 * /rtabmap/rgbd_odometry/approx_sync: False
 * /rtabmap/rgbd_odometry/approx_sync_max_interval: 0.0
 * /rtabmap/rgbd_odometry/config_path:
 * /rtabmap/rgbd_odometry/expected_update_rate: 0.0
 * /rtabmap/rgbd_odometry/frame_id: camera_link
 * /rtabmap/rgbd_odometry/ground_truth_base_frame_id:
 * /rtabmap/rgbd_odometry/ground_truth_frame_id:
 * /rtabmap/rgbd_odometry/guess_frame_id:
 * /rtabmap/rgbd_odometry/guess_min_rotation: 0.0
 * /rtabmap/rgbd_odometry/guess_min_translation: 0.0
 * /rtabmap/rgbd_odometry/keep_color: False
 * /rtabmap/rgbd_odometry/max_update_rate: 0.0
 * /rtabmap/rgbd_odometry/odom_frame_id: odom
 * /rtabmap/rgbd_odometry/publish_tf: True
 * /rtabmap/rgbd_odometry/queue_size: 10
 * /rtabmap/rgbd_odometry/subscribe_rgbd: False
 * /rtabmap/rgbd_odometry/wait_for_transform_duration: 0.2
 * /rtabmap/rgbd_odometry/wait_imu_to_init: False
 * /rtabmap/rtabmap/Mem/IncrementalMemory: true
 * /rtabmap/rtabmap/Mem/InitWMWithAllNodes: false
 * /rtabmap/rtabmap/approx_sync: False
 * /rtabmap/rtabmap/config_path:
 * /rtabmap/rtabmap/database_path: ~/.ros/rtabmap.db
 * /rtabmap/rtabmap/frame_id: camera_link
 * /rtabmap/rtabmap/gen_depth: False
 * /rtabmap/rtabmap/gen_depth_decimation: 1
 * /rtabmap/rtabmap/gen_depth_fill_holes_error: 0.1
 * /rtabmap/rtabmap/gen_depth_fill_holes_size: 0
 * /rtabmap/rtabmap/gen_depth_fill_iterations: 1
 * /rtabmap/rtabmap/gen_scan: False
 * /rtabmap/rtabmap/ground_truth_base_frame_id:
 * /rtabmap/rtabmap/ground_truth_frame_id:
 * /rtabmap/rtabmap/initial_pose:
 * /rtabmap/rtabmap/landmark_angular_variance: 9999.0
 * /rtabmap/rtabmap/landmark_linear_variance: 0.0001
 * /rtabmap/rtabmap/map_frame_id: map
 * /rtabmap/rtabmap/odom_frame_id:
 * /rtabmap/rtabmap/odom_frame_id_init:
 * /rtabmap/rtabmap/odom_sensor_sync: False
 * /rtabmap/rtabmap/odom_tf_angular_variance: 0.001
 * /rtabmap/rtabmap/odom_tf_linear_variance: 0.001
 * /rtabmap/rtabmap/publish_tf: True
 * /rtabmap/rtabmap/queue_size: 10
 * /rtabmap/rtabmap/scan_cloud_max_points: 0
 * /rtabmap/rtabmap/subscribe_depth: True
 * /rtabmap/rtabmap/subscribe_odom_info: True
 * /rtabmap/rtabmap/subscribe_rgb: True
 * /rtabmap/rtabmap/subscribe_rgbd: False
 * /rtabmap/rtabmap/subscribe_scan: False
 * /rtabmap/rtabmap/subscribe_scan_cloud: False
 * /rtabmap/rtabmap/subscribe_scan_descriptor: False
 * /rtabmap/rtabmap/subscribe_stereo: False
 * /rtabmap/rtabmap/subscribe_user_data: False
 * /rtabmap/rtabmap/wait_for_transform_duration: 0.2

Realsense Startup Parameters

PARAMETERS
 * /camera/realsense2_camera/accel_fps: 250
 * /camera/realsense2_camera/accel_frame_id: camera_accel_frame
 * /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...
 * /camera/realsense2_camera/align_depth: True
 * /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/allow_no_texture_points: False
 * /camera/realsense2_camera/base_frame_id: camera_link*
 * /camera/realsense2_camera/calib_odom_file:
 * /camera/realsense2_camera/clip_distance: -1.0
 * /camera/realsense2_camera/color_fps: 15
 * /camera/realsense2_camera/color_frame_id: camera_color_frame
 * /camera/realsense2_camera/color_height: 480
 * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
 * /camera/realsense2_camera/color_width: 640
 * /camera/realsense2_camera/confidence_fps: 30
 * /camera/realsense2_camera/confidence_height: 480
 * /camera/realsense2_camera/confidence_width: 640
 * /camera/realsense2_camera/depth_fps: 15
 * /camera/realsense2_camera/depth_frame_id: camera_depth_frame
 * /camera/realsense2_camera/depth_height: 480
 * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
 * /camera/realsense2_camera/depth_width: 640
 * /camera/realsense2_camera/device_type:
 * /camera/realsense2_camera/enable_accel: True
 * /camera/realsense2_camera/enable_color: True
 * /camera/realsense2_camera/enable_confidence: True
 * /camera/realsense2_camera/enable_depth: True
 * /camera/realsense2_camera/enable_fisheye1: False
 * /camera/realsense2_camera/enable_fisheye2: False
 * /camera/realsense2_camera/enable_fisheye: True
 * /camera/realsense2_camera/enable_gyro: True
 * /camera/realsense2_camera/enable_infra1: True
 * /camera/realsense2_camera/enable_infra2: True
 * /camera/realsense2_camera/enable_infra: False
 * /camera/realsense2_camera/enable_pointcloud: False
 * /camera/realsense2_camera/enable_pose: False
 * /camera/realsense2_camera/enable_sync: True
 * /camera/realsense2_camera/filters:
 * /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f...
 * /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o...
 * /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f...
 * /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o...
 * /camera/realsense2_camera/fisheye_fps: 15
 * /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
 * /camera/realsense2_camera/fisheye_height ...
(more)
edit retag flag offensive close merge delete

Comments

You may not enough karma to upload an image, can you add a link to image uploaded somewhere else?

matlabbe gravatar image matlabbe  ( 2023-03-22 10:36:42 -0600 )edit

Thanks - I've added a link

MarkRobotics gravatar image MarkRobotics  ( 2023-03-24 06:12:27 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-03-24 13:18:53 -0600

matlabbe gravatar image

When the bottom of the point cloud doesn't align with the XY map plane, it means either rtabmap is not using the base frame of your robot, or the Z value of TF between base frame and camera frame is wrong.

Is this used on a robot? Set rtabmap's frame_id to base_footprint or base_link (the base frame of your robot directly on the floor) if it is not already done. If the base frame is already the right one, adjust TF or URDF between the base frame of the robot and the camera base frame.

edit flag offensive delete link more

Comments

Hi Thanks for this - I've updated the question with more information re: your comments here. At the moment the camera isn't connected to the robot. Well not in the TF sense. Just realsense and rtabmap running.

I was looking at the camera_*_optical_frame - which might be the cause - though I'm not sure why given I'm using the scripts out of the box without any modification to try and understand where this problem is coming from. I've added a screen shot of this too.

Thanks

Mark

MarkRobotics gravatar image MarkRobotics  ( 2023-03-26 02:20:30 -0600 )edit

In TF tree, the base frame is camera_frame, so it is normal that half of the image is below the XY plane. When you will be on a robot, you may have a frame base_link->camera_frame with z=0.5 meters for example, which will make the bottom of the cloud matching the XY plane if rtabmap is using base_link. You can simulate this with only the camera, by publishing: rosrun tf static_transform_publisher 0 0 0.5 0 0 0 base_link camera_link 100 then set frame_id of rtabmap to base_link instead of camera_link.

matlabbe gravatar image matlabbe  ( 2023-03-27 12:57:42 -0600 )edit

Thanks - That's done the job. Thanks for your help

MarkRobotics gravatar image MarkRobotics  ( 2023-03-27 16:20:09 -0600 )edit

Question Tools

Stats

Asked: 2023-03-20 10:06:38 -0600

Seen: 78 times

Last updated: Mar 26 '23