This post was updated on .
Hi, I've been trying to run a .bag file on RTABMAP using data_recorder.launch as explained here, but my RTABMAP never seems to get readings from my published topics. This is what the output is when I run
rosbag play mybag.bagandroslaunch rtabmap_ros data_recorder.launch subscribe_depth:=true subscribe_odometry:=true subscribe_laserScan:=false frame_id:=base_link publish_tf:=true odom_frame_id:=odom odom_topic:=/odometry/filtered scan_topic:=/jn0/base_scan rgb_topic:=/camera/rgb/image_rect_color rgb_info_topic:=/camera/rgb/camera_info depth_topic:=/camera/depth_registered/image_rawimmediately after: core service [/rosout] found
|
FIXED:
I remade the .bag file while subscribed to more topics and for some reason it worked. Thanks :) |
Administrator
|
Hi,
When replaying a bag with TF inside, don't forget to set "use_sim_time" to true after roscore is started and use "--clock" argument when playing the bag: $ roscore $ rosparam set use_sim_time true $ roslaunch rtabmap_ros data_recorder.launch subscribe_odometry:=true odom_topic:=/odometry/filtered $ rosbag play --clock my_bag.bag cheers |
Hi,
I have exactly the same problem. I've recorded topics: /camera/rgb/image_rect_color, /camera/depth_registered/image_raw, /camera/rgb/camera_info while running roslaunch openni2_launch openni2.launch depth_registration:=true Then I tried to convert data to .db as you explained (using data_recorder.launch) but I see exactly same messages as OP, and after replaying bag, when I try to view database in rtabmap_DatabaseViewer, it looks like it's empty. RTAB_map standalone also doesn't want to use that database as a source displaying "RTAB-Map cannot run with an uncalibrated camera. Do you want to calibrate the camera now?". When I click yes it says: "Cannot calibrate database source!" I tried everything proposed in this topic and nothing seems to work. Please help. Thanks in advance. - Luke |
Administrator
|
Hi,
I just fixed a small issue with data_recorder.launch. Either download/update to new version, or if you are using 0.11.8 binaries, launch it with "stereo_approx_sync:=true": $ roslaunch openni2_launch openni2.launch depth_registration:=true $ roslaunch rtabmap_ros data_recorder.launch stereo_approx_sync:=true Make sure you see "rtabmap (X): Rate=....." log messages after "rtabmap 0.11.8 started..." indicating that rtabmap is recording: /data_recorder subscribed to (approx sync): /camera/rgb/image_rect_color, /camera/depth_registered/image_raw, /camera/rgb/camera_info [ INFO] [1472927279.672705258]: rtabmap 0.11.8 started... [ INFO] [1472927280.232221818]: rtabmap (1): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0060s, Maps update=0.0001s pub=0.0001s (local map=0, WM=1) [ INFO] [1472927280.265272217]: rtabmap (2): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0101s, Maps update=0.0001s pub=0.0000s (local map=0, WM=2) [ INFO] [1472927280.296826358]: rtabmap (3): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0086s, Maps update=0.0001s pub=0.0000s (local map=0, WM=2) [ INFO] [1472927280.333368809]: rtabmap (4): Rate=0.00s, Limit=0.000s, RTAB-Map=0.0080s, Maps update=0.0001s pub=0.0000s (local map=0, WM=2) ... The calibration message is wrong, it should not be shown if the database is empty. I fixed this too. The warning you will have if the databse is empty is: "No more images... The camera has reached the end of the stream." cheers, Mathieu |
Thank you for your fast response.
I updated rtabmap_ros package and now data_recorder works correctly for me. But now other problem has arisen: when I record .db with data_recorder.launch I would like to later use it in RTAB-Map as a source to generate .ply file. But standalone app version now does not match the package version (standalone 0.11.8, package 0.11.10) and I can't use .db created by data_recorder.launch in standalone. I get following error message in console: [ERROR] (2016-09-05 10:58:33.327) DBDriverSqlite3.cpp:380::connectDatabaseQuery() Opened database version (0.11.10) is more recent than rtabmap installed version (0.11.8). Please update rtabmap to new version! But RTAB-Map is up to date. (That's the message I get when I try to pull origin master from git) So my question is: Is there any way to make rtabmap.launch use my database as source? |
Administrator
|
Hi,
It is strange that rtabmap_ros is on 0.11.10 and rtabmap is on 0.11.8 (as rtabmap_ros 0.11.10 requires rtabmap 0.11.10 to actually build)!? Master branch of rtabmap at this time is 0.11.10. You may have a "rtabmap" version 0.11.10 built somewhere, see where you installed it (on the "$ make install"). To play a database under ROS, you may use the not documented rtabmap_ros/data_player node: $ roslaunch rtabmap_ros rtabmap.launch $ rosrun rtabmap_ros data_player _database:=~/.ros/output.db _frame_id:=/camera_link rgb/image:=/camera/rgb/image_rect_color depth_registered/image:=/camera/depth_registered/image_raw rgb/camera_info:=/camera/rgb/camera_info Well, if you stay under ROS, you would have more options with a rosbag (format is more general too). cheers |
Free forum by Nabble | Edit this page |