Automated Obstacle Detection System for Safe Locomotion