How learnsyslab/safe-control-gym works
safe-control-gym is a robotics benchmark and safe-learning control suite. A typical workflow configures a task and controller, constructs them through the registry, trains or runs the controller against a physics-based environment, and evaluates logged performance. The product also includes classical, MPC, and RL controller families; symbolic dynamics, constraints, and disturbances; and CBF/MPSC safety filters. Edges reflect the README, excerpts, and SOURCE INDEX references; some broader integrations are documented but their detailed runtime wiring was not sampled.
Main entry points: controllers Controller families · train_rl_controller.py RL training · benchmark_env.py Benchmark environment · quadrotor.py Quadrotor task
Components 27
Experiment orchestration
- RL training
safe_control_gym/experiments/train_rl_controller.py - Experiment runner
safe_control_gym/experiments/base_experiment.py - Object registry
safe_control_gym/utils/registration.py
Control algorithms
- Controller interface
safe_control_gym/controllers/base_controller.py - Controller families
safe_control_gym/controllers - LQR utilities
safe_control_gym/controllers/lqr/lqr_utils.py - GP-MPC utilities
safe_control_gym/controllers/mpc/gp_utils.py - MPC utilities
safe_control_gym/controllers/mpc/mpc_utils.py - PPO utilities
safe_control_gym/controllers/ppo/ppo_utils.py
Robotics environments
- Benchmark environment
safe_control_gym/envs/benchmark_env.py - CartPole task
safe_control_gym/envs/gym_control/cartpole.py - Quadrotor task
safe_control_gym/envs/gym_pybullet_drones/quadrotor.py - PyBullet dynamics
safe_control_gym/envs/gym_pybullet_drones/base_aviary.py - Safety constraints
safe_control_gym/envs/constraints.py - Disturbance models
safe_control_gym/envs/disturbances.py - Episode statistics
safe_control_gym/envs/env_wrappers/record_episode_statistics.py
Safety filters
- Safety filter interface
safe_control_gym/safety_filters/base_safety_filter.py - CBF filters
safe_control_gym/safety_filters/cbf/cbf.py - Neural CBF
safe_control_gym/safety_filters/cbf/cbf_nn.py - MPSC filters
safe_control_gym/safety_filters/mpsc/mpsc.py
Models and utilities
- Symbolic systems
safe_control_gym/math_and_models/symbolic_systems.py - Neural networks
safe_control_gym/math_and_models/neural_networks.py - Normalization
safe_control_gym/math_and_models/normalization.py - Configuration
safe_control_gym/utils/configuration.py - Logging
safe_control_gym/utils/logging.py - Performance metrics
safe_control_gym/math_and_models/metrics/performance_metrics.py
Other components
- Experiment user
Connections 24
- Experiment user → RL training: configures and starts
safe_control_gym/experiments/train_rl_controller.py - RL training → Configuration: loads configuration
safe_control_gym/experiments/train_rl_controller.py - RL training → Object registry: creates task and controller
safe_control_gym/experiments/train_rl_controller.py - RL training → Controller interface: calls learn
- Experiment runner → Performance metrics: uses performance metrics
safe_control_gym/experiments/base_experiment.py - Benchmark environment → Safety constraints: uses constraints
safe_control_gym/envs/benchmark_env.py - Benchmark environment → Disturbance models: uses disturbances
safe_control_gym/envs/benchmark_env.py - CartPole task → Benchmark environment: extends benchmark
safe_control_gym/envs/gym_control/cartpole.py - CartPole task → Safety constraints: uses constraints
safe_control_gym/envs/gym_control/cartpole.py - Quadrotor task → Benchmark environment: extends benchmark
safe_control_gym/envs/gym_pybullet_drones/quadrotor.py - Quadrotor task → Safety constraints: uses constraints
safe_control_gym/envs/gym_pybullet_drones/quadrotor.py - Quadrotor task → PyBullet dynamics: uses dynamics base
safe_control_gym/envs/gym_pybullet_drones/quadrotor.py - Controller families → Controller interface: implements interface
safe_control_gym/controllers/safe_explorer/safe_ppo.py - Controller families → LQR utilities: includes LQR methods
safe_control_gym/controllers/mpc/gp_mpc.py - Controller families → GP-MPC utilities: includes GP-MPC methods
safe_control_gym/controllers/mpc/gp_mpc.py - Controller families → MPC utilities: includes MPC methods
safe_control_gym/controllers/mpc/gp_mpc.py - Controller families → PPO utilities: includes PPO methods
safe_control_gym/controllers/safe_explorer/safe_ppo.py - CBF filters → Safety filter interface: implements filter interface
safe_control_gym/safety_filters/cbf/cbf.py - Neural CBF → CBF filters: builds on CBF
safe_control_gym/safety_filters/cbf/cbf_nn.py - Neural CBF → Neural networks: uses neural networks
safe_control_gym/safety_filters/cbf/cbf_nn.py - MPSC filters → Safety filter interface: implements filter interface
safe_control_gym/safety_filters/mpsc/mpsc.py - MPSC filters → MPC utilities: uses MPC utilities
safe_control_gym/safety_filters/mpsc/mpsc.py - Benchmark environment → Symbolic systems: provides symbolic models
- RL training → Logging: writes training logs