The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

raspberrypi.org/magpi The Official Raspberry Pi Projects Book 53


SATNAV FOR ROBOTS Projects


Left The path of a test drive, showing the
precision of the system with a floating
solution from the RTK calculation
Below An early version of Big Rob showing
the GPS system components, along with
an illuminated Sense HAT at the rear

>STEP-01
GPS modules
Both the robot and the base station feature
a Raspberry Pi equipped with a RasPiGNSS
Aldebaran module and Tallysman antenna
to receive satellite signals.

>STEP-02
XBee communication
XBee Pro modules, connected to Raspberry
Pis via XBee Explorer boards, are used for
long-range data communication between
the robot and base station units.

>STEP-03
Big Rob
Ingmar has equipped his Big Rob robot
with the differential GPS system, along with
a Sense HAT at the rear to aid orientation
when navigating between waypoints.

BUILD A GPS SYSTEM


Robotic navigation
So, how does it all work in
practice? Ingmar admits that
it can take a while to obtain
a GPS fix, depending on the
surroundings and weather.
“If I use the setup in open country
with no clouds, the calculation
of a fix position takes between
10 and 15 minutes. If I use it in
the yard with high buildings
around the base station and
robot, it could take up to an
hour to calculate only a floating
GPS position.”


Once it obtains a fix, the robot
moves continuously from one
waypoint to the next, checking its
orientation with the Sense HAT
magnetometer: “If a deviation of
five degrees is detected to the next
waypoint, the Python program
corrects the speed of the DC
motors to face the waypoint. Only
if the GPS signal gets lost will the
robot stop and wait for the next
calculated fix position.” Waypoints
can be entered in a Terminal
window or imported via a Google
Earth KML file.

Ingmar has a few ideas for
putting his differential GPS system
to practical use. “I will mount the
metal detector (as used on his
Discoverer robot) on the front of
Big Rob, and together with the
differential GPS setup, the robot
will be able to search very precisely
for metal in the ground. The next
idea is to mount, for example,
a lawnmower on the front or
to build a fertilizer spreader.
The differential GPS setup is
a key feature for many ideas
and setups.”
Free download pdf