How to use a bag of pointclouds with no tf topic included?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use a bag of pointclouds with no tf topic included?

Mikor
This post was updated on .
Hi Mathieu,

after I did some experiments  with ICP odometry on demo data, I am interested in using some bags that was recorded with my sensors. The bag contains the following.
version:     2.0
duration:    12.2s
start:       Nov 01 2019 15:44:32.98 (1572615872.98)
end:         Nov 01 2019 15:44:45.19 (1572615885.19)
size:        48.7 MB
messages:    2862
compression: none [55/55 chunks]
types:       econcameras/vidName     [2c4b6b3be7c361db11fabee428157fca]
             nav_msgs/Odometry       [cd5e73d190d741a2f92e81eda573aca7]
             sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
topics:      /econ_vid               329 msgs    : econcameras/vidName    
             /realsense_publisher   2423 msgs    : nav_msgs/Odometry      
             /velodyne_points        110 msgs    : sensor_msgs/PointCloud2


as you can see there is no tf topic so I can not use that, after many google searches I did not find a way to import a tf_static message with success. All I did was to use a static_transform_publisher with parent frame a base_link and child frame the velodyne sensor, after that I played the bag and another bag recorded the published topics and I got as a result the following bag, with the not related topics filtered out, so now it includes the following. The number of msgs are not in sync with the previous example because it comes from a different bag file recorded the same way.
types:       sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
             tf2_msgs/TFMessage      [94810edda583a504dfda3829e70d7eec]
topics:      /tf_static           1 msg     : tf2_msgs/TFMessage     
             /velodyne_points   139 msgs    : sensor_msgs/PointCloud2


After that, I used the new bag but the sensors' timestamps were not in sync. So all I got was the following error.

TF of received scan cloud at time 1572615527.044429s is not set, aborting rtabmap update.

I set the aprox_sync as true because I was desperate but I do not think that would make any difference because I believe the use of it was not intended for tf messages. Anyway here is the rqt_graph, I believe everything looks good so I assume that the only thing that keeps it from actually running are the timestamps, what do you think ??



P.S. The next step is to use the nav_msgs as an odometry topic, in order to do that all I have to subscribe rtabmap_ros' odom_topic to /nav_msgs and include the realsense in the tf tree right ?

That's all for now..!



Reply | Threaded
Open this post in threaded view
|

Re: How to use a bag of pointclouds with no tf topic included?

matlabbe
Administrator
Hi,

tf_static from a rosbag is not latched. It means that you should make sure to start rtabmap before starting the rosbag so that rtabmap can catch the tf_static topic (published only one time a the beginning).

You you want to use T265 odometry, you could indeed feed its odometry topic to rtabmap. Make sure to link in TF the camera and velodyne.

cheers,
Mathieu