feat(record): add raw ZED body MCAP capture
This commit is contained in:
@@ -362,6 +362,10 @@ std::expected<void, std::string> apply_toml_file(RuntimeConfig &config, const st
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.depth_topic = *value;
|
||||
}
|
||||
if (auto value = toml_value<std::string>(table, "record.mcap.body_topic")) {
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.body_topic = *value;
|
||||
}
|
||||
if (auto value = toml_value<std::string>(table, "record.mcap.frame_id")) {
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.frame_id = *value;
|
||||
@@ -560,6 +564,7 @@ std::expected<RuntimeConfig, std::string> parse_runtime_config(int argc, char **
|
||||
std::string mcap_path_raw{};
|
||||
std::string mcap_topic_raw{};
|
||||
std::string mcap_depth_topic_raw{};
|
||||
std::string mcap_body_topic_raw{};
|
||||
std::string mcap_frame_id_raw{};
|
||||
std::string mcap_compression_raw{};
|
||||
std::string queue_size_raw{};
|
||||
@@ -600,6 +605,7 @@ std::expected<RuntimeConfig, std::string> parse_runtime_config(int argc, char **
|
||||
app.add_option("--mcap-path", mcap_path_raw);
|
||||
app.add_option("--mcap-topic", mcap_topic_raw);
|
||||
app.add_option("--mcap-depth-topic", mcap_depth_topic_raw);
|
||||
app.add_option("--mcap-body-topic", mcap_body_topic_raw);
|
||||
app.add_option("--mcap-frame-id", mcap_frame_id_raw);
|
||||
app.add_option("--mcap-compression", mcap_compression_raw);
|
||||
app.add_option("--queue-size", queue_size_raw);
|
||||
@@ -712,6 +718,10 @@ std::expected<RuntimeConfig, std::string> parse_runtime_config(int argc, char **
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.depth_topic = mcap_depth_topic_raw;
|
||||
}
|
||||
if (!mcap_body_topic_raw.empty()) {
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.body_topic = mcap_body_topic_raw;
|
||||
}
|
||||
if (!mcap_frame_id_raw.empty()) {
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.frame_id = mcap_frame_id_raw;
|
||||
@@ -846,6 +856,9 @@ std::expected<void, std::string> validate_runtime_config(const RuntimeConfig &co
|
||||
if (config.record.mcap.depth_topic.empty()) {
|
||||
return std::unexpected("invalid MCAP config: depth_topic must not be empty");
|
||||
}
|
||||
if (config.record.mcap.body_topic.empty()) {
|
||||
return std::unexpected("invalid MCAP config: body_topic must not be empty");
|
||||
}
|
||||
if (config.record.mcap.frame_id.empty()) {
|
||||
return std::unexpected("invalid MCAP config: frame_id must not be empty");
|
||||
}
|
||||
@@ -885,6 +898,7 @@ std::string summarize_runtime_config(const RuntimeConfig &config) {
|
||||
ss << ", mcap.path=" << config.record.mcap.path;
|
||||
ss << ", mcap.topic=" << config.record.mcap.topic;
|
||||
ss << ", mcap.depth_topic=" << config.record.mcap.depth_topic;
|
||||
ss << ", mcap.body_topic=" << config.record.mcap.body_topic;
|
||||
ss << ", mcap.frame_id=" << config.record.mcap.frame_id;
|
||||
ss << ", mcap.compression=" << to_string(config.record.mcap.compression);
|
||||
ss << ", latency.queue_size=" << config.latency.queue_size;
|
||||
|
||||
Reference in New Issue
Block a user