Re: rosbag rtabmap_ros

Posted by Micke on
URL: http://official-rtab-map-forum.206.s1.nabble.com/rosbag-rtabmap-ros-tp248p264.html

Hello Mathieu,

When I run my freenect recorded bag files I'm able to subscribe to /rtabmap/odom topic and get Odometry messages from it either with my rospy script or rostopic echo /rtabmap/odom

But when I run rgbdslam bag files (I'm using: rgbd_dataset_freiburg1_360.bag) I couldn't be able to get any output from /rtabmap/odom,
neither with my rospy script nor rostopic echo /rtabmap/odom/pose/pose as you told me. The map in RVIZ is built without any problems all works fine,
except I can't get Odometry messages from rgbdslam bags.

This is my rospy script:

#!/usr/bin/env python
import rospy
from nav_msgs.msg import Odometry

def callback(odom_data):
    """
		The format of each time 'timestamp tx ty tz qx qy qz qw'.
    """
    position = odom_data.pose.pose.position
    orientation = odom_data.pose.pose.orientation
    data = ("%s.%s %s %s %s %s %s %s %s") % \
		(odom_data.header.stamp.secs,
		 odom_data.header.stamp.nsecs, 
		 position.x,
                 position.y,
		 position.z,
		 orientation.x,
		 orientation.y,
		 orientation.z,
		 orientation.w)
    print data


def listener():
	"""
		Subscribe to the topic: /rtabmap/odom
                Data type: nav_msgs/Odometry
                Method called: callback(Odometry)
	"""

	rospy.init_node('estimated_trajectory_listener', anonymous=True)
	rospy.Subscriber('/rtabmap/odom', Odometry, callback)
    # spin() simply keeps python from exiting until this node is stopped
	rospy.spin()

if __name__ == '__main__':
    listener()
 

Console output when I run rgbdslam bag files:

Input depth type is 32FC1, please use type 16UC1 for depth. The depth images will be processed anyway but with a conversion. This warning is only be printed once.

I'm using this launch for the rgbdslam datasets rgbdslam_datasets.launch

Are you able to get Odometry messages from rgbdslam bag datasets ?

Cheers,
Micke.