Re: Read bag file using rtabmap_ros issue

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Read-bag-file-using-rtabmap-ros-issue-tp3995p3996.html

Hi,

Did you start the bag? You would have the warning message until the recorder is receiving topics.

$ rosbag play demo_mapping.bag

Not sure of your rtabmap version, but you may use subscribe_scan instead of subscribe_laserScan to record scans too:

$ roslaunch rtabmap_ros data_recorder.launch subscribe_depth:=true subscribe_odometry:=true subscribe_scan:=true frame_id:=base_link odom_topic:=/az3/base_controller/odom scan_topic:=/jn0/base_scan rgb_topic:=data_throttled_image rgb_info_topic:=data_throttled_camera_info  depth_topic:=data_throttled_image_depth rgb_image_transport:=compressed depth_image_transport:=compressedDepth
...
/data_recorder subscribed to (approx sync):
   /az3/base_controller/odom,
   /data_throttled_image/compressed,
   /data_throttled_image_depth/compressedDepth,
   /data_throttled_camera_info,
   /jn0/base_scan
[ INFO] [1513619353.693507613]: rtabmap 0.15.3 started...
[ WARN] [1513619358.684594117]: /data_recorder: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10).
/data_recorder subscribed to (approx sync):
   /az3/base_controller/odom,
   /data_throttled_image/compressed,
   /data_throttled_image_depth/compressedDepth,
   /data_throttled_camera_info,
   /jn0/base_scan
[ WARN] [1513619363.517290879]: Could not get transform from base_link to /openni_rgb_optical_frame after 0.200000 seconds (for stamp=1368730003.413204)! Error="Lookup would require extrapolation into the past.  Requested time 1368730003.413204402 but the earliest data is at time 1368730003.821057617, when looking up transform from frame [openni_rgb_optical_frame] to frame [base_link]. canTransform returned after 0.202425 timeout was 0.2.".
[ERROR] [1513619363.517357298]: TF of received image 0 at time 1368730003.413204s is not set!
[ERROR] [1513619363.517409888]: Could not convert rgb/depth msgs! Aborting rtabmap update...
[ WARN] [1513619363.721504210]: Could not get transform from base_link to /openni_rgb_optical_frame after 0.200000 seconds (for stamp=1368730003.513340)! Error="Lookup would require extrapolation into the past.  Requested time 1368730003.513339798 but the earliest data is at time 1368730003.821057617, when looking up transform from frame [openni_rgb_optical_frame] to frame [base_link]. canTransform returned after 0.202122 timeout was 0.2.".
[ERROR] [1513619363.721562108]: TF of received image 0 at time 1368730003.513340s is not set!
[ERROR] [1513619363.721596260]: Could not convert rgb/depth msgs! Aborting rtabmap update...
[ INFO] [1513619363.812945173]: rtabmap (1): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0197s, Maps update=0.0017s pub=0.0004s (local map=1, WM=1)
[ INFO] [1513619363.953656603]: rtabmap (2): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0209s, Maps update=0.0001s pub=0.0000s (local map=2, WM=2)
[ INFO] [1513619364.064798322]: rtabmap (3): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0178s, Maps update=0.0001s pub=0.0000s (local map=2, WM=2)
[ INFO] [1513619364.204226352]: rtabmap (4): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0185s, Maps update=0.0001s pub=0.0000s (local map=2, WM=2)
[ INFO] [1513619364.337849617]: rtabmap (5): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0190s, Maps update=0.0001s pub=0.0000s (local map=2, WM=2)
[ INFO] [1513619364.414603293]: rtabmap (6): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0195s, Maps update=0.0001s pub=0.0000s (local map=2, WM=2)
[ INFO] [1513619364.541735044]: rtabmap (7): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0184s, Maps update=0.0001s pub=0.0000s (local map=2, WM=2)
[ INFO] [1513619364.674544171]: rtabmap (8): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0174s, Maps update=0.0001s pub=0.0000s (local map=2, WM=2)