Robot Operating System (ROS) for Absolute Beginners: Robotics Programming Made Easy

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Start programming your own robots using Robot Operation System (ROS). Targeted for absolute beginners in ROS, Linux, and Python, this guide lets you build your own robotics projects. 
You'll learn the basic foundation of Ubuntu Linux. Begin with the fundamentals. Installation and useful commands will give you the basic tools you need while programming a robot. Then add useful software applications that can be used while making robots. Programming robots can be done using any of the programming languages. Most popular programming languages are Python and C++. You will incorporate the fundamentals of C++ by learning object oriented programing concepts from example and building  C++ projects.
Finally, tackle an ROS hands-on project to apply all the concepts of ROS you've learned. The aim of the project is to perform a dead-reckoning using a cheap mobile robot. You can command your robot's position on Rviz and your robot will move to that position! Not only will you learn to program, you'll gain hands-on experience working with hardware to create a real robot.

What You’ll Learn
  • Install Ubuntu 20
  • Install ROS Noetic
  • Use ROS Programming with roscpp and rospy 
  • Build a mobile robot from scratch using ROS

Who This Book Is For
Robotics enthusiast with little or no prior programming experience.

Author(s): Lentin Joseph
Edition: 2
Publisher: Apress
Year: 2022

Language: English
Commentary: Publisher PDF
Pages: 300
City: New York, NY
Tags: Robot Operating System; ROS; Linux; Ubuntu; C++; Python

Table of Contents
About the Authors
About the Technical Reviewer
Acknowledgments
Chapter 1: Getting Started with Ubuntu Linux for Robotics
Getting Started with GNU/Linux
What Is Ubuntu?
Why Ubuntu for Robotics?
Installing Ubuntu
Minimum PC Requirements
Downloading Ubuntu
Installing VirtualBox
Creating a VirtualBox Machine
Step 1: Adding a New Virtual Machine
Step 2: Naming the Guest Operating System
Step 3: Allocating RAM for the Guest OS
Step 4: Creating a Virtual Hard Disk
Step 5: Configuring the Type of Virtual Disk
Step 6: Choosing Ubuntu DVD Image
Step 7: Starting Virtual Machine
Installing Ubuntu on VirtualBox
Installing Ubuntu on a PC
Playing with the Ubuntu Graphical User Interface
The Ubuntu File System
Useful Ubuntu Applications
Getting Started with Shell Commands
Terminal Commands Cheat Sheet
man: Manual Pages for Shell Commands
ls: List Directory Content
cd: Change Directory
pwd: Current Terminal Path
mkdir: Create a Folder
rm: Delete a File
rmdir: Delete a Folder
mv: Move a File from One Place to Another
cp: Copy a File from One Path to Another
dmesg: Display a Kernel Message
lspci: List of PCI Devices in the System
lsusb: List of USB Devices in the System
sudo: Run a Command in Administrative Mode
ps: List the Running Process
kill: Kill a Process
apt-get: Install a Package in Ubuntu
dpkg -i: Install a Package in Ubuntu
reboot: Reboot the System
poweroff: Switch Off the System
htop: Terminal Process View
nano: Text Editor in Terminal
Summary
Chapter 2: Fundamentals of C++ for Robotics Programming
Getting Started with C++
Timeline: The C++ Language
C/C++ in Ubuntu Linux
Introduction to GCC and G++ Compilers
Installing C/C++ Compiler
Verifying Installation
Introduction to GNU Project Debugger (GDB)
Installing GDB in Ubuntu Linux
Verifying Installation
Writing Your First Code
Explaining Code
Compiling Your Code
Debugging Your Code
Learning OOP Concepts from Examples
The Differences Between Classes and Structs
C++ Classes and Objects
Class Access Modifier
C++ Inheritance
C++ Files and Streams
Namespaces in C++
C++ Exception Handling
C++ Standard Template Libraries
Building a C++ Project
Creating a Linux Makefile
Creating a CMake File
Summary
Chapter 3: Fundamentals of Python for Robotics Programming
Getting Started with Python
Timeline: The Python Language
Python in Ubuntu Linux
Introduction to Python Interpreter
Setting Python 3 on Ubuntu 20.04 LTS
Verifying Python Installation
Writing Your First Code
Running Python Code
Understanding Python Basics
What’s New in Python?
Static and Dynamic Typing
Code Indentation
Semicolons
Python Variables
Python Input and Conditional Statement
Python: Loops
Python: Functions
Python: Handling Exception
Python: Classes
Python: Files
Python: Modules
Python: Handling Serial Ports
Installing PySerial in Ubuntu 20.04
Python: Scientific Computing and Visualization
Python: Machine Learning and Deep Learning
Python: Computer Vision
Python: Robotics
Python: IDEs
Summary
Chapter 4: Kick-Starting Robot Programming Using ROS
What Is Robot Programming?
Why Robot Programming Is Different
Getting Started with ROS
The ROS Equation
Robot Programming Before and After ROS
The History of ROS
Before and After ROS
Why Use ROS?
Installing ROS
Robots and Sensors Supporting ROS
Popular ROS Computing Platforms
ROS Architecture and Concepts
The ROS File System
ROS Computation Concepts
The ROS Community
ROS Command Tools
ROS Demo: Hello World Example
ROS Demo: turtlesim
Moving the Turtle
Moving the Turtle in a Square
ROS GUI Tools: Rviz and Rqt
Summary
Chapter 5: Programming with ROS
Programming Using ROS
Creating a ROS Workspace and Package
ROS Build System
ROS Catkin Workspace
src Folder
build Folder
devel Folder
install Folder
Creating a ROS Package
Using ROS Client Libraries
roscpp and rospy
Header Files and ROS Modules
Initializing a ROS Node
Printing Messages in a ROS Node
Creating a Node Handle
Creating a ROS Message Definition
Publishing a Topic in ROS Node
Subscribing a Topic in ROS Node
Writing the Callback Function in ROS Node
The ROS Spin Function in ROS Node
The ROS Sleep Function in ROS Node
Setting and Getting a ROS Parameter
The Hello World Example Using ROS
Creating a hello_world Package
Creating a ROS C++ Node
Editing the CMakeLists.txt File
Building C++ Nodes
Executing C++ Nodes
Creating Python Nodes
Executing Python Nodes
Creating Launch Files
Visualizing a Computing Graph
Programming turtlesim Using rospy
Moving turtlesim
Printing the Robot’s Position
Moving the Robot with Position Feedback
Reset and Change the Background Color
Programming TurtleBot Simulation Using rospy
Installing TurtleBot 3 Packages
Launching the TurtleBot Simulation
Gazebo Simulation
Moving a Fixed Distance Using a Python Node
Finding Obstacles
Programming Embedded Boards Using ROS
Interfacing Arduino with ROS
Installing ROS on a Raspberry Pi
Burning an Ubuntu Mate Image to a Micro SD Card
Booting to Ubuntu
Installing ROS on a Raspberry Pi
Summary
Chapter 6: Robotics Project Using ROS
Getting Started with Wheeled Robots
Differential Drive Robot Kinematics
Building Robot Hardware
Buying Robot Components
Robot Chassis
Additional Motors and Wheels
Motor Driver
Optical Encoder
Microcontroller Board
Bluetooth Breakout
Sharp IR Range Sensor
Block Diagram of the Robot
Assembling Robot Hardware
Creating a 3D ROS Model Using URDF
Working with Robot Firmware
Programming Robot Using ROS
The Teleop Node
The Twist Message to Motor Velocity Node
The Diff to TF Node
The Dead-Reckoning Node
Final Run
Summary
Index