Adaptive cruise control

From XuShuwenn/RedAct · View interactive version

Adaptive cruise control is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Implement adaptive cruise control systems with PID controllers for vehicle speed and distance regulation.

How to use this skill

Skill file

Adaptive Cruise Control

When to Use

Key Concepts

Workflow

  1. Read vehicle parameters from YAML (mass, acceleration limits, etc.) and confirm the actual schema before using keys in code; do not assume sections such as simulation or fields such as dt exist unless verified.
  2. Read sensor data (time, ego_speed, lead_speed, distance) and inspect enough of the dataset to find regime changes; do not infer missing signals from only the first few rows.
  3. Implement PID controller class with configurable gains.
  4. Implement ACC system with cruise/follow/emergency modes from the stated spec/config.
  5. Simulate closed-loop vehicle dynamics: propagate ego state from the previous simulated state and accel_cmd, while treating recorded data only as exogenous inputs unless the task explicitly specifies replay semantics.
  6. After each file write or major edit, reopen the file or run a syntax/import check to confirm the change saved correctly before building on it.
  7. Tune PID parameters using measured simulation outcomes, and verify that materially different gain sets produce different trajectories or metrics; if they do not, treat that as a blocking implementation bug.
  8. Run the full required simulation/analysis pipeline and compute the task's stated metrics from complete outputs, not partial console logs.
  9. Keep evaluation logic, metric definitions, scenario assumptions, and mode conditions aligned with the task; if data meaning is ambiguous, validate the interpretation before changing plant or sensor semantics.
  10. Before finishing, verify every required metric, safety bound, file/output requirement, and exact completion/output protocol; if anything is unmet or unverified, continue iterating or report it explicitly as unresolved.

Modes

Important Parameters

Tips

Validation and Spec Compliance

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.