Skip to content

[codex] Add networked dynamic PETC controller wrapper#212

Open
JohnneyLee wants to merge 3 commits into
learnsyslab:mainfrom
JohnneyLee:codex/networked-petc-wrapper-20260625102302
Open

[codex] Add networked dynamic PETC controller wrapper#212
JohnneyLee wants to merge 3 commits into
learnsyslab:mainfrom
JohnneyLee:codex/networked-petc-wrapper-20260625102302

Conversation

@JohnneyLee

@JohnneyLee JohnneyLee commented Jun 25, 2026

Copy link
Copy Markdown

Summary

Adds a networked-control wrapper for sampled, delayed, event-triggered observations. The wrapper lets existing safe-control-gym controllers run behind bounded-delay communication channels without changing their controller API.

What changed

  • Added safe_control_gym.controllers.networked with delay channels, static/dynamic PETC triggers, scheduling helpers, wrapper, and metrics.
  • Added a standalone smoke example and a BaseExperiment integration example.
  • Added a mobile robot MPC example showing dynamic PETC on path tracking with bounded observation delay.
  • Added tests for FIFO delayed delivery, trigger behavior, and wrapper-held observations.
  • Added docs/networked_control.md with usage, theory mapping, mobile robot MPC results, and before/after evaluation guidance.

Validation

Run locally in the Codex workspace:

python -m compileall safe-control-gym-networked-petc
5 lightweight test functions passed
python examples/networked_control/run_dynamic_petc.py --steps 80 --max-delay-steps 3
python examples/networked_control/run_mobile_robot_mpc_petc.py --steps 80 --max-delay-steps 4

Smoke output for the generic wrapper demo:

direct_rms_position: 1.2350
networked_rms_position: 1.3597
transmissions: 43
skips: 37
event_rate: 0.5375

Representative mobile robot MPC run:

Fresh MPC RMS tracking error: 0.0513 m
PETC MPC RMS tracking error: 0.0565 m
Transmissions: 75 / 260 samples
Event rate: 28.85%
Mean stale steps: 4.22
Max queue depth: 4

Notes

This PR does not claim closed-loop ISS for arbitrary tasks. It exposes practical network-state quantities such as update error, stale steps, queue depth, trigger margin, and eta so task-specific certificates can be layered on top.

@JohnneyLee JohnneyLee marked this pull request as ready for review June 25, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant