Reader small image

You're reading from  Raspberry Pi Robotics Essentials

Product typeBook
Published inJun 2015
Publisher
ISBN-139781785284847
Edition1st Edition
Concepts
Right arrow
Author (1)
Richard Grimmett
Richard Grimmett
author image
Richard Grimmett

Dr. Richard Grimmett has been fascinated by computers and electronics from his very first programming project, which used Fortran on punch cards. He has bachelor's and master's degrees in electrical engineering and a PhD in leadership studies. He also has 26 years of experience in the radar and telecommunications industries, and even has one of the original brick phones. He now teaches computer science and electrical engineering at Brigham Young University, Idaho, where his office is filled with his many robotics projects.
Read more about Richard Grimmett

Right arrow

Chapter 7. Accessing Your Biped Remotely

Now that your biped is up and running, you'll want to able to send it on its way into the world, but still be able to monitor and control it remotely. This will help you in development as well as deployment and will open up all sorts of new scenarios and applications.

In this chapter, you will learn:

  • How to add a wireless LAN dongle to your biped robot and set it up as a wireless access point

  • How to control your biped robot using this access and a joystick

  • How to use the wireless LAN connection to get First Person Video (FPV) back so that you can see what your biped robot is seeing

Adding a wireless dongle and creating an access point


In Chapter 1, Configuring and Programming Raspberry Pi, you learned how to add a wireless dongle and have the Raspberry Pi connect to your wireless network. This is a useful way to access the Raspberry Pi, but if you want to take your robot outside the coverage of your wireless LAN, you'll want to set it up as an access point.

The first step in doing this is to install the wireless LAN device. One device that is inexpensive and easy to configure is the Edimax Wifi Adapter device (the product information is available at http://www.edimax.com/edimax/merchandise/merchandise_detail/data/edimax/global/wireless_adapters_n150/ew-7811un). It is available at most online electronic outlets:

Once you have installed the device and booted Raspberry Pi, type lsusb command. This should display something like the following screenshot:

The Edimax device is listed in the set of devices connected to the USB port. Now, execute the following steps:

  1. Make sure...

Adding a joystick remote control


Now that you can access your Raspberry Pi from a remote computer, you can SSH, just like you may have been doing with a wired connection, issue commands, and even control the biped using the remote computer. This introduces a number of different possibilities, one of which is to control your project with a joystick connected to the remote computer.

To add the game controller, you'll need to first find a game controller that can connect to your computer. If you are using Microsoft Windows as the OS on the host computer, pretty much any USB controller that can connect to a PC will work. The same type of controller also works if you are using Linux for the remote computer. In fact, you can use another Raspberry Pi as the remote computer.

Since the joystick will be connected to the remote computer, you'll need to run two programs: one on the remote computer and one on the Raspberry Pi on the biped robot. You'll also need a way to communicate between them. In the...

Adding the capability to see remotely


Your biped can now get information from your remote computer and respond to joystick key presses, but you may want to be able to see what the biped sees from its webcam. This is straightforward to configure with a webcam, vncserver, and the capability you used in Chapter 6, Adding Vision to Your Biped. Using this method, you can easily get a picture of what your biped is seeing, and it should be something like the following:

Now you can both see where your robot is going and control it via a joystick.

Summary


That's it, but really it is only the beginning. Your robot has some basic motions and some basic control capability, but now you should also have the knowledge and skills to take your biped robot much further. You can teach it how to dance, follow gestures, and almost anything that you can imagine.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Raspberry Pi Robotics Essentials
Published in: Jun 2015Publisher: ISBN-13: 9781785284847
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.
undefined
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

Author (1)

author image
Richard Grimmett

Dr. Richard Grimmett has been fascinated by computers and electronics from his very first programming project, which used Fortran on punch cards. He has bachelor's and master's degrees in electrical engineering and a PhD in leadership studies. He also has 26 years of experience in the radar and telecommunications industries, and even has one of the original brick phones. He now teaches computer science and electrical engineering at Brigham Young University, Idaho, where his office is filled with his many robotics projects.
Read more about Richard Grimmett