How rajvamsi12/agile-nicbf works
Agile-NICBF is a research codebase for simulated F1TENTH-style racing, centered on a learned-dynamics Neural ICBF safety pipeline. The main workflow trains dynamics, an imitation nominal policy, and obstacle/wall barriers, then filters a nominal control during racing and evaluates episodes. The repository also retains an earlier predictive safety filter and alternative racing controllers. The README documents the current pipeline; sampled source confirms key model and controller behavior. Some evaluation and legacy wiring is inferred only from the source index, so uncertain links are omitted.
Main entry points: nicbf_controller.py Neural ICBF · stress_grid.py Episode Evaluation · predictive_filter.py Predictive Safety Filter · stage2_imitation.py Imitation Policy
Components 15
Racing Simulation
- Bicycle Environment
dynamic_bicycle_env.py
Nominal Planning
- MPPI Planner
mppi_planner.py
Neural ICBF Learning
- Learned Dynamics
prototype_neural_ode/dynamic/stage1_dynamics.py - Imitation Policy
prototype_neural_ode/dynamic/stage2_imitation.py - Barrier Training
prototype_neural_ode/dynamic/stage3_barrier.py - Model Definitions
prototype_neural_ode/dynamic/common.py
Safety and Evaluation
- Neural ICBF
prototype_neural_ode/dynamic/nicbf_controller.py - Episode Evaluation
stress_grid.py
Earlier Methods
- Terminal Certificate Training
train_terminal_barrier.py - Predictive Safety Filter
predictive_filter.py - Fast Rollout
fast_rollout.py - MPCC Controller
mpcc_controller.py - SFC Planner
sfc_planner.py - DRL Policy
drl_racing_policy.py
Other components
- Experimenter
Connections 23
- Experimenter → Episode Evaluation: runs episodes
- Episode Evaluation → Bicycle Environment: simulates in
stress_grid.py - Episode Evaluation → MPPI Planner: evaluates planner
stress_grid.py - Episode Evaluation → Neural ICBF: evaluates filter
stress_grid.py - Episode Evaluation → Predictive Safety Filter: evaluates filter
stress_grid.py - Imitation Policy → MPPI Planner: collects expert data
prototype_neural_ode/dynamic/stage2_imitation.py - Imitation Policy → Bicycle Environment: uses plant data
prototype_neural_ode/dynamic/stage2_imitation.py - Learned Dynamics → Model Definitions: uses definitions
prototype_neural_ode/dynamic/stage1_dynamics.py - Imitation Policy → Model Definitions: uses definitions
prototype_neural_ode/dynamic/stage2_imitation.py - Barrier Training → Model Definitions: uses definitions
prototype_neural_ode/dynamic/stage3_barrier.py - Barrier Training → Learned Dynamics: labels via model
README.md - Neural ICBF → Model Definitions: loads networks
prototype_neural_ode/dynamic/nicbf_controller.py - Neural ICBF → Imitation Policy: uses nominal policy
README.md - Neural ICBF → Learned Dynamics: uses learned model
README.md - Neural ICBF → Barrier Training: uses learned barriers
README.md - Neural ICBF → MPPI Planner: accepts nominal control
README.md - Predictive Safety Filter → Bicycle Environment: checks rollouts
predictive_filter.py - Predictive Safety Filter → Fast Rollout: uses rollouts
predictive_filter.py - Predictive Safety Filter → Terminal Certificate Training: loads certificate
predictive_filter.py - MPCC Controller → Bicycle Environment: simulates dynamics
mpcc_controller.py - Experimenter → MPCC Controller: selects controller
- Experimenter → SFC Planner: selects planner
- Experimenter → DRL Policy: selects policy