How to add static transform with right timestamp to rosbag?
I saw this question and tried the first answer. My launch file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<launch>
<param name="use_sim_time" value="true" />
<node pkg="tf2_ros" type="static_transform_publisher" name="davis_camera" args="-0.029793949479807992 -0.00576132479343137 0.11578614371327833 0.20107065010341968 -0.1307783221491868 0.56686050120762888 -0.78812232317925601 davis camera ">
</node>
<node pkg="rosbag" type="record" name="rosbag_record" args="record -O /home/my_name/PycharmProjects/Project/bag/test.bag -a">
</node>
<node pkg="rosbag" type="play" name="rosbag_play" args="--clock /home/my_name/PycharmProjects/Project/bag/data.bag">
</node>
</launch>
but when I try to use lookuptransform on the bag I get the same error as in the question:
tf2.ExtrapolationException: Lookup would require extrapolation at time 1535537364.011644125, but only time 0.000000000 is in the buffer, when looking up transform from frame [vicon] to frame [camera]
Am I doing something wrong here or why doesn't it work?