ouster-lidar / ouster-ros

Official ROS drivers for Ouster sensors (OS0, OS1, OS2, OSDome)
https://ouster.com
Other
124 stars 146 forks source link

Replaying a converted pcap file does not send messages to the expected topic #333

Closed CantLooseToAMoose closed 4 months ago

CantLooseToAMoose commented 5 months ago

Hello everyone,

I am trying to convert a .pcap file to a .bag file with the right format in order to be used by LIO-SAM. For this I have successfully converted the .pcap file to a .bag file using pcap-to-bag, but the messages only contain imu_packets and lidar_packets. I then tried to run the .bag file through an ouster_ros node in order to convert the messages to the right type. As I understood without connecting a sensor I can only use replay.launch but when I do this only the original messages get played, unlike the comment from @jaychandar in #13 might suggest.

I also tried to use an earlier version of ouster_ros tagged by pcap-to-bag found at tag 20210608]. When trying to run: roslaunch ouster_ros ouster.launch replay:=true metadata:=/home/gia/pcap_files/OS-1-128_122213002147_1024x10_20231220_145435.json

I get the following error:

WARNING: No data_format found. terminate called after throwing an instance of 'std::invalid_argument' what(): n_cols_of_lidar_mode [ERROR] [1716540121.173213767]: Calling config service failed

My metadata file looks like that:

{ "beam_intrinsics": { "beam_altitude_angles": [ 21.06, 20.74, 20.41, 20.11, 19.81, 19.49, 19.16, 18.84, 18.56, 18.22, 17.89, 17.57, 17.27, 16.94, 16.6, 16.28, 15.97, 15.64, 15.3, 14.97, 14.65, 14.31, 13.97, 13.65, 13.31, 12.98, 12.64, 12.3, 11.97, 11.63, 11.28, 10.94, 10.62, 10.26, 9.92, 9.57, 9.25, 8.89, 8.53, 8.2, 7.87, 7.51, 7.16, 6.81, 6.47, 6.11, 5.76, 5.42, 5.07, 4.71, 4.36, 4.02, 3.67, 3.3, 2.96, 2.6, 2.27, 1.9, 1.54, 1.19, 0.86, 0.5, 0.15, -0.22, -0.56, -0.91, -1.26, -1.62, -1.97, -2.32, -2.68, -3.03, -3.37, -3.73, -4.08, -4.44, -4.77, -5.14, -5.49, -5.84, -6.17, -6.52, -6.88, -7.23, -7.57, -7.9, -8.26, -8.62, -8.94, -9.3, -9.63, -9.98, -10.31, -10.66, -11.01, -11.34, -11.68, -12, -12.36, -12.7, -13.03, -13.36, -13.7, -14.04, -14.36, -14.69, -15.02, -15.37, -15.68, -16, -16.33, -16.66, -16.97, -17.3, -17.62, -17.95, -18.26, -18.57, -18.9, -19.22, -19.52, -19.82, -20.14, -20.45, -20.76, -21.06, -21.36, -21.68 ], "beam_azimuth_angles": [ 4.16, 1.34, -1.47, -4.27, 4.16, 1.36, -1.47, -4.26, 4.16, 1.35, -1.46, -4.25, 4.17, 1.36, -1.45, -4.26, 4.17, 1.37, -1.45, -4.26, 4.17, 1.37, -1.45, -4.24, 4.17, 1.38, -1.44, -4.23, 4.17, 1.38, -1.44, -4.24, 4.19, 1.37, -1.43, -4.24, 4.19, 1.38, -1.42, -4.24, 4.19, 1.39, -1.42, -4.22, 4.19, 1.39, -1.42, -4.22, 4.19, 1.39, -1.41, -4.22, 4.2, 1.39, -1.42, -4.22, 4.21, 1.4, -1.41, -4.22, 4.21, 1.39, -1.4, -4.22, 4.21, 1.41, -1.4, -4.2, 4.21, 1.41, -1.4, -4.2, 4.22, 1.41, -1.4, -4.2, 4.23, 1.4, -1.4, -4.2, 4.23, 1.42, -1.39, -4.19, 4.22, 1.43, -1.38, -4.2, 4.24, 1.42, -1.37, -4.17, 4.25, 1.42, -1.38, -4.17, 4.24, 1.44, -1.38, -4.18, 4.24, 1.44, -1.38, -4.18, 4.25, 1.44, -1.36, -4.18, 4.25, 1.44, -1.35, -4.17, 4.26, 1.44, -1.37, -4.17, 4.25, 1.45, -1.36, -4.16, 4.25, 1.45, -1.37, -4.17, 4.25, 1.46, -1.34, -4.16 ], "beam_to_lidar_transform": [ 1, 0, 0, 15.806, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ], "lidar_origin_to_beam_origin_mm": 15.806 }, "calibration_status": { "reflectivity": { "timestamp": "2022-04-05T19:08:00", "valid": true } }, "client_version": "ouster_client 0.9.0", "config_params": { "azimuth_window": [ 0, 360000 ], "columns_per_packet": 16, "lidar_mode": "1024x10", "multipurpose_io_mode": "OFF", "nmea_baud_rate": "BAUD_9600", "nmea_ignore_valid_char": 0, "nmea_in_polarity": "ACTIVE_HIGH", "nmea_leap_seconds": 0, "operating_mode": "NORMAL", "phase_lock_enable": false, "phase_lock_offset": 0, "signal_multiplier": 1, "sync_pulse_in_polarity": "ACTIVE_HIGH", "sync_pulse_out_angle": 360, "sync_pulse_out_frequency": 1, "sync_pulse_out_polarity": "ACTIVE_HIGH", "sync_pulse_out_pulse_width": 0, "timestamp_mode": "TIME_FROM_INTERNAL_OSC", "udp_dest": "169.254.89.45", "udp_port_imu": 7503, "udp_port_lidar": 7502, "udp_profile_imu": "LEGACY", "udp_profile_lidar": "RNG19_RFL8_SIG16_NIR16" }, "imu_intrinsics": { "imu_to_sensor_transform": [ 1, 0, 0, 6.253, 0, 1, 0, -11.775, 0, 0, 1, 7.645, 0, 0, 0, 1 ] }, "lidar_data_format": { "column_window": [ 0, 1023 ], "columns_per_frame": 1024, "columns_per_packet": 16, "pixel_shift_by_row": [ 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12, 12, 4, -4, -12 ], "pixels_per_column": 128, "udp_profile_imu": "LEGACY", "udp_profile_lidar": "RNG19_RFL8_SIG16_NIR16" }, "lidar_intrinsics": { "lidar_to_sensor_transform": [ -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 36.18, 0, 0, 0, 1 ] }, "sensor_info": { "build_date": "2023-07-14T19:57:51Z", "build_rev": "v2.5.2", "image_rev": "ousteros-image-prod-aries-v2.5.2+20230714195410", "initialization_id": 8247300, "prod_line": "OS-1-128", "prod_pn": "840-103575-06", "prod_sn": "122213002147", "status": "RUNNING" } }

What am i doing wrong?

Ubuntu 20.04 (running in a VM) OS-1 ros-noetic

CantLooseToAMoose commented 4 months ago

This has been fixed, refer to pcap-to-bag