Autonomous Ground Vehicle Simulation Webots/Python
Like Jeffrey Hymas

Autonomous Ground Vehicle Simulation Webots/Python

Autonomous Ground Vehicle Simulation Webots/Python

Description:

Published: April 26, 2020 0 0 135
By: Jeffrey Hymas, Cal Poly Pomona
Category: Computer Science
Hashtags: #Coding #Programming

Simulation of Autonomous Ground Vehicle using Webots and Python. Robot navigates from starting point to a way-point using a GPS navigation algorithm. Once at the destination it spins until it "sees" the appropriate object, at which point it drives forward up the ramp, this is meant to simulate loading onto a larger vehicle. Robot then pause at the top of the ramp, to simulate being "transported" to an operating area, at which point the robot backs down the ramp and hands control over to the user. Admittedly not the most exciting simulation or video, but it was fun to code.


GPS navigation takes into account the curvature of the earth using the haversine formula to determine distance and heading. Robot also always spins in the most ideal direction to minimize navigation time. This was accomplished by taking the difference between the GPS heading of the robot and the heading of the destination, adjusting it to be between 0 and 360 degrees, and then checking if the difference is between 0 and 180. If it is the robot rotates right, if is greater then 180, the robot rotates left.


Unfortunately I can't upload the Webots world because the files are not supported, but the code for the controller is included. The controller should work in any webots simulation that includes the same motors, GPS, Compass, and pressure sensors.