A robotics gym that bakes in safety and symbolic dynamics
This is a unified benchmark for safe learning-based control and RL that gives you symbolic robot dynamics, safety filters, and disturbances out of the box.

What it does
Safe-control-gym is a collection of PyBullet physics environments for CartPole and Quadrotor tasks. It wraps standard robotics simulations in a Gym API and augments them with CasADi-derived symbolic a priori dynamics. The suite is designed to evaluate learning-based controllers—both model-free RL and model-based methods—against symbolic safety constraints and configurable input, parameter, and dynamics disturbances.
The interesting bit
Most simulators give you states and let you guess the physics; this one hands you the symbolic model upfront. That makes it unusually friendly to model predictive control, Lyapunov methods, and safety filters like CBFs and MPSC, which need explicit dynamics to prove anything. It is essentially a research testbed that makes the physics model and the safety proof share the same source of truth.
Key highlights
- Symbolic CasADi dynamics exposed for model-based control and safety analysis.
- Built-in safety filters: CBF, Neural Network CBF, and MPSC.
- Pre-implemented controllers spanning classical (PID, LQR, MPC) and RL (PPO, SAC, DDPG, RARL).
- Input, parameter, and dynamics disturbances to stress-test robustness.
- Performance comparable to
gym-pybullet-droneson speed-up, with heavier emphasis on fidelity and safety features.
Caveats
- The quadrotor environment is explicitly noted as “not as light-weight as gym-pybullet-drones”; expect a fidelity/features trade-off.
- Some dependencies (
gmp, and optionallyacadosfor fast MPC) require manual system-level installation. - Scope is narrow: only CartPole and Quadrotor environments are provided, so it is a focused benchmark rather than a general-purpose robotics gym.
Verdict
Grab this if you are researching safe RL, model-based control, or safety filters and need a benchmark where symbolic dynamics and constraints are first-class citizens. Skip it if you need a broad zoo of robots or a lightweight drone-only sandbox without the control-theory overhead.
Frequently asked
- What is learnsyslab/safe-control-gym?
- This is a unified benchmark for safe learning-based control and RL that gives you symbolic robot dynamics, safety filters, and disturbances out of the box.
- Is safe-control-gym open source?
- Yes — learnsyslab/safe-control-gym is open source, released under the MIT license.
- What language is safe-control-gym written in?
- learnsyslab/safe-control-gym is primarily written in Python.
- How popular is safe-control-gym?
- learnsyslab/safe-control-gym has 903 stars on GitHub.
- Where can I find safe-control-gym?
- learnsyslab/safe-control-gym is on GitHub at https://github.com/learnsyslab/safe-control-gym.