articles
Turning The GoPiGo Into An Obstacle Detection Robot Using Ultrasonic Waves - Part 6
Tuesday, July 26, 2016We are essentially creating an Ultrasonic Detection And Ranging (USDAR) that will use the distance reading from the ultrasonic sensor to create a LIDAR 2D mapping that uses the same principle as RADAR.
I have already attached the ultrasonic sensor (Part 4) to the servo motor (Part 3) and mounted it to the GoPiGo robot car, so it's just a matter of setting up and running the Python code which you can find on DexterIndustries GitHub. The basic obstacle detection tells the GoPiGo robot to move forwards while collecting readings from the ultrasonic sensor and when the GoPiGo robot is close to an obstacle to stop.
The advanced obstacle detection code tells the GoPiGo robot to move forwards while reading the distance of angles and the XY coordinates, then stop and print the values in a grid map.
After running the command above, the GoPiGo Robot starts moving and scanning:
0 comments