Lentin Joseph

Robot Operating System for Absolute Beginners

Robotics Programming Made Easy

Lentin Joseph

Cheerakathil House, Aluva, Kerala, India

Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book’s product page, located at www.​apress.​com/​978-1-4842-3404-4 . For more detailed information, please visit http://​www.​apress.​com/​source-code .

ISBN 978-1-4842-3404-4

e-ISBN 978-1-4842-3405-1

https://doi.org/10.1007/978-1-4842-3405-1

Library of Congress Control Number: 2018945056

© Lentin Joseph 2018

This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.

Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.

While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.

Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.

I dedicate this book to my parents, C. G. Joseph and Jancy Joseph, for giving me strong support in making this project happen.

Table of Contents

  1. Chapter 1:​ Getting Started with Ubuntu Linux for Robotics
    1. Getting Started with GNU/​Linux
      1. What Is Ubuntu?​
      2. Why Ubuntu for Robotics?​
    2. Installing Ubuntu
      1. Recommended PC Requirements
      2. Downloading Ubuntu
      3. Installing VirtualBox
      4. Creating a VirtualBox Machine
      5. Installing Ubuntu on VirtualBox
      6. Installing Ubuntu on a PC
    3. Playing with the Ubuntu Graphical User Interface
      1. The Ubuntu File System
      2. Useful Ubuntu Applications
    4. Getting Started with Shell Commands
      1. Terminal Commands Cheat Sheet
    5. Summary
  2. Chapter 2:​ Fundamentals of C++ for Robotics Programming
    1. Getting Started with C++
      1. Timeline:​ The C++ Language
    2. C/​C++ in Ubuntu Linux
      1. Introduction to GCC and G++ Compilers
      2. Installing C/​C++ Compiler
      3. Verifying Installation
      4. Introduction to GNU Project Debugger (GDB)
    3. Learning OOP Concepts from Examples
      1. The Differences Between Classes and Structs
      2. C++ Classes and Objects
      3. Class Access Modifier
      4. C++ Inheritance
      5. C++ Files and Streams
      6. Namespaces in C++
      7. C++ Exception Handling
      8. C++ Standard Template Libraries
    4. Building a C++ Project
      1. Creating a Linux Makefile
      2. Creating a CMake File
    5. Summary
  3. Chapter 3:​ Fundamentals of Python for Robotics Programming
    1. Getting Started with Python
      1. Timeline:​ The Python Language
    2. Python in Ubuntu Linux
      1. Introduction to Python Interpreter
      2. Installing Python on Ubuntu 16.​04 LTS
      3. Verifying Python Installation
      4. Writing Your First Code
      5. Understanding Python Basics
    3. Summary
  4. Chapter 4:​ Kick-Starting Robot Programming Using ROS
    1. What Is Robot Programming?​
      1. Why Robot Programming Is Different
    2. Getting Started with ROS
      1. The ROS Equation
      2. Robot Programming Before and After ROS
      3. The History of ROS
      4. Before and After ROS
      5. Why Use ROS?​
      6. Installing ROS
      7. Robots and Sensors Supporting ROS
      8. Popular ROS Computing Platforms
      9. ROS Architecture and Concepts
      10. The ROS File System
      11. ROS Computation Concepts
      12. The ROS Community
      13. ROS Command Tools
      14. ROS Demo:​ Hello World Example
      15. ROS Demo:​ turtlesim
      16. ROS GUI Tools:​ Rviz and Rqt
    3. Summary
  5. Chapter 5:​ Programming with ROS
    1. Programming Using ROS
    2. Creating a ROS Workspace and Package
      1. ROS Build System
      2. ROS Catkin Workspace
      3. Creating a ROS Package
    3. Using ROS Client Libraries
      1. roscpp and rospy
      2. The Hello World Example Using ROS
      3. Programming turtlesim Using rospy
      4. Programming TurtleBot Simulation Using rospy
    4. Programming Embedded Boards Using ROS
      1. Interfacing Arduino with ROS
      2. Installing ROS on a Raspberry Pi
    5. Summary
  6. Chapter 6:​ Robotics Project Using ROS
    1. Getting Started with Wheeled Robots
    2. Differential Drive Robot Kinematics
    3. Building Robot Hardware
      1. Buying Robot Components
      2. Block Diagram of the Robot
      3. Assembling Robot Hardware
    4. Creating a 3D ROS Model Using URDF
    5. Programming Robot Firmware
    6. Programming Robot Using ROS
      1. Creating a Bluetooth-ROS Driver for the Robot
      2. The Teleop Node
      3. The Twist Message to Motor Velocity Node
      4. The Odometry Node
      5. The Dead-Reckoning Node
    7. Final Run
    8. Summary
  7. Index

About the Author and About the Technical Reviewer

About the Author

Lentin Joseph is an author and a robotics entrepreneur from India. He runs a robotics software company called Qbotics Labs. He has seven years of experience in the robotics domain, especially in the Robot Operating System, OpenCV, and PCL.

He has authored four books in ROS, including Learning Robotics Using Python (Packt Publishing, 2015), Mastering ROS for Robotics Programming (first & second edition) (Packt Publishing, 2015), and ROS Robotics Projects (Packt Publishing, 2015).

He is currently doing research for the Robotics Institute at Carnegie Mellon University.

About the Technical Reviewer

A453257_1_En_BookFrontmatter_Figb_HTML.jpg

Massimo Nardone has more than 22 years of experiences in security, web/mobile development, the cloud, and IT architecture. His true IT passions are security and Android.

He has been programming and teaching how to program with Android, Perl, PHP, Java, VB, Python, C/C++, and MySQL for more than 20 years.

He holds a Master of Science degree in computing science from the University of Salerno, Italy.

He has worked as a project manager, software engineer, research engineer, chief security architect, information security manager, PCI/SCADA auditor, and senior lead IT security/cloud/SCADA architect for many years.

His technical skills include security, Android, Cloud, Java, MySQL, Drupal, Cobol, Perl, web and mobile development, MongoDB, D3, Joomla, Couchbase, C/C++, WebGL, Python, Pro Rails, Django CMS, Jekyll, Scratch, and more.

He is currently the chief information security officer (CISO) at Cargotec Oyj.

He worked as a visiting lecturer and supervisor for exercises at the Networking Laboratory of the Helsinki University of Technology (Aalto University). He holds four international patents (in the PKI, SIP, SAML, and Proxy areas).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.90.141