Add ZED SVO to MCAP conversion tool
This commit is contained in:
@@ -365,6 +365,14 @@ 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.calibration_topic")) {
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.calibration_topic = *value;
|
||||
}
|
||||
if (auto value = toml_value<std::string>(table, "record.mcap.pose_topic")) {
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.pose_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;
|
||||
@@ -568,6 +576,8 @@ 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_calibration_topic_raw{};
|
||||
std::string mcap_pose_topic_raw{};
|
||||
std::string mcap_body_topic_raw{};
|
||||
std::string mcap_frame_id_raw{};
|
||||
std::string mcap_compression_raw{};
|
||||
@@ -610,6 +620,8 @@ 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-calibration-topic", mcap_calibration_topic_raw);
|
||||
app.add_option("--mcap-pose-topic", mcap_pose_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);
|
||||
@@ -726,6 +738,14 @@ 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_calibration_topic_raw.empty()) {
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.calibration_topic = mcap_calibration_topic_raw;
|
||||
}
|
||||
if (!mcap_pose_topic_raw.empty()) {
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.pose_topic = mcap_pose_topic_raw;
|
||||
}
|
||||
if (!mcap_body_topic_raw.empty()) {
|
||||
config.record.mcap.enabled = true;
|
||||
config.record.mcap.body_topic = mcap_body_topic_raw;
|
||||
@@ -867,6 +887,12 @@ 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.calibration_topic.empty()) {
|
||||
return std::unexpected("invalid MCAP config: calibration_topic must not be empty");
|
||||
}
|
||||
if (config.record.mcap.pose_topic.empty()) {
|
||||
return std::unexpected("invalid MCAP config: pose_topic must not be empty");
|
||||
}
|
||||
if (config.record.mcap.body_topic.empty()) {
|
||||
return std::unexpected("invalid MCAP config: body_topic must not be empty");
|
||||
}
|
||||
@@ -910,6 +936,8 @@ 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.calibration_topic=" << config.record.mcap.calibration_topic;
|
||||
ss << ", mcap.pose_topic=" << config.record.mcap.pose_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);
|
||||
|
||||
Reference in New Issue
Block a user