Synch problem with rosbag and rqt_plot
Hi All,
I'm building a pose estimator and to assess it i'm using a ground truth from a vicon system.
Both systems publish a PoseStamped
message. When I rosbag play
a dataset and I try to visualize it wit rqt_plot
it seems like the two signals have different velocities. At the beginning they are synchronized but since one of the two is "faster" than the other, the effect is that it seems stretching with respect to the other. The two sources publish with a different frequency (vicon is 100 Hz, the other is like 200 Hz) but I thought that ROS was taking care of the synch between messages. Furthermore there are absolute timestamps! Any ideas?
I'm running Hydro with Ubuntu 12.04. I tried different graphic backends but nothing changes.
EDIT:
even using simulation time with rosparam set /use_sim_time true
seems to work (actually the plot wit PyQtGraph has a line that restart from the beginning so maybe the sim time param is not effective
EDIT 2:
we found some synchronization problems inside one of the two computers. We corrected them using Chrony, but the stretching problem still remains.
What we actually discovered is that during the real execution the to topics are perfectly synchronized (we checked during the execution with side by side terminals rostopic echo
for both topics. Instead, when we do a rosbag play
the timestamps are different!!! And one of the two has a time that flows SLOWER!!!
I use, as suggested rosbag play --clock -l mybag.bag
with use_sim_time
set as true
Thanks in advance.