Jay Joshi Edison High School 50 Boulevard of the Eagles Edison, NJ 08817 Multi-Agent Robotics with GPS Navigation Abstract The GPS Navigation project is a multi-agent robotics project. A GPS Navigation Robot is a mobile robot that can navigate through waypoints by using data from a GPS receiver. While traversing through waypoints, the robot can avoid any obstacles in its path. The robot acquires positional information from a GPS receiver via Bluetooth interface. Two such GPS Navigation robots are built. One of the robots is a Chase Bot, while the other is a Target Bot. The Chase Bot acts as a cop, while the Target Bot acts as a thief. The Chase Bot has to pursue the Target Bot, and get close enough to catch it. The Target Bot runs away from the Chase Bot in a random pattern. The two robots exchange information about their location by the XBee, which allows for data transfer up to 100 meters. The entire project revolves around the interface between multiple components. The differences between the components must be reconciled so that the robots function as expected. Many different sensors, motors and GPS receivers work in tandem to make the project function successfully. Background Information The Global Positioning System, better known as the GPS, is a navigational system that supplies a user with a multitude of information about location and time by transmitting information from satellites. Implementing GPS data with a mobile robot allows the robot to travel through various points and chase down other robots, the two main objectives of the project. First, the robot should be able to navigate and travel through predefined points. Second, the robot should be able to chase and capture another mobile robot. To build a robot that accomplishes either of the two tasks, there are quintessential components, such as a compass sensor, an ultrasonic sensor and a GPS receiver. A compass sensor functions as a compass, the ultrasonic sensor detects obstacles, and the GPS Receiver obtains raw positional data. Design Process The project was broken into two phases, a handheld GPS (Phase 1) and a mobile GPS navigator (Phase 2): Handheld GPS (Phase 1): o Navigate with GPS, on foot o Write a program that uses the LEGO Mindstorms NXT controller, the GPS o receiver and a compass sensor to work as a handheld GPS Screen should display user-friendly data to travel efficiently from the origin to the destination Mobile GPS Navigator (Phase 2): o Navigate with mobile robot, using a GPS 1 of 5
o o Write a program that uses the NXT, the GPS receiver, the compass sensor and the ultrasonic sensor to make a mobile GPS that travels from the origin to the destination, or that chases and captures another mobile robot It should also find a detour when a direct route to the destination is blocked Hardware GPS Navigator Chase Bot Hardware Components: LEGO MINDSTORMS NXT Brick LEGO MINDSTORMS NXT Compass Sensor LEGO MINDSTORMS NXT Ultrasonic Sensor QStarz 818 extreme Bluetooth GPS receiver Arduino XBee Parts and Wheels from LEGO MINDSTORMS NXT kit The GPS Navigator Robot utilizes a 4-wheel drive mechanism, which helps the robot traverse over multiple terrains. The robot was inspired by Team Hassenplug s Green Monster robot. Software Highlights Chase Bot (Receiver): 1. Initialize Compass Sensor 2. Check if GPS is connected: A. If connected, continue B. Otherwise, give error and stop 3. Enable Bluetooth to receive raw data from connected GPS 4. While not within 0.5 UTM of Sender NXT 5. Enable XBEE raw mode and high-speed port 6. Send signal to Sender, asking for GPS data 7. Read and store one byte of sent GPS data, 46 times 8. After all data is stored, check if it begins with "$GPGGA" 2 of 5
A. If it does, parse data to get Latitude and Longitude B. Otherwise, go to asking for GPS data 9. Convert Longitude and Latitude into UTM coordinates of Sender 10. Record Receiver current position through the GPS 11. Parse data to get Latitude and Longitude 12. Convert Longitude and Latitude into UTM coordinates of Receiver 13. Use trigonometry to get the angle between Receiver's point and Sender's point 14. Convert angle to true bearing 15. Turn until compass value is within 5 degrees of the converted angle 16. Go towards Sender's point 17. Course correction A. Check if initial angle and current angle are within 5 degrees difference a. If they are within the margin, keep going forward and check distance to target point I. If distance to target point is more than 0.5 UTM, continue traveling II. If distance to target point is less than 0.5 UTM, stop, and send "STOP" signal to Sender b. If not within margin, go back to Step #4 *Sender's Point = Target *Receiver's Point = Source Target Bot (Sender): 1. Check if GPS is connected: A. If connected, continue B. Otherwise, give error and stop 2. Enable Bluetooth to receive raw data from connected GPS 3. While receiver NXT does not tell to STOP 4. Read one byte of data from GPS (while n < 47) A. If byte read is $, store in array and read next byte B. If first recorded byte is $ and next recording position is empty, store in array and read next byte C. Otherwise, continue 5. Check if first 6 characters of stored data is "$GPGGA" A. Start sending data to receiver NXT via XBee a. Enable XBee raw mode & high-speed port b. Wait for Receiver to ask for data I. If no signal given, try again II. Otherwise, store signal and continue c. Send a byte of recorded GPS data to Receiver NXT, 46 times, until all needed information is sent Module 3 of 5
Chase Bot Target Bot 4 of 5
Outstanding Issues Sometimes the Bluetooth connection between the GPS Receiver and NXT can falter, disrupting the robot as it either records and transmits points or navigates to other points. The GPS receiver cannot acquire data from the satellites inside a building the GPS receiver needs to be in an open space to get data from the satellites. This made the initial stages of the project difficult, as I was not able to see the raw information that was being transmitted to the GPS receiver. The GPS receiver needed a warm-up period in order to start receiving data from the satellites instantaneously. If the GPS receiver did not have a chance to warm-up, the initial points would not be as accurate as the points recorded later. (More at: https://jayjoshirobotics.wordpress.com/) 5 of 5