ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to add static transform with right timestamp to rosbag?

asked 2018-09-09 16:43:37 -0600

Hakaishin gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-09-10 07:34:02 -0600

Hakaishin gravatar image

The problem was that I was using the tf2_ros package instead of the tf package, changing that and adding a publishing frequency at the end did the trick and I have the transforms with the right timestamps

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-09-09 16:43:37 -0600

Seen: 1,261 times

Last updated: Sep 10 '18