Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering Beaglebone Robotics
Mastering Beaglebone Robotics

Mastering Beaglebone Robotics: Master the power of the BeagleBone Black to maximize your robot-building skills and create awesome projects

Arrow left icon
Profile Icon Richard Grimmett
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4 (8 Ratings)
Paperback Dec 2014 234 pages 1st Edition
eBook
$25.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Richard Grimmett
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4 (8 Ratings)
Paperback Dec 2014 234 pages 1st Edition
eBook
$25.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$25.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Mastering Beaglebone Robotics

Chapter 1. Preparing the BeagleBone Black

The BeagleBone Black, with its low cost and amazing package of functionalities, provides an excellent set of core functionalities to build robotic projects. In this book, you'll build three robotics projects, each with a differing array of fascinating functionalities. Hopefully, these will inform and inspire you so that you'll feel comfortable creating your own dream projects in robotics.

But let's not get ahead of ourselves. In this book, I'm going to assume quite a bit of knowledge of not only the BeagleBone Black, but also programming in general and specifically Linux. If you're truly a beginner, you'll have to start with my other book on the BeagleBone Black, BeagleBone Robotic Projects, Packt Publishing. However, I'm not going to assume that you've read the other book, so this first chapter will lead you through, in an accelerated way, the steps you'll need to follow from unpacking to having a BeagleBone Black that is configured to be successful in building complex robotics projects. To understand this book, you'll also need a bit more knowledge of how to connect electronic devices. You'll use the General-Purpose Input/Output (GPIO) pins and even a soldering iron to build these robots.

In this chapter, you will learn about the following:

  • Installing an operating system
  • Installing a vision library and sound capabilities
  • Creating and recording sounds
  • Making your BeagleBone speak
  • Installing speech recognition
  • Improving accuracy of speech recognition
  • Adding additional hardware and software for a fully functional core system

So let's start with unpacking our BeagleBone Black. For this chapter, you'll need the following hardware:

  • A BeagleBone Black board
  • A BeagleBone Black USB power cable
  • A LAN cable
  • A USB sound device that has a plug for a microphone and a speaker
  • A microphone
  • A speaker
  • A USB Wi-Fi dongle (this is optional; needed if you want to communicate with the BeagleBone Black via a wireless LAN).

Unpacking and powering up

Let's unpack the single-board computer hardware device. Your BeagleBone Black will come in a box—in a static protection bag, with a USB cable that can power the unit from a USB connection. It should look somewhat like this:

Unpacking and powering up

The USB connection not only supplies power to the host computer, but also provides a simple, yet fairly limited, way to communicate with the board. You'll use this USB cable for power, but that's about it.

Note

You can also choose to power the BeagleBone Black using the 5 V barrel jack. One that works well is from Adafruit, available at https://www.adafruit.com/products/276.

If you've never worked with the BeagleBone Black before, the beagleboard.org site can lead you through the first few steps, from powering on to making sure your board is up and working, and to some initial communications with the board.

You must know that there are several versions of the board now. The latest, at the time of the writing of this book, is version C. The most significant change from Version B to Version C is that Version C has a 4 GB eMMC disk. Even this might be a bit small for your projects, and you're going to use an 8 GB to 16 GB micro SD card anyway, so either version should be fine.

Installing an operating system

The first thing you need to do is install a useful operating system into an 8 GB, 16 GB, or 32 GB micro SD card—just a little background for this. Initially, the default operating system on the internal memory was a version of Linux called Ångström. Version C is now shipped with a version of Debian. You're going to move to a different operating system called Ubuntu, a close relative of Debian, but with a larger feature set and community of support. It'll make the projects you are about to tackle much easier.

Now the BeagleBone Black is getting popular enough, so you can buy a micro SD card that already has Ubuntu installed. Nevertheless, you can easily download it and then install it on the card. If you're going to download a distribution, you'll need to make sure you're getting the latest version of Ubuntu.

Note

The easiest way to download is to go to one of the several sites that have an image you can put on your card. One is at www.armhf.com/boards/beaglebone-black/#saucy and another is at elinux.org/Beagleboard:Ubuntu_On_BeagleBone_Black.

Both of these sites come with instructions for building a card with the image on it. You'll need to use the username and password of the image you downloaded. Unfortunately, they are not the same for all images, but you should be able to easily find them in the same place where you found your image.

Connecting to an external computer

In this book, I'm going to assume that you'll be developing your code on an external computer while you create your projects. I'll primarily be using a Windows PC for development, but everything I'll be doing will also be available if you are using a Linux machine as the host computer. Whenever there are any significant differences between the two, I'll try to include details for both.

To do this development remotely, you'll need access to the BeagleBone Black via some type of LAN connection. To establish this connection, simply connect a LAN cable from a router or switch to the BeagleBone board, plug it into the LAN connector, and restart the BeagleBone.

Note

You can also use an FTDI console cable like the ones sold at https://www.adafruit.com/products/954, which are connected to the BeagleBone Black's J1 console UART pins.

Refer the following link for details about setup: http://elinux.org/Beagleboard:BeagleBone_Black_Accessories

You'll need to know the IP address of your BeagleBone Black. You can certainly get this by adding a display and keyboard to the device, logging in, and typing ifconfig in the prompt. However, if you want to do this without rounding up the additional hardware, then you can use an IP scan tool to scan for the address of the BeagleBone Black. I used a tool called Advanced IP Scanner, but there are others available too. If you're using Linux as a host machine, you can try the nmap command in Linux. For example, you can type sudo nmap –PR –sP 192.168.1.0/24.

These will explore your network and then print the address where there are devices, the BeagleBone Black being one of those devices. Generally, there are two types of IP addresses that your board can be assigned: one is called static and the other is called dynamic.

In the static case, you will always be assigned the same address. In the dynamic case, the address might change each time the system boots, as it asks the system for an address, which it then uses for that session. Most systems are configured for the dynamic case. However, if your system isn't changing the address, you will most likely get the same address each time you power on and log in to the system.

Once you have the address, you should create an SSH connection to the BeagleBone Black. An SSH terminal is a Secure Shell Hyperterminal connection, which simply means that you'll be able to access your board and type commands in the prompt, just like you have done without the Windows system. In order to do this, you need to have a terminal emulator on your remote computer. For Microsoft Windows, I would suggest you to use an application called PuTTY. It is free and does a very good job by allowing you to save your configuration, so you don't have to type it every time. You can go to www.putty.org for details on how to download and use PuTTY.

If you want to do this from a Linux machine, the process is even simpler. Open a terminal window and then type ssh ubuntu@157.201.194.187 –p 22. This will then bring you to the login screen of your BeagleBone Black.

SSH is an excellent way to communicate with your BeagleBone Black. However, you'll sometimes need a graphical look at your system. You can get this by installing a graphical interface on the BeagleBone Black and then using an application called VNC server.

Installing a Windows manager

First, let's install the Windows manager on your BeagleBone Black. Ubuntu generally comes with a very full-featured Windows system. However, it uses a good deal of memory and can interfere with the performance you might need later. So you should install a light Windows system at the top of your Ubuntu distribution. There are several choices, of which I like using Xfce. It is stable, seems to work well, and offers a fairly complete set of capabilities while not overwhelming your system resources. Before getting started, first type sudo apt-get update. This will update all the latest information about installation. To install the Windows manager, type sudo apt-get install xfce4. Again, the system will prompt you for your password and then start the installation. For large installations, the Linux system will ask you if you want to proceed. If you don't always want to type in y to this, you can use apt-get –y to automatically answer with a yes. This installation will take a significant amount of time as it has to install not only the Windows system, but also a number of packages the windowing system depends on.

Now that you have a graphical interface, you'll need to install a version of VNC server on your BeagleBone Black by typing sudo apt-get install tightvncserver in a terminal window on your BeagleBone Black. The TightVNC server is an application that will allow you to remotely view your complete Windows system. Once you have it installed, you'll need to start the server by typing vncserver in a terminal window on the BeagleBone Black. You will then be prompted for a password. This can, and preferably should, be a different password than the password using which you access your BeagleBone Black. This will be the password your remote system will send to access the VNC server running on the board. Select a password and your VNC server will be running. You only need to set this password once. Besides, you don't need to set the password for the view-only capability.

You'll need a VNC viewer application for your remote computer. On my Windows system, I used an application called Real VNC. Go to www.realvnc.com for information on how to set up and use this application. You can now access all the capabilities of your system. However they might be slower if you are doing graphics-intensive data transfers. You'll see this as you work through your projects. VNC viewer is also available via Linux.

You now have a basic BeagleBone Black configuration, so you can add some additional core packages you'll be using in the projects.

Left arrow icon Right arrow icon

Description

If you want a simple guide to building complex robots, then this book is for you. You'll need some programming knowledge and experience working with mechanical systems.

What you will learn

  • Power up the BeagleBone Black to develop with both Python and C
  • Control DC motors to guide a tracked robot forward, backward, and side to side
  • Add sonar and infrared sensors to let your robot see its own way
  • Use a USB webcam to have your robot seek out and track colored objects or movements
  • Communicate with the servomotors of a robosailboat using a longrange wireless interface
  • Teach your robosailboat to navigate to a bearing and distance using GPS
  • Connect your BeagleBone Black to a flight controller to guide robots through the air
  • Make your robots autonomous and capable of controlling themselves

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 22, 2014
Length: 234 pages
Edition : 1st
Language : English
ISBN-13 : 9781783988907
Vendor :
BeagleBoard.org
Category :
Languages :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Dec 22, 2014
Length: 234 pages
Edition : 1st
Language : English
ISBN-13 : 9781783988907
Vendor :
BeagleBoard.org
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 146.97
Mastering Beaglebone Robotics
$48.99
BeagleBone Black Cookbook
$48.99
BeagleBone Robotic Projects
$48.99
Total $ 146.97 Stars icon

Table of Contents

12 Chapters
1. Preparing the BeagleBone Black Chevron down icon Chevron up icon
2. Building a Basic Tracked Vehicle Chevron down icon Chevron up icon
3. Adding Sensors to Your Tracked Vehicle Chevron down icon Chevron up icon
4. Vision and Image Processing Chevron down icon Chevron up icon
5. Building a Robot that Can Walk Chevron down icon Chevron up icon
6. A Robot that Can Sail Chevron down icon Chevron up icon
7. Using GPS for Navigation Chevron down icon Chevron up icon
8. Measuring Wind Speed – Integrating Analog Sensors Chevron down icon Chevron up icon
9. An Underwater Remotely Operated Vehicle Chevron down icon Chevron up icon
10. A Quadcopter Chevron down icon Chevron up icon
11. An Autonomous Quadcopter Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(8 Ratings)
5 star 37.5%
4 star 62.5%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Massera Riccardo Feb 13, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I liked very much reading this book, it is a very simple and well written guide to develop many fully functional projects based on the BeagleBone Black board.After an introductory chapter, needed to get familiar with the BeagleBone Black board and install on it the operating system and the needed tools, every chapter will deal with a project of a specific kind of robot.Even if you do not have a strong background or you are not very familiar with DC motors, servos, controllers and other devices and parts used throughout the book, the author will guide you step by step, explaining the basic principles, the material needed, where to purchase it and how to put all together in a functioning robot.Every project in the book has a set of pictures of the components that help you understand the pinout and the connections that must be made as well as screenshots of the user interface of some tools; there are also screenshots of the code needed to program the robot and the most relevant parts of the code have an explanation statement by statement.To sum up, if you have some idea or project in mind that requires building a robot then this is the book for you.
Amazon Verified review Amazon
VizRTPhil May 05, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book doesn't hold your hand to the finish for these projects, but it gets you started, and points you in the right direction to continue. That's exactly what I wanted.
Amazon Verified review Amazon
CNC guy Feb 09, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I enjoyed Richard's first book, but it pales in comparison to this book. As with the first book, about the only negative thing I could say about this book is that USB is used for nearly everything despite having 66 GPIO lines available on the BBB. That said, several viable and sophisticated robotic projects are presented in this book.As the author of Hacking and Penetration Testing with Low Power Devices (Syngress, 2015), I do a lot of work with the BeagleBone Black. One of the things that I present in my book is an aerial hacking drone based on the BBB. I'm giving serious consideration to modifying the quadcopter presented in this book for use as the next version of my aerial hacking drone.
Amazon Verified review Amazon
Raúl Feb 02, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I really enjoyed reading this book and following its tutorials, it is well explained and it has some interesting topics that will help you start on your next robot, wether it is ground, air, water or even like a submarine. On the other hand, I will not recommend this book for beginners due to its target level, from intermediate to advance users, people that already have good foundations of electronics, or read previous books about a BeagleBone setup.From the book, I liked the sections about the underwater operations and the autonomous quadcopter, which generally are not explained in books of the kind "Robotics With..", although they are just a mere introduction to what can be achieved; everything will have images and screenshots of what's needed to follow the chapter and end up with a functional robot capable of operate by its own.I would totally recommend this book if you already have a BeagleBone and want to do something exciting with it.
Amazon Verified review Amazon
Jaume Aragay Badia Feb 19, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This is a good book, but be prepared to read a lot of external pages and buy extra boards and materials (the robot body for every chapter) if you intend to build the projects and learn (really basic) robotics using the BeagleBone as the center of the projects.After an intro to the BeagleBone it presents different projects, one on each chapter. I like that there are some explanations on why some things are done the way they are, but mainly it's a recipe book: "write this, then that" to install the different libraries that get the work done.The projects are nice and advanced but you learn to plug different boards to the BeagleBone to do the work instead of using the BeagleBone on it's own as some other reviewer said before me. It's the core of the projects but some work is delegated on other boards, even an Arduino.Where does it loose the fifth star?- There are mistakes on some formulas. I haven't tested the code on the projects, so I don't know about the code.- The use of screen captures for code with light grey text on a black background. It's not easy to read neither to follow to see what it's doing.If you want to know the capabilities of the BeagleBone, this is a good book. It also introduces some other technologies related to robotics and has a lot of links to external sources to get more info on those topics. So, in the end, you get a lot of info from external links in a single place, this book, than works as a launchpad to a whole world of basic robotics around the BeagleBone.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.