ouster-lidar / ouster-sdk

Ouster, Inc. sample code
Other
468 stars 440 forks source link

Ouster record feature using sdk in c++ #573

Closed Bookiebookie closed 10 months ago

Bookiebookie commented 10 months ago

Hi, would there be a example of recording? I am using it in the following way, and it records. However, when I replay it in outser studio, it blinks in a way that a frame would render the left side and then right side with a bit time difference

pcapWriterPtr = std::make_unique<ouster::sensor_utils::PcapWriter>(
                        recording_file, ouster::sensor_utils::PcapWriter::PacketEncapsulation::ETHERNET, 1500);
saveMetadataFile(recording_file_metadata);
if( pcapWriterPtr){
                pcapWriterPtr->write_packet(lidar_packet.buf.data(), pf.lidar_packet_size, m_source_ip, m_destination_ip, m_source_port, m_destination_port, sensor_utils::packet_info::ts{lidar_packet.host_timestamp/1000});
            }

Platform (please complete the following information):