Add ZED SVO to MCAP conversion tool
This commit is contained in:
@@ -85,6 +85,8 @@ struct McapRecordConfig {
|
||||
std::string path{"capture.mcap"};
|
||||
std::string topic{"/camera/video"};
|
||||
std::string depth_topic{"/camera/depth"};
|
||||
std::string calibration_topic{"/camera/calibration"};
|
||||
std::string pose_topic{"/camera/pose"};
|
||||
std::string body_topic{"/camera/body"};
|
||||
std::string frame_id{"camera"};
|
||||
McapCompression compression{McapCompression::Zstd};
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace cvmmap_streamer::encode {
|
||||
struct RawVideoFrame {
|
||||
ipc::FrameInfo info{};
|
||||
std::uint64_t source_timestamp_ns{0};
|
||||
std::size_t row_stride_bytes{0};
|
||||
std::span<const std::uint8_t> bytes{};
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "cvmmap_streamer/encode/encoded_access_unit.hpp"
|
||||
#include "cvmmap_streamer/ipc/contracts.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
@@ -26,6 +27,31 @@ struct RawDepthMapView {
|
||||
std::span<const float> pixels{};
|
||||
};
|
||||
|
||||
struct RawDepthMapU16View {
|
||||
std::uint64_t timestamp_ns{0};
|
||||
std::uint32_t width{0};
|
||||
std::uint32_t height{0};
|
||||
std::span<const std::uint16_t> pixels{};
|
||||
};
|
||||
|
||||
struct RawCameraCalibrationView {
|
||||
std::uint64_t timestamp_ns{0};
|
||||
std::uint32_t width{0};
|
||||
std::uint32_t height{0};
|
||||
std::string_view distortion_model{};
|
||||
std::span<const double> distortion{};
|
||||
std::span<const double> intrinsic_matrix{};
|
||||
std::span<const double> rectification_matrix{};
|
||||
std::span<const double> projection_matrix{};
|
||||
};
|
||||
|
||||
struct RawPoseView {
|
||||
std::uint64_t timestamp_ns{0};
|
||||
std::string_view reference_frame_id{};
|
||||
std::array<double, 3> position{};
|
||||
std::array<double, 4> orientation{};
|
||||
};
|
||||
|
||||
struct RawBodyTrackingMessageView {
|
||||
std::uint64_t timestamp_ns{0};
|
||||
std::span<const std::uint8_t> bytes{};
|
||||
@@ -56,6 +82,15 @@ public:
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_depth_map(const RawDepthMapView &depth_map);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_depth_map_u16(const RawDepthMapU16View &depth_map);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_camera_calibration(const RawCameraCalibrationView &calibration);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_pose(const RawPoseView &pose);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_body_tracking_message(const RawBodyTrackingMessageView &body_message);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user