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:
Solution
path: 2022-11-04-11-15-49.bag
version: 2.0
duration: 46.4s
start: Nov 04 2022 11:15:49.22 (1667585749.22)
end: Nov 04 2022 11:16:35.63 (1667585795.63)
size: 12.6 GB
messages: 58270
compression: none [2695/2695 chunks]
types: autosense_msgs/PointCloud2Array [2c0cffba7f9769c409100238ca296e56]
autoware_msgs/DetectedObjectArray [c16aecef51c24c6808480a0295e47806]
bond/Status [eacc84bf5d65b6777d4c50f463dfb9c8]
diagnostic_msgs/DiagnosticArray [60810da900de1dd6ddd437c3503511da]
dynamic_reconfigure/Config [958f16a05573709014982821e6822580]
dynamic_reconfigure/ConfigDescription [757ce9d44ba8ddd801bb30bc456f946f]
geometry_msgs/PoseStamped [d3812c3cbc69362b77dc0b19b345f8f5]
gps_common/GPSFix [3db3d0a7bc53054c67c528af84710b70]
nav_msgs/Odometry [cd5e73d190d741a2f92e81eda573aca7]
novatel_oem7_msgs/BESTPOS [6d32934a60a2791025b60e069cbfca8d]
novatel_oem7_msgs/BESTUTM [81085b81554e0561bc4f238d99106138]
novatel_oem7_msgs/BESTVEL [bb8a62c8b51e23e4a78f36d98d54f228]
novatel_oem7_msgs/CORRIMU [c369b6c76ff4244e122a1e15992e928b]
novatel_oem7_msgs/HEADING2 [e524717d10ebc1f9d0fa13e770bd8510]
novatel_oem7_msgs/INSPVA [29f9ba1f809b13b4f0eed8681b50004b]
novatel_oem7_msgs/INSPVAX [ed91b0a9b45cec79c5555245c5db0a4e]
novatel_oem7_msgs/INSSTDEV [851f9e9652dfa8bbffe295e9951a3101]
novatel_oem7_msgs/Oem7RawMsg [a94527b8e879e77a9df182ab0d5df842]
novatel_oem7_msgs/TIME [54034bfc54ecd3d2e80c9b8665eb700c]
rosgraph_msgs/Log [acffd30cd6b6de30f120938c17c593fb]
sensor_msgs/CameraInfo [c9a58c1b0b154e0e6da7578cb991d214]
sensor_msgs/CompressedImage [8f7a12909da2c9d3332d540a0977563f]
sensor_msgs/Image [060021388200f6f0f447d0fcd9c64743]
sensor_msgs/Imu [6a62c6daae103f4ff57a132d6f95cec2]
sensor_msgs/LaserScan [90c7ef2dc6895d81024acba2ac42f369]
sensor_msgs/NavSatFix [2d3a8cd499b9b4a0249fb98fd05cfa48]
sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
tf2_msgs/TFMessage [94810edda583a504dfda3829e70d7eec]
theora_image_transport/Packet [33ac4e14a7cff32e7e0d65f18bb410f3]
velodyne_msgs/VelodyneScan [50804fc9533a0e579e6322c04ae70566]
visualization_msgs/Marker [4048c9de2a16f4ae8e0538085ebf1b97]
visualization_msgs/MarkerArray [d155b9ce5188fbaf89745847fd5882d7]
topics: /camera_fl/camera_info 347 msgs : sensor_msgs/CameraInfo
/camera_fl/image_raw 269 msgs : sensor_msgs/Image
/camera_fl/image_raw/compressed 340 msgs : sensor_msgs/CompressedImage
/camera_fl/image_raw/compressed/parameter_descriptions 1 msg : dynamic_reconfigure/ConfigDescription
/camera_fl/image_raw/compressed/parameter_updates 1 msg : dynamic_reconfigure/Config
/camera_fl/image_raw/compressedDepth/parameter_descriptions 1 msg : dynamic_reconfigure/ConfigDescription
/camera_fl/image_raw/compressedDepth/parameter_updates 1 msg : dynamic_reconfigure/Config
/camera_fl/image_raw/theora 349 msgs : theora_image_transport/Packet
/camera_fl/image_raw/theora/parameter_descriptions 1 msg : dynamic_reconfigure/ConfigDescription
/camera_fl/image_raw/theora/parameter_updates 1 msg : dynamic_reconfigure/Config
/camera_fl/image_rects 54 msgs : sensor_msgs/Image
/camera_fl/parameter_descriptions 1 msg : dynamic_reconfigure/ConfigDescription
/camera_fl/parameter_updates 1 msg : dynamic_reconfigure/Config
/detection/image_detector/objects 347 msgs : autoware_msgs/DetectedObjectArray
/detection/lidar_detector/objects 443 msgs : autoware_msgs/DetectedObjectArray
/detection/lidar_detector/objects_markers/arrow 456 msgs : visualization_msgs/MarkerArray
/detection/lidar_detector/objects_markers/boxes 909 msgs : visualization_msgs/MarkerArray
/detection/lidar_detector/objects_markers/centroids 913 msgs : visualization_msgs/MarkerArray
/detection/lidar_detector/objects_markers/hulls 455 msgs : visualization_msgs/MarkerArray
/detection/lidar_detector/objects_markers/label 911 msgs : visualization_msgs/MarkerArray
/detection/lidar_detector/objects_markers/models 910 msgs : visualization_msgs/MarkerArray
/detection/lidar_detector/points_cluster 449 msgs : sensor_msgs/PointCloud2
/diagnostics 89 msgs : diagnostic_msgs/DiagnosticArray (2 connections)
/ego_vehicle_pos 4558 msgs : visualization_msgs/Marker
/gnss_pose 2287 msgs : geometry_msgs/PoseStamped
/gps/fix 2291 msgs : sensor_msgs/NavSatFix
/gps/gps 2278 msgs : gps_common/GPSFix
/gps/imu 4533 msgs : sensor_msgs/Imu
/lidar_nodelet_manager/bond 274 msgs : bond/Status (4 connections)
/lidar_nodelet_manager_cloud/parameter_descriptions 1 msg : dynamic_reconfigure/ConfigDescription
/lidar_nodelet_manager_cloud/parameter_updates 1 msg : dynamic_reconfigure/Config
/lidar_nodelet_manager_driver/parameter_descriptions 1 msg : dynamic_reconfigure/ConfigDescription
/lidar_nodelet_manager_driver/parameter_updates 1 msg : dynamic_reconfigure/Config
/lidar_nodelet_manager_laserscan/parameter_descriptions 1 msg : dynamic_reconfigure/ConfigDescription
/lidar_nodelet_manager_laserscan/parameter_updates 1 msg : dynamic_reconfigure/Config
/novatel/oem7/bestpos 455 msgs : novatel_oem7_msgs/BESTPOS
/novatel/oem7/bestutm 46 msgs : novatel_oem7_msgs/BESTUTM
/novatel/oem7/bestvel 454 msgs : novatel_oem7_msgs/BESTVEL
/novatel/oem7/corrimu 4561 msgs : novatel_oem7_msgs/CORRIMU
/novatel/oem7/driver/bond 182 msgs : bond/Status (3 connections)
/novatel/oem7/heading2 46 msgs : novatel_oem7_msgs/HEADING2
/novatel/oem7/inspva 2299 msgs : novatel_oem7_msgs/INSPVA
/novatel/oem7/inspvax 46 msgs : novatel_oem7_msgs/INSPVAX
/novatel/oem7/insstdev 46 msgs : novatel_oem7_msgs/INSSTDEV
/novatel/oem7/odom 2278 msgs : nav_msgs/Odometry
/novatel/oem7/oem7raw 10264 msgs : novatel_oem7_msgs/Oem7RawMsg
/novatel/oem7/time 46 msgs : novatel_oem7_msgs/TIME
/pcd_transformed_two_cars_synched 424 msgs : sensor_msgs/PointCloud2
/rosout 440 msgs : rosgraph_msgs/Log (15 connections)
/rosout_agg 386 msgs : rosgraph_msgs/Log
/rslidar_points 456 msgs : sensor_msgs/PointCloud2
/scan 453 msgs : sensor_msgs/LaserScan
/segment/clouds_segmented 449 msgs : autosense_msgs/PointCloud2Array
/tf 9546 msgs : tf2_msgs/TFMessage (2 connections)
/transformed_innoviz_pub 454 msgs : sensor_msgs/PointCloud2
/transformed_velodyne_pub 432 msgs : sensor_msgs/PointCloud2
/velodyne_packets 453 msgs : velodyne_msgs/VelodyneScan
/velodyne_points 148 msgs : sensor_msgs/PointCloud2
/velodyne_points2 430 msgs : sensor_msgs/PointCloud2
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)"
Example
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
Experiments:
The web site of the robotsense Lidar: http://192.168.1.200/
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.
Questions:
/rslidar_packets
has stamp:stamp: secs: 0 nsecs: 0
- Sync with GPS time data
3 Test network issues
TODO
- 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
Comparison:
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.
Reference
[1] http://wiki.ros.org/rosbag/Commandline#rosbag_filter
[6] https://github.com/RoboSense-LiDAR/rslidar_laserscan
[9] 如何使用坐标变换功能