Add ZED SVO to MCAP conversion tool
This commit is contained in:
@@ -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