I'm having a problem where RTAB-Map incorrectly projects the depthcloud / mapdata directly above the robot, as shown:
I'm currently using RTAB-Map with a disparity_to_depth nodelet and subscribe_depth=true, but I get the same results if I set subscribe_stereo=true instead.
I believe there are no problems with the frame transforms set up on the robot; RVIZ shows the orientation of the head_caml frame correct relative to the other frames and to base_link, and rqt_tf_tree shows that the transform tree is not broken.
I can 'fix' this by using a static transform between head_caml / head_camr and base_link as described here, but this means that movements in the robot's head are not detected by RTAB-Map (and as far as I can tell this shouldn't be necessary anyway).
I've verified that the frame_id of the image_rect, camera_info, and depth topics are all set to head_caml
I've tried setting the parameters Mem/UseOdomGravity and Odom/AlignWithGround to true
I've tried setting the odom_frame_id parameter instead of subscribing to the odometery topic
I'm not sure what else to try / what else could be misconfigured to be causing this? Any help is greatly appreciated.