Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 475

Rosbag API and TF transforming tools

$
0
0
I am currently writing some tools in Python to visually judge the quality of the odometry. For this I record a bag with odom topic as well as tf, lidar scans and wheel encoders. Then I loop over the bag data, read all poses from odom and project the lidar scans to cartesian coordinates in the odom frame using the odom pose with the **closest timestamp**. My odom is published at 100 Hz while the lidar scans are published at around 10 Hz so in worst case the time offset will be 5ms. I then plot all lidar scans for all poses and see how well they overlap (Similar to setting decay_time of lidar scans to a very big value in Rviz) Here is the result: ![image description](/upfiles/14919904558154573.png) Compared to Rviz (with big decay time) ![image description](/upfiles/14919904846373419.png) I noticed that my plot and the data displayed in Rviz (with a decay time covering all the length of the bag while doing rosbag play) looks slightly different. Especially when zooming on known features, for example the half circle: My plot: ![image description](/upfiles/14919905467122914.png) Rviz: ![image description](/upfiles/14919905625225916.png) The difference becomes very clear. When looking in the source code of Rviz I saw that it just transforms the lidar scan to a pointcloud and then uses TF to transform it to the correct frame. My question is how to do such a thing without having to play the bag, but only using the rosbag API, on Python? I suspect using the closest timestamp to be the source of error. Does TF interpolate to get the exact pose?

Viewing all articles
Browse latest Browse all 475

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>