Hands-On Robotics Programming with C++
Leverage Raspberry Pi 3 and C++ libraries to build intelligent robotics applications
Dinesh Tavasalkar
BIRMINGHAM - MUMBAI
Hands-On Robotics Programming with C++
Copyright 2019 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Vijin Boricha
Acquisition Editor: Shrilekha Inani
Content Development Editor: Abhijit Sreedharan
Technical Editor: Mohd Riyan Khan
Copy Editor: Safis Editing
Language Support Editor : Mary McGowan
Project Coordinator: Jagdish Prabhu
Proofreader: Safis Editing
Indexer: Priyanka Dhadke
Graphics: Tom Scaria
Production Coordinator: Jisha Chirayil
First published: March 2019
Production reference: 1290319
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78913-900-6
www.packtpub.com
This book is dedicated to my mentor, Asha Sundararajan. It was under her guidance that I began my career in robotics.
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Packt.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.
At www.packt.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Dinesh Tavasalkar is a trainer and online instructor from India. He has trained more than 8,000+ students on topics related to robotics, Internet of Things, Arduino, Raspberry Pi, Android app development, augmented reality, and virtual reality. Dinesh's online courses have been undertaken by 25,000+ people on Udemy from more than 150+ countries. Some of his popular courses on Udemy include Robotics for beginners, Smartphone Control Robot using Arduino and Android, Build Augmented Reality apps using Unity and Vuforia, and Build Virtual Reality games for Google Cardboard using Unity. He also runs a YouTube channel called EngineersDream, where he teaches Android application development.
About the reviewers
Lentin Joseph is an author and robotics entrepreneur from India. He runs a robotics software company called Qbotics Labs in India. He has 8 years' experience in the robotics domain, primarily in ROS, OpenCV, and PCL. He has authored seven books on ROS, namely Learning Robotics Using Python, (First and Second Editions), Mastering ROS for Robotics Programming, (First and Second Editions), ROS Robotics Projects, Robot Operating System for Absolute Beginners, and ROS Programming. He did his master's in robotics in India and also did some research at Robotics Institute, CMU, USA.
Shahid Memon holds an MSc in autonomous robotics engineering and possesses a BSc in Computer Science. He has collaborated with colleagues on product feasibility studies and new product ideas to meet clients' needs and support companies' objectives. He has coordinated several product development projects and assisted in the design and testing phases. He is a strategic thinker with the ability to drive company goals and analyze research to impact product and business needs. He is an avid researcher of the latest trends within the technology industry and how these trends affects business. He is a proven leader with outstanding communication, interpersonal, project management, and supervisory skills.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Preface
C++ is one of the most popular legacy programming languages for robotics, and a combination of C++ and robotics hardware is used in many leading industries. This book will bridge the gap between Raspberry Pi and C/C++ programming and enable you to develop applications for Raspberry Pi. To follow along with the projects covered in the book, you can implement C programs in Raspberry Pi with the wiringPi library.
With this book, youll develop a fully functional car robot and write programs to move it in different directions. Youll then create an obstacle-avoiding robot using an ultrasonic sensor. Furthermore, youll find out how to control the robot wirelessly using your PC/Mac. This book will also help you work with object detection and tracking using OpenCV, and guide you through exploring face detection techniques. Finally, you will create an Android app and control the robot wirelessly with an Android smartphone.
By the end of this book, you will have gained experience in developing a robot using Raspberry Pi and C/C++ programming.
Who this book is for
This book is designed for developers, programmers, and robotics enthusiasts interested in leveraging C++ to build exciting robotics applications. Some prior knowledge of C++ is necessary.
Next page