  Certified safe control is a growing challenge in robotics, especially when
performance and safety objectives must be concurrently achieved. In this work,
we extend the barrier state (BaS) concept, recently proposed for safe
stabilization of continuous time systems, to safety embedded trajectory
optimization for discrete time systems using discrete barrier states (DBaS).
The constructed DBaS is embedded into the discrete model of the safety-critical
system integrating safety objectives into the system's dynamics and performance
objectives. Thereby, the control policy is directly supplied by safety-critical
information through the barrier state. This allows us to employ the DBaS with
differential dynamic programming (DDP) to plan and execute safe optimal
trajectories. The proposed algorithm is leveraged on various safety-critical
control and planning problems including a differential wheeled robot safe
navigation in randomized and complex environments and on a quadrotor to safely
perform reaching and tracking tasks. The DBaS-based DDP (DBaS-DDP) is shown to
consistently outperform penalty methods commonly used to approximate
constrained DDP problems as well as CBF-based safety filters.
