feat(dc_mcap_writer,docs): add MCAP as a passthrough Destination - #319
Merged
Minipada merged 3 commits intoAug 12, 2026
Merged
Conversation
Records can now be recorded as .mcap files for ros2 bag/Foxglove replay. Since Vector has no MCAP sink, this is the ADR-0009 passthrough shape: dc_mcap_writer, a standalone process, consumes the public dc.<tag> routes over a Vector socket sink and writes rotated .mcap files with one JSON-schema Channel per Tag, leaving dc_bridge itself unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsKvbNGBjYBiTkQzqbacp5 Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## jazzy #319 +/- ##
=======================================
Coverage 40.81% 40.81%
=======================================
Files 82 82
Lines 4919 4919
=======================================
Hits 2007 2007
Misses 2912 2912
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…MCAP passthrough Adds real subprocess/signal smoke tests and wires dc_mcap_writer into the zero-loss e2e harness as a second, independently-verified passthrough alongside the existing NDJSON one. Getting it to actually pass surfaced and fixed three real bugs: mcap was never installed in the CI workspace image (colcon build doesn't fetch install_requires), a filename collision across process restarts, mcap's default chunking silently losing every buffered message on an abrupt kill, and ros2 run not forwarding signals to the process it starts (the last one was the actual root cause keeping the file corrupted even after the first two fixes). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsKvbNGBjYBiTkQzqbacp5 Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
…Destination Manually copying a Vector TOML into ~/.dc/ and starting dc_mcap_writer in a second terminal broke the YAML-configured-Destination flow every other sink follows. dc_bringup.launch.py now reads a dc_mcap_writer: block from the same params file (sibling to dc_bridge:, not nested in its destinations list, since that's parsed/validated in dc_bridge's own C++ and ADR-0009 explicitly avoids touching it), generates the matching Vector passthrough sink, and starts dc_mcap_writer automatically via ExecuteProcess (python3 -m dc_mcap_writer.cli directly, not ros2 run, which doesn't forward signals to its child). Verified end-to-end against the rebuilt workspace image, including a regression check that existing demos without the block behave byte-for-byte as before. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsKvbNGBjYBiTkQzqbacp5 Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
Minipada
deleted the
feature/210-add-mcap-as-a-destination-ros-2-bag-stor
branch
August 16, 2026 14:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.mcapfiles forros2 bag info/Foxglove replay. Vector has no MCAP sink, so per ADR-0003 this needed a blessed-vs-passthrough decision recorded before implementing —docs/adr/0009-mcap-as-a-passthrough-destination.mdrecords the choice: passthrough, not adc_bridge-side blessed Destination. The issue's stated justification for the Bridge-side option (local-first durability surviving a Shipper outage) isn't a real gap: the Shipper is already at-least-once and disk-buffered per blessed sink (ADR-0002).dc_mcap_writer(ament_python, no ROS deps of its own): a standalone process that consumes the publicdc.<tag>routes over a Vectorsocketsink (NDJSON) and writes rotated.mcapfiles, one JSON-schema Channel per Tag (thefoxglove/mcapjsonschema/writer.cpppattern the issue links). Rotates by size or duration, whichever comes first.dc_demos/config/mcap_sink.toml,params/mcap_recording.yaml,launch/mcap_recording.launch.py) and a new tutorial (doc/src/dc/demos/mcap_recording.md) following the existing Elasticsearch/InfluxDB passthrough demo shape.mcapadded as a Python dependency (pyproject.toml/requirements.txt), matching hownumpy/opencv-python/pydantic/Pilloware already managed outside rosdep.Test plan
pytestsuite fordc_mcap_writer(rotation by size/duration, per-Tag channel routing, all threetime_formatconversions, malformed-NDJSON handling, mcap round-trip viamcap.reader) — all pass in a throwaway venv (mcap/pytestinstalled viauv, no ROS 2 available in this environment)--stdinsmoke test end-to-end: piped NDJSON in, read the resulting.mcapback independently, confirmed Channels/schema/timestamps round-trip correctlypre-commit runagainst every changed/new file (black/isort/pyupgrade/flake8/xmllint/yaml/toml clean;pycln/poetry-requirementsfail in this environment the same pre-existing way earlier work already logged inprogress.txt)colcon build --packages-select dc_mcap_writerandros2 bag info/Foxglove against a real recorded file — needs a ROS 2 Jazzy environment (the podman-baseddc-workspaceimage used for prior C++ verification), not available in this sessionCloses #210