This project utilized Arduino C/C++, Robot Operating System (ROS), Ubuntu, and Python to program, simulate, and implement an obstacle avoidance robot using an ultrasonic rangefinder. With limited resources, the ultrasonic rangefinder was mounted on two servos capable of rotating 180 degrees to span a total of 360 degrees. A map of the environment was constructed, and then the robot was instructed to drive along a path that avoided obstacles with the help of the ultrasonic rangefinder. The Arduino sketch is also written to print the distance of objects in front of the robot, and ROS stored this data to then be analyzed in Python code.
​
​
​
​
​
​
​
​
​
​
​
​
The ultrasonic rangefinder used was HC SR04, with four pins relevant for interfacing: power, ground, trigger, and receiving data. The operating voltage is 5V DC and operating current is 15 mA. Its range is 2cm to 400cm, with an accuracy of up to 3mm and an angle range of 15 degrees.


Ultrasonic Sensing for Obstacle Avoidance
SKILLS DEMONSTRATED:
​
C/C++
Arduino
ROS
Ubuntu
Python
I2C
Gazebo
Ultrasonic Rangefinder
USB