Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
BeagleBone Robotic Projects

You're reading from  BeagleBone Robotic Projects

Product type Book
Published in Dec 2013
Publisher Packt
ISBN-13 9781783559329
Pages 244 pages
Edition 1st Edition
Languages
Author (1):
Richard Grimmett Richard Grimmett
Profile icon Richard Grimmett

Table of Contents (18) Chapters

BeagleBone Robotic Projects
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Getting Started with the BeagleBone Black Programming the BeagleBone Black Providing Speech Input and Output Allowing the BeagleBone Black to See Making the Unit Mobile – Controlling Wheeled Movement Making the Unit Very Mobile – Controlling Legged Movement Avoiding Obstacles Using Sensors Going Truly Mobile – Remote Control of Your Robot Using a GPS Receiver to Locate Your Robot System Dynamics By Land, Sea, and Air Index

Chapter 9. Using a GPS Receiver to Locate Your Robot

Based on the previous projects, you now have mobile robots that can move around, accept commands, see, and even avoid obstacles. This project will help you locate your robot while it moves, which can be useful for a robot that is fully autonomous.

Mission briefing


The robot is mobile, but let's not let it get lost. You're going to add a GPS receiver so that you can always know where you are.

Why is it awesome?

As you let your device free, you may not only want it to know where it is, but also to have a way of finding out if it has made it to the desired location. One of the coolest things to connect to the robot is a GPS location device. In this project, I'll show you how to connect a GPS receiver to your robot and then use it to move in the correct direction.

Your objectives

In this project we will cover the following:

  • Connecting the BeagleBone Black to a GPS device

  • Accessing the GPS programmatically and determining how to move to a location

Mission checklist

In this project, you'll need a GPS device. There are a lot of options, and they come with many different interfaces, but because we want to avoid using a soldering iron or other complex connection processes, we're going to choose one with a USB interface. Here is an image of a device...

Connecting the BeagleBone Black to a GPS device


Unpack your GPS device; it is time to get started.

Prepare for lift off

Before we get started, let me first give you a brief tutorial on GPS. GPS, which stands for Global Positioning System, is a system of satellites that transmits signals. GPS devices use these signals to calculate a position. There are a total of 24 satellites transmitting signals all around the earth at any given moment, but your device can only see the signal from a much smaller set of satellites.

Each of these satellites transmits a very accurate time signal that your device can receive and interpret. It receives the time signal from each of these satellites, and then based on the delay, the time it takes the signal to reach the device, it calculates the receiver's position based on a procedure called triangulation. The following two diagrams illustrate how the device uses the delay differences from three satellites to calculate its position:

The GPS device is able to detect...

Accessing the GPS programmatically and determining how to move to a location


Now that you can access your GPS device, let's work on accessing the data programmatically.

Prepare for lift off

Your project should now have the GPS connected and have access to querying the data via the serial port. In this section, you will create a program to use this data to discover where you are, and then you can determine what to do with that information.

Engage thrusters

If you completed the last section, you should be able to receive the raw data from the GPS unit. Now you want to be able to take this data and do something with it, for example, find your current location and altitude and then decide if your target location is to the west, east, north, or south.

First, get the information out of the raw data. As noted earlier, our position and speed is in the $GPMRC output of our GPS. First, write a program to simply parse out a couple of pieces of info from that data. So open a new file (you can name it location...

Mission accomplished


Congratulations! Your robot can now get around without getting lost. You can use the info to plan routes to different waypoints and track where your robot has been.

A challenge


One of the ways to display positional information is to use a graphical display including a map of your current position. There are several map applications that can interface with your GPS to indicate your location on a map. Here is an excellent tutorial on this: https://www.sparkfun.com/tutorials/403. You won't need to execute the HW configuration part of the tutorial, but will be able to start with the section Read a GPS and plot position with Python.

lock icon The rest of the chapter is locked
You have been reading a chapter from
BeagleBone Robotic Projects
Published in: Dec 2013 Publisher: Packt ISBN-13: 9781783559329
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}