-I have an RPi on Ubuntu with ROS (Kinetic). The task is to solve a maze. I have implemented a left-hand algorithm to navigate through the maze.

-The robot is equipped with 3 ultrasonic HC-SR04 sensors.

How do I detect and navigate through a curved path using these sensors?


1 Answer 1


Use a distance threshold between the wall and robot and make the robot turn every time the output of sensor is less than the threshold. I guess you are using a differential drive robot. And if you are not mapping, there is no use of other 2 sensors. You just need to create a publisher for the sensor data and subscribe it to calculate the threshold and send the appropriate velocity for the bot.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.