feat(zed): export depth at neural optimal resolution

Restrict ZED depth export to neural modes and default offline MCAP conversion to the SDK-selected optimal depth size instead of camera resolution.

Add a configurable --depth-size option, propagate the actual returned depth dimensions into DepthMap metadata, and emit a dedicated depth calibration topic when depth resolution differs from video.

Update the batch and recording helper scripts to use the new neural-only depth mode surface and pass through depth sizing.

Verification:
- cmake --build build --target zed_svo_to_mcap mcap_multi_record_tester mcap_pose_record_tester -j4
- build/bin/mcap_multi_record_tester
- build/bin/mcap_pose_record_tester
- build/bin/zed_svo_to_mcap --input /workspaces/data/kindergarten/jump/experiment/2/2026-03-18T11-27-15/2026-03-18T11-27-15_zed4.svo2 --output /tmp/zed4_neural_optimal_test.mcap --codec h264 --encoder-device software --mcap-compression zstd --depth-mode neural --depth-size optimal --start-frame 0 --end-frame 9
This commit is contained in:
2026-03-20 12:04:37 +00:00
parent 7808b89a03
commit 2f74a9561d
8 changed files with 497 additions and 190 deletions
+13 -2
View File
@@ -34,6 +34,7 @@ class BatchConfig:
encoder_device: str
mcap_compression: str
depth_mode: str
depth_size: str
with_pose: bool
pose_config: Path | None
world_frame_id: str | None
@@ -287,6 +288,8 @@ def command_for_job(job: ConversionJob, config: BatchConfig) -> list[str]:
config.mcap_compression,
"--depth-mode",
config.depth_mode,
"--depth-size",
config.depth_size,
]
if config.with_pose:
command.append("--with-pose")
@@ -564,8 +567,14 @@ def run_batch(jobs: list[ConversionJob], config: BatchConfig, jobs_limit: int) -
)
@click.option(
"--depth-mode",
type=click.Choice(("neural", "quality", "performance", "ultra")),
default="quality",
type=click.Choice(("neural_light", "neural", "neural_plus")),
default="neural",
show_default=True,
)
@click.option(
"--depth-size",
type=str,
default="optimal",
show_default=True,
)
@click.option("--with-pose", is_flag=True, help="Enable per-camera positional tracking export when available.")
@@ -615,6 +624,7 @@ def main(
encoder_device: str,
mcap_compression: str,
depth_mode: str,
depth_size: str,
with_pose: bool,
pose_config: Path | None,
world_frame_id: str | None,
@@ -638,6 +648,7 @@ def main(
encoder_device=encoder_device,
mcap_compression=mcap_compression,
depth_mode=depth_mode,
depth_size=depth_size,
with_pose=with_pose,
pose_config=pose_config.expanduser().resolve() if pose_config is not None else None,
world_frame_id=world_frame_id,