Time synchronization

1 Rosbag data

1.1 Check rosbag

We save two rosbag data before:

-rwxrwxrwx 1 zhaoliang zhaoliang 13553022357 Nov  4 11:16 2022-11-04-11-15-49.bag
-rwxrwxrwx 1 zhaoliang zhaoliang 14309340110 Nov  4 11:37 2022-11-04-11-36-20.bag

They are too big: 13.6GB and 14.3GB

Therefore, we can check the information of rosbag:

rosbag info 2022-11-04-11-15-49.bag

We got:

1.2 Filter rosbag

Filter topic

rosbag filter my.bag only-tf.bag "topic == '/tf'"

Filter multiple topics

rosbag filter input.bag output.bag "topic == '//velodyne_points' or topic =='/velodyne_points' or topic == '/pcd_transformed_two_cars_synched'"

Filter time

rosbag filter input.bag output.bag "t.to_sec() <= 1284703931.86"

Filter time and topic

rosbag filter input.bag output.bag "topic == '/odometry/gps' and t.to_sec() <= 1284703931.86"
# or 
rosbag filter input.bag output.bag "(topic == '/velodyne_point_cloud' or topic =='/visensor/imu' or topic == '/visensor/left/image_raw') and (t.to_sec() >= 1506117983.884751 and t.to_sec() <= 1506118069.884751)"


rosbag filter 2022-11-04-11-15-49.bag 2022-11-04-11-15-49-sub1.bag "t.to_sec()<=1667585759.63"

2 Test single Lidar

  • Find out time related topics:
  • /velodyne_packets

  • no /rslidar_packets since in the /home/zhaoliang/ros_zzl/catkin_ws/src/rslidar_sdk/config.yaml

      send_packet_ros: false #true: Send packets through ROS or ROS2(Used to record packet) 
  • /gps/gps

  • Figure out the time in velodyne lidar topic


  • The web site of the robotsense Lidar:

  • Use ros_scan package to get the lidar ring data, from top to bottom.

  • change the phase lock settings and save the rosbag (0,90,135,270)

  • Want to find out the start point and end point of the robosense Lidar

  • If the axes are displayed, the X axis is indicated in red, the Y axis is indicated in green, and the Z axis is indicated in blue.


  • /rslidar_packets has stamp:

          secs: 0
          nsecs:   0
  • Sync with GPS time data

3 Test network issues


  • Download the dair-v2x data, run their code and see how's it going
  • Get the 3D bounding box detection algorithm working (talk to Zonglin)
  • Sharing the late fusion amount the whole network
  • Check the tf and get it to work
  • Check the intersection camera
  • Converted rostopic to the yaml/txt files
  • Converted ROS time to standard time.

Experiment 1:

Under the same network

  • ROS core running on laptop 1, with different distance and see how’s the delay going

  • ROS core running on laptop 2, with different distance and see how’s the delay going


  • ROS running separately on both laptop 1 and 2, check the time delay problem

Experiment 2:

Check what cause the huge time difference problem when using two lidar cameras:

  • Web settings problem: under the same repo, change the settings to the GPS+PTP

  • Repo problem: using the same GPS web parameters settings, and check the lidar data under the different repo.

Conclusion: The reason is because of the repo. The new repo doesn’t have this kind of problem.


[1] http://wiki.ros.org/rosbag/Commandline#rosbag_filter

[2] VLP-32c User Manual

[3] robosense rs-ruby pdf

[4] RS-RUBY PLUS user manual

[5] robotsense RS-Helios

[6] https://github.com/RoboSense-LiDAR/rslidar_laserscan

[7] Robosense速腾激光雷达如何使用多雷达

[8] Robosense速腾激光雷达使用坐标变换功能

[9] 如何使用坐标变换功能