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

Revision history [back]

click to hide/show revision 1
initial version

Hi, this is not a rtabmap issue, you should make sure that TF from the frame_id (default base_link) used in rtabmap to your camera frame represents the reality. The camera orientation in TF may be wrong.

You can debug this without rtabmap, just show up TF and the camera point cloud in rviz, set the fixed frame in rviz global options to your robot base frame and the floor should be aligned with rviz grid. If not adjust TF between your base frame and camera frame.

cheers,
Mathieu

Hi, this is not a rtabmap issue, you should make sure that TF from the frame_id (default base_link) used in rtabmap to your camera frame represents the reality. The camera orientation in TF may be wrong.

You can debug this without rtabmap, just show up TF and the camera point cloud in rviz, set the fixed frame in rviz global options to your robot base frame and the floor should be aligned with rviz grid. If not adjust TF between your base frame and camera frame.

EDIT Based on the rosbag shared, I can see the recorded map cloud is wrong, but if I re-run rtabmap with the following command, the clouds are correctly aligned with the ground:

roslaunch rtabmap_ros rtabmap.launch \
   args:="-d --RGBD/NeighborLinkRefining true --Reg/Strategy 1 --Grid/FromDepth true --Grid/FlatObstacleDetected true" \
   depth_topic:=/camera/aligned_depth_to_color/image_raw \
   rgb_topic:=/camera/color/image_raw \
   camera_info_topic:=/camera/color/camera_info \
   frame_id:=base_footprint \
   use_sim_time:=true \
   rviz:=true \
   namespace:=rtabmap2 odom_frame_id:=odom \
   visual_odometry:=false \
   subscribe_scan:=true \
   scan_topic:=/scan \
   rgbd_sync:=true \
   approx_rgbd_sync:=false

rosbag play --clock --pause 2019-11-22-12-22-00-out.bag

I created 2019-11-22-12-22-00-out.bag without /map tf frame using this script. I changed rtabmap namespace in the command above to not collide with already recorded rtabmap topic in the bag. image description

I noticed that there are just 5 /camera/aligned_depth_to_color/image_raw in the bag (over 80 sec). The jetson may have difficulty to record everything at full frame rate. When recording rosbags, I would record only the minimum topics to reproduce the problem.

cheers,
Mathieu

Hi, this is not a rtabmap issue, you should make sure that TF from the frame_id (default base_link) used in rtabmap to your camera frame represents the reality. The camera orientation in TF may be wrong.

You can debug this without rtabmap, just show up TF and the camera point cloud in rviz, set the fixed frame in rviz global options to your robot base frame and the floor should be aligned with rviz grid. If not adjust TF between your base frame and camera frame.

EDIT Based on the rosbag shared, I can see the recorded map cloud is wrong, but if I re-run rtabmap with the following command, the clouds are correctly aligned with the ground:

roslaunch rtabmap_ros rtabmap.launch \
   args:="-d --RGBD/NeighborLinkRefining true --Reg/Strategy 1 --Grid/FromDepth true --Grid/FlatObstacleDetected true" \
   depth_topic:=/camera/aligned_depth_to_color/image_raw \
   rgb_topic:=/camera/color/image_raw \
   camera_info_topic:=/camera/color/camera_info \
   frame_id:=base_footprint \
   use_sim_time:=true \
   rviz:=true \
   namespace:=rtabmap2 \
   odom_frame_id:=odom \
   visual_odometry:=false \
   subscribe_scan:=true \
   scan_topic:=/scan \
   rgbd_sync:=true \
   approx_rgbd_sync:=false

rosbag play --clock --pause 2019-11-22-12-22-00-out.bag

I created 2019-11-22-12-22-00-out.bag without /map tf frame using this script. I changed rtabmap namespace in the command above to not collide with already recorded rtabmap topic in the bag. image description

I noticed that there are just 5 /camera/aligned_depth_to_color/image_raw in the bag (over 80 sec). The jetson may have difficulty to record everything at full frame rate. When recording rosbags, I would record only the minimum topics to reproduce the problem.

cheers,
Mathieu