Bug? Rosbag filter and /tf_static
Hi all
I am using a .bag file with RTAB-map ROS. It uses some static transforms between different camera frames to do the mapping.
Edit: An example bag file that shows the buggy behavior can be downloaded here: https://www.dropbox.com/s/6ox0xq6ctg2...
The launch file to launch RTAB-Map can be found here: https://pastebin.com/ZhXb5r5U
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.".
- 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.
- It seems that the dummy filtering actually alters the .bag. Both MD5 hash and file size are changed between "data.bag" and "data_filtered.bag"! No compression is used. Why is that?
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,
- ibd
Do you have a small rosbag to share?
Updated the original post with a bag file and the launch file I use to launch RTAB-map.
This looks similar to https://github.com/ros/ros_comm/issue...
ahendrix, it seems related indeed. Is there a clean fix for the .bag files I already have? Maybe changing the timestamp of the tf_static topic messages? Another idea I have is to setup a bunch of static_transform publishers. But, it would be a bit tedious for my workflow...
I tested the small bag and I can reproduce the problem in RVIZ too: when selecting Fixed Frame option, the static transforms won't show up in the pop-up menu with the "filtered" bag. Like ahendrix pointed out, it is like the static transforms are not latched anymore after filtering.