run_policy: optional per-session rosbag (--task.debug.record-rosbag) - #181
Open
tomasz-lewicki wants to merge 2 commits into
Open
run_policy: optional per-session rosbag (--task.debug.record-rosbag)#181tomasz-lewicki wants to merge 2 commits into
tomasz-lewicki wants to merge 2 commits into
Conversation
tomasz-lewicki
force-pushed
the
dev/tomasz/session-rosbag
branch
6 times, most recently
from
July 28, 2026 22:57
d36ad7d to
bc04508
Compare
Spawns 'ros2 bag record --all' in its own process group for the lifetime of a run_policy run and SIGINTs it for a clean MCAP close on exit (Ctrl-C, normal completion, or error), then prints the bag's absolute path. Each run gets its own short, self-contained bag, so debugging one run no longer means hunting for a timestamp inside a long fleet-telemetry recording. Wrapped around policy.run() via a SessionRecorder context manager; no-op when the flag is off, and any failure to start recording is logged and swallowed so it can never take down the policy run. Output dir configurable via --task.debug.rosbag-dir (default ~/run_policy_bags).
tomasz-lewicki
force-pushed
the
dev/tomasz/session-rosbag
branch
from
July 28, 2026 23:01
bc04508 to
4a356e6
Compare
Juyue
previously approved these changes
Jul 30, 2026
Juyue
left a comment
Contributor
There was a problem hiding this comment.
Does recording influence the inference latency?
Looks good to me as long as it works!
… pin Robot-local work captured from fmd-rccu-1: - DebugConfig.dry_run / dryer_run: run the loop without sending commands (dry_run) or without any bridge/hardware via a fabricated-state SyntheticInterface (dryer_run). - base.py: wire the synthetic interface for dryer_run; pin ONNX Runtime to a single intra-op thread so it stays off the isolated RT cores. - SessionRecorder: pin ros2 bag record to its own core (DebugConfig.rosbag_cpu, default 2) so it stops stealing cycles from the policy core.
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.
Records a
ros2 bag record --allfor the lifetime of onerun_policyrun and stops it (clean MCAP close) on Ctrl-C / completion / error, then prints the bag's absolute path.Each run gets its own short, self-contained bag — no more hunting for a timestamp inside a 30-min fleet-telemetry recording.
--task.debug.record-rosbag(dir via--task.debug.rosbag-dir, default~/run_policy_bags).