Closed jcremona closed 6 months ago
Hi, @jcremona, I am sure you have got the problem solved but hopefully my answer will help others. To convert GNSS time to ROS time, the function chain should be gpst2time
=> time2sec
=> ros::Time
. If you need to compensate for leap seconds in order to work with other sensors, simply add gpst2utc
between the first and second step.
Thanks for sharing your impressive work! I am trying to make a rosbag from a .ubx file using ublox_driver (duration is ~90 minutes). After running ublox_driver and![Screenshot from 2022-11-18 11-04-43](https://user-images.githubusercontent.com/3181393/202723002-a8722736-2319-4cc0-b756-2e430f5f94cd.png)
rosbag record -a
, I obtain this rosbag:I would like to modify the rosbag to use it online. The easiest way would be to replace message timestamps with header timestamps. Unfortunately, only
/ublox_driver/receiver_lla
has a header with a timestamp. So, what would be the right way of getting a timestamp for the rest of the topics to rewrite the rosbag?gnss_comm
has several functions to convert from GNSS time totime_t
, but I am not sure about the msg fields I have to use to make this conversion.