How to handle multiple tf_static transformation when play bag file

asked 2018-11-21 22:14:19 -0500

AutoCar gravatar image


In my system, tf_static has 3 transformations, base_link->base_imu, base_link->laser, base_link->base_footprint. I recorded a bag file, but when I played it, "rostopic echo tf_static" only showed base-link->base_footprint transformation. I did some google search, and found when playing bag files, tf_static can publish only when transformation. Since I am missing the transformation from base_link to Laser, one of my node did not work.

Accutally, for the whole system, I only need base_link->laser, I do not need the other two transformations from tf_static. I think I have two options to solve my problem with bag file:

  1. Remove base_link->base_imu and base_link->base_footprint from tf_static. After that, since there is only one transformation base_link->laser, tf_static should publist the base_link->laser transformation. That node should work with bag files.
  2. When using bag files, I can publish a addtional base_link->laser static tf transformation myself.

I do not know how to impleent either of them. Anyone can help?


edit retag flag offensive close merge delete