kinectrosodometry

Is there a topic or service to know when visual odometry estimation is lost in RTAB-MAP?


I am using rtabmap to estimate odometry from visual slam. When odometry is lost, the rtabmapviz screen becomes red. I am looking for one way to know when I lose odometry in my code e.g. a topic to subscribe or something like that.

Thanks for your help

(edit)

I am using ROS kinetic and the following launch files:

roslaunch freenect_launch freenect.launch depth_registration:=true

roslaunch rtabmap_ros rtabmap.launch localization:=true rtabmapviz:=false rviz:=true 

Solution

  • Based on your question, I assume you're using the rtabmap_ros pkg, specifically one of the Visual Camera/Lidar Odometry nodes. They all publish the topic odom (nav_msgs/Odometry) and the topic odom_info (rtabmap_ros/OdomInfo). In the rtabmap_ros/OdomInfo msg, is the element bool lost, which reports if the current odometry is lost or not. Also, the null transform is published on the topic odom instead of the (lost) odometry (by default, param option).