introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
974 stars 557 forks source link

Static TF problem with filtered ROS bags? #170

Open fishcu opened 7 years ago

fishcu commented 7 years ago

Although I am pretty sure this is a bug somewhere in the ROS tools, I wanted to post it here as well. I asked about the original problem here: http://answers.ros.org/question/261187/bug-rosbag-filter-and-tf_static/

I use a Tango device to do mapping, which contains the camera frames in question.

Copy-paste from the link above: I am using a .bag file with RTAB-map ROS. It uses some static transforms between different camera frames. When I feed "data.bag" into RTAB-map, it works fine. Now, I create a dummy filtered rosbag, using:

rosbag filter data.bag data_filtered.bag "topic != '/thistopicdoesntexist'"

As this topic doesn't exist, it should create an identical .bag file. However, when I try to feed "data_filtered.bag" into RTAB-map, I get many errors like:

[ WARN] [1494031985.023853640, 1493939596.985478852]: Could not get transform from camera_depth to camera_color after 0.100000 seconds (for stamp=1493939594.615704)! Error=". canTransform returned after 0.10093 timeout was 0.1.".

  1. It seems that the filtered bag somehow is missing data from the static TF transforms. When I "rostopic echo -b data_filtered.bag", however, it shows that the static transforms are there.

Maybe the problem is related to the time stamp? In any case, I am using use_sim_time=true, and I am also using --clock when playing back the .bag files.

Any help would be appreciated.

Cheers,

fishcu commented 7 years ago

Update: An exemplary .bag file can be found here: https://www.dropbox.com/s/6ox0xq6ctg2b9jl/small_test.bag.tar.gz?dl=0

The launch file I use to launch RTAB-map can be found here: https://pastebin.com/ZhXb5r5U