feat(zed): recover corrupted frame gaps in MCAP export
Make ZED MCAP export skip corrupted frame runs until recovery and treat unreadable tail frames as end-of-stream instead of hard failing conversion. Update bundled nearest-mode export to emit partial bundles during corruption gaps, extend BundleManifest with explicit member status and skipped-frame counts, and only write payload messages for present cameras. Tighten batch probing so bundled MCAP validation checks /bundle coverage and per-camera message counts, and improve failure excerpts to include stderr tail output. Also add a local cppzmq CMake fallback, refresh the multi-record tester for the new bundle schema, and document the mixed NVENC limitations in the README.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
@@ -19,6 +20,16 @@ enum class DepthEncoding {
|
||||
RvlF32,
|
||||
};
|
||||
|
||||
enum class BundlePolicy {
|
||||
Nearest,
|
||||
Strict,
|
||||
};
|
||||
|
||||
enum class BundleMemberStatus {
|
||||
Present,
|
||||
CorruptedGap,
|
||||
};
|
||||
|
||||
struct RawDepthMapView {
|
||||
std::uint64_t timestamp_ns{0};
|
||||
std::uint32_t width{0};
|
||||
@@ -57,6 +68,21 @@ struct RawBodyTrackingMessageView {
|
||||
std::span<const std::uint8_t> bytes{};
|
||||
};
|
||||
|
||||
struct RawBundleMemberView {
|
||||
std::string_view camera_label{};
|
||||
BundleMemberStatus status{BundleMemberStatus::Present};
|
||||
std::optional<std::uint64_t> timestamp_ns{};
|
||||
std::int64_t delta_ns{0};
|
||||
std::uint32_t corrupted_frames_skipped{0};
|
||||
};
|
||||
|
||||
struct RawBundleManifestView {
|
||||
std::uint64_t timestamp_ns{0};
|
||||
std::uint64_t bundle_index{0};
|
||||
BundlePolicy policy{BundlePolicy::Nearest};
|
||||
std::span<const RawBundleMemberView> members{};
|
||||
};
|
||||
|
||||
struct McapRecordStreamConfig {
|
||||
std::string topic{"/camera/video"};
|
||||
std::string depth_topic{"/camera/depth"};
|
||||
@@ -137,7 +163,8 @@ public:
|
||||
[[nodiscard]]
|
||||
static std::expected<MultiMcapRecordSink, std::string> create(
|
||||
std::string path,
|
||||
McapCompression compression);
|
||||
McapCompression compression,
|
||||
std::string bundle_topic = "/bundle");
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<StreamId, std::string> add_stream(
|
||||
@@ -179,6 +206,10 @@ public:
|
||||
StreamId stream_id,
|
||||
const RawPoseView &pose);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_bundle_manifest(
|
||||
const RawBundleManifestView &bundle);
|
||||
|
||||
[[nodiscard]]
|
||||
std::expected<void, std::string> write_body_tracking_message(
|
||||
StreamId stream_id,
|
||||
|
||||
Reference in New Issue
Block a user