Bridging Adaptivity and Safety: Learning Agile Collision-Free Locomotion Across Varied Physics