Safe Navigation Of Quadruped Robots Using Density Functions