Skip to content

Add circular telemetry/log buffer node (#25) - #38

Merged
1ptqc-KD-97bsBG-pVJG merged 3 commits into
mainfrom
25-feat-add-circular-telemetrylog-buffer-node
Apr 22, 2026
Merged

1ptqc-KD-97bsBG-pVJG merged 3 commits into
mainfrom
25-feat-add-circular-telemetrylog-buffer-node

Conversation

@CalCJack

Copy link
Copy Markdown
Collaborator

Implements an observer-only telemetry history system on top of the existing DLQR baseline. The control path (env_data, actuation_cmd) is unchanged.

Changes
New interfaces

  • msg/StateSample and msg/ActuationSample — timestamped history entries with variable-length numeric arrays, so the API is not hardcoded to the current 6-state/3-axis shapes

  • srv/GetRecentEnvHistory, srv/GetRecentActuationHistory, srv/GetRecentLogHistory — typed query services with limit, entries, total_buffered, and capacity fields; limit=0 returns all retained entries

env_node extension

  • Publishes actuation_applied (ActuationSample) immediately after a successful actuation_cmd request, stamped at the actuator sink

New node: telemetry_buffer

  • Subscribes to env_data (receipt-time stamp), actuation_applied (source stamp), and /rosout

  • Stores recent entries in three independent fixed-capacity circular buffers

  • Exposes query services at ~/get_recent_env_history, ~/get_recent_actuation_history, ~/get_recent_log_history

  • Buffer access is mutex-guarded for safety under multi-threaded executors

  • Invalid capacity parameters (<= 0) fail fast at startup

  • No INFO logging inside query handlers to avoid feedback loops into the log buffer
    Launch

  • sim.launch.py gains enable_telemetry_buffer (default false) and three capacity arguments — existing launch behavior is unchanged when the flag is omitted
    Tests

  • Unit tests for CircularBuffer: rollover, ordering, limit=0, limit exceeding available entries

  • Node-level tests for all three buffer streams, including a test that exercises the real actuation_cmd → actuation_applied → buffer path with a live env_node

  • Integration launch test running env_node, gnc_node, and telemetry_buffer_node together, querying history over ROS services, and verifying clean shutdown

@CalCJack CalCJack self-assigned this Apr 21, 2026
@CalCJack CalCJack added the enhancement New feature or request label Apr 21, 2026
@CalCJack CalCJack linked an issue Apr 21, 2026 that may be closed by this pull request
11 tasks

@1ptqc-KD-97bsBG-pVJG 1ptqc-KD-97bsBG-pVJG left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pulled the branch and ran the distributed_satellite_sim package tests through the Docker image. The core implementation looks good overall, and the functional ROS tests passed in that environment, but I don’t think this is ready to merge yet because of two blocking issues:

  1. src/DistributedSatelliteSim/launch/sim.launch.py Enabling telemetry_buffer still weakens the startup gate. With min_subscribers defaulting to 1, the buffer can satisfy env_node’s startup condition before gnc_node is actually ready, which means an observer-only feature can change the closed-loop trajectory. This launch path needs the same protection as the DLQR reference launch, or another equivalent readiness check.

  2. src/DistributedSatelliteSim/test/test_telemetry_buffer_launch.py test_actuation_history_queryable never asserts that any actuation history was actually recorded. If the startup race above happens, or if actuation_applied stops being published, the test can still pass with an empty response. The test should fail unless at least one actuation sample is present.

Great work! Let me know when you've implemented some changes and I'll take another look. Thanks!

@1ptqc-KD-97bsBG-pVJG
1ptqc-KD-97bsBG-pVJG dismissed their stale review April 22, 2026 02:32

Changes implemented

@1ptqc-KD-97bsBG-pVJG
1ptqc-KD-97bsBG-pVJG merged commit 9985f71 into main Apr 22, 2026
2 checks passed
@1ptqc-KD-97bsBG-pVJG
1ptqc-KD-97bsBG-pVJG deleted the 25-feat-add-circular-telemetrylog-buffer-node branch April 22, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add circular telemetry/log buffer node

3 participants