logo资料库

Learning Robotics Using Python 原版pdf by Joseph.pdf

第1页 / 共321页
第2页 / 共321页
第3页 / 共321页
第4页 / 共321页
第5页 / 共321页
第6页 / 共321页
第7页 / 共321页
第8页 / 共321页
资料共321页,剩余部分请下载后查看
Table of Contents
Preface
Chapter 1: Introduction to Robotics
What is a robot?
History of the term robot
Modern definition of a robot
Where do robots come from?
What can we find in a robot?
A physical body
Sensors
Effectors
Controllers
How do we build a robot?
Reactive control
Hierarchical (deliberative) control
Hybrid control
Summary
Chapter 2: Mechanical Design of a Service Robot
Requirements of a service robot
Robot drive mechanism
Selection of motors and wheels
Calculation of RPM of motors
Calculation of motor torque
The design summary
Robot chassis design
Installing LibreCAD, Blender, and MeshLab
Installing LibreCAD
Installing Blender
Installing MeshLab
Creating a 2D CAD drawing of the robot using LibreCAD
The base plate design
Base plate pole design
Wheel, motor, and motor clamp design
Caster wheel design
Middle plate design
Top plate design
Working with a 3D model of the robot using Blender
Python scripting in Blender
Introduction to Blender Python APIs
Python script of the robot model
Questions
Summary
Chapter 3: Working with Robot Simulation Using ROS and Gazebo
Understanding robotic simulation
Mathematical modeling of the robot
Introduction to the differential steering system and robot kinematics
Explaining of the forward kinematics equation
Inverse kinematics
Introduction to ROS and Gazebo
ROS Concepts
Installing ROS Indigo on Ubuntu 14.04.2
Introducing catkin
Creating an ROS Package
Hello_world_publisher.py
Hello_world_subscriber.py
Introducing Gazebo
Installing Gazebo
Testing Gazebo with the ROS interface
Installing TurtleBot Robot packages on ROS Indigo
Installing Turtlebot ROS packages using apt package manager in Ubuntu
Simulating TurtleBot using Gazebo and ROS
Creating the Gazebo model from TurtleBot packages
What is a robot model, URDF, xacro, and robot state publisher?
Creating a ChefBot description ROS package
Simulating ChefBot and TurtleBot in a hotel environment
Questions
Summary
Chapter 4: Designing ChefBot Hardware
Specifications of the ChefBot hardware
Block diagram of the robot
Motor and encoder
Selecting motors, encoders, and wheels for the robot
Motor driver
Selecting a motor driver/controller
Embedded controller board
Ultrasonic sensors
Selecting ultrasonic sensor
Inertial Measurement Unit
Kinect
Central Processing Unit
Speakers/ mic
Power supply/battery
Working of the ChefBot hardware
Questions
Summary
Chapter 5: Working with Robotic Actuators and Wheel Encoders
Interfacing DC geared motor with Tiva C LaunchPad
Differential wheeled robot
Installing the Energia IDE
Interfacing code
Interfacing quadrature encoder with Tiva C Launchpad
Processing encoder data
Quadrature encoder interfacing code
Working with Dynamixel actuators
Questions
Summary
Chapter 6: Working with Robotic Sensors
Working with ultrasonic distance sensors
Interfacing HC-SR04 to Tiva C LaunchPad
Working of HC-SR04
Interfacing Code of Tiva C LaunchPad
Interfacing Tiva C LaunchPad with Python
Working with the IR proximity sensor
Working with Inertial Measurement Unit
Inertial Navigation
Interfacing MPU 6050 with Tiva C LaunchPad
Setting the MPU 6050 library in Energia
Interfacing code of Energia
Interfacing MPU 6050 to Launchpad with the DMP support using Energia
Questions
Summary
Chapter 7: Programming Vision Sensors Using Python and ROS
List of robotic vision sensors and image processing libraries
Introduction to OpenCV, OpenNI, and PCL
What is OpenCV?
Installation of OpenCV from source code in Ubuntu 14.04.2
Reading and displaying an image using the Python-OpenCV interface
Capturing from web camera
What is OpenNI
Installing OpenNI in Ubuntu 14.04.2
What is PCL?
Programming Kinect with Python using ROS, OpenCV, and OpenNI
How to launch OpenNI driver
The ROS interface of OpenCV
Creating ROS package with OpenCV support
Displaying Kinect images using Python, ROS, and cv_bridge
Working with Point Clouds using Kinect, ROS, OpenNI, and PCL
Opening device and Point Cloud generation
Conversion of Point Cloud to laser scan data
Working with SLAM using ROS and Kinect
Questions
Summary
Chapter 8: Working with Speech Recognition and Synthesis Using Python and ROS
Understanding speech recognition
Block diagram of a speech recognition system
Speech recognition libraries
CMU Sphinx/Pocket Sphinx
Julius
Windows Speech SDK
Speech synthesis
Speech synthesis libraries
eSpeak
Festival
Working with speech recognition and synthesis in Ubuntu 14.04.2 using Python
Setting Pocket Sphinx and its Python binding in Ubuntu 14.04.2
Working with Pocket Sphinx Python binding in Ubuntu 14.04.2
Output
Real-time speech recognition using Pocket Sphinx, GStreamer, and Python in Ubuntu 14.04.2
Speech recognition using Julius and Python in Ubuntu 14.04.2
Installation of Julius speech recognizer and Python module
Python-Julius client code
Improving speech recognition accuracy in Pocket Sphinx and Julius
Setting eSpeak and Festival in Ubuntu 14.04.2
Working with speech recognition and synthesis in Windows using Python
Installation of Speech SDK
Working with Speech recognition in ROS Indigo and Python
Installation of the pocketsphinx package in ROS Indigo
Working with speech synthesis in ROS Indigo and Python
Questions
Summary
Chapter 9: Applying Artificial Intelligence to ChefBot Using Python
Block diagram of the communication system in ChefBot
Introduction to AIML
Introduction to AIML tags
Introduction to PyAIML
Installing PyAIML on Ubuntu 14.04.2
Installing PyAIML from source code
Working with AIML and Python
Loading a single AIML file from the command-line argument
Working with A.L.I.C.E. AIML files
Loading AIML files into memory
Loading AIML files and saving them in brain files
Loading AIML and brain files using the Bootstrap method
Integrating PyAIML into ROS
aiml_server.py
aiml_client.py
aiml_tts_client.py
aiml_speech_recog_client.py
start_chat.launch
start_tts_chat.launch
start_speech_chat.launch
Questions
Summary
Chapter 10: Integration of ChefBot Hardware and Interfacing it into ROS, Using Python
Building ChefBot hardware
Configuring ChefBot PC and setting ChefBot ROS packages
Interfacing ChefBot sensors with Tiva C LaunchPad
Embedded code for ChefBot
Writing a ROS Python driver for ChefBot
Understanding ChefBot ROS launch files
Working with ChefBot Python nodes and launch files
Working with SLAM on ROS to build the map of the room
Working with ROS localization and navigation
Questions
Summary
Chapter 11: Designing a GUI for a Robot Using Qt and Python
Installing Qt on Ubuntu 14.04.2 LTS
Working with Python bindings of Qt
PyQt
Installing PyQt in Ubuntu 14.04.2 LTS
PySide
Installing PySide on Ubuntu 14.04.2 LTS
Working with PyQt and PySide
Introducing Qt Designer
Qt signals and slots
Converting a UI file into Python code
Adding a slot definition to PyQt code
Up and running of Hello World GUI application
Working with ChefBot's control GUI
Installing and working with rqt in Ubuntu 14.04.2 LTS
Questions
Summary
Chapter 12: The Calibration and Testing of ChefBot
The Calibration of Xbox Kinect using ROS
Calibrating the Kinect RGB camera
Calibrating the Kinect IR camera
Wheel odometry calibration
Error analysis of wheel odometry
Error correction
Calibrating the MPU 6050
Testing of the robot using GUI
Pros and cons of the ROS navigation
Questions
Summary
Index
Learning Robotics Using Python Design, simulate, program, and prototype an interactive autonomous mobile robot from scratch with the help of Python, ROS, and Open-CV! Lentin Joseph BIRMINGHAM - MUMBAI
Learning Robotics Using Python Copyright © 2015 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, and its dealers and distributors will be held liable for any damages caused or alleged to be 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. First published: May 2015 Production reference: 1250515 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78328-753-6 www.packtpub.com Cover image by Jarek Blaminsky (milak6@wp.pl)
Table of Contents Preface Chapter 1: Introduction to Robotics What is a robot? History of the term robot Modern definition of a robot Where do robots come from? What can we find in a robot? The physical body Sensors Effectors Controllers How do we build a robot? Reactive control Hierarchical (deliberative) control Hybrid control Summary Chapter 2: Mechanical Design of a Service Robot Requirements of a service robot The Robot drive mechanism Selection of motors and wheels Calculation of RPM of motors Calculation of motor torque The design summary Robot chassis design [ i ] ix 1 2 2 4 7 11 12 12 12 13 14 14 14 15 16 17 18 18 19 19 20 20 21
Installing LibreCAD, Blender, and MeshLab Installing LibreCAD Installing Blender Installing MeshLab Creating a 2D CAD drawing of the robot using LibreCAD The base plate design Base plate pole design Wheel, motor, and motor clamp design Caster wheel design Middle plate design Top plate design Python scripting in Blender Introduction to Blender Python APIs Python script of the robot model Working with a 3D model of the robot using Blender Questions Summary Chapter 3: Working with Robot Simulation Using ROS and Gazebo Understanding robotic simulation Mathematical modeling of the robot Introduction to the differential steering system and robot kinematics Explaining of the forward kinematics equation Inverse kinematics Introduction to ROS and Gazebo ROS Concepts Installing ROS Indigo on Ubuntu 14.04.2 Introducing catkin Creating an ROS package Hello_world_publisher.py Hello_world_subscriber.py Introducing Gazebo Installing Gazebo Testing Gazebo with the ROS interface Installing TurtleBot Robot packages on ROS Indigo Installing TurtleBot ROS packages using the apt package manager in Ubuntu Simulating TurtleBot using Gazebo and ROS Creating the Gazebo model from TurtleBot packages What is a robot model, URDF, xacro, and robot state publisher? Creating a ChefBot description ROS package Simulating ChefBot and TurtleBot in a hotel environment Questions Summary [ ii ] 22 23 23 23 24 27 28 29 30 31 32 32 33 34 36 41 42 43 43 46 47 48 53 54 55 58 61 61 62 64 66 67 68 69 72 72 74 76 77 86 91 91 Table of Contents
Chapter 4: Designing ChefBot Hardware Specifications of the ChefBot hardware Block diagram of the robot Motor and encoder Selecting motors, encoders, and wheels for the robot Motor driver Selecting a motor driver/controller Embedded controller board Ultrasonic sensors Selecting the ultrasonic sensor Inertial Measurement Unit Kinect Central Processing Unit Speakers/ mic Power supply/battery 93 94 94 95 96 97 99 101 102 103 104 105 106 108 108 110 Working of the ChefBot hardware 111 Questions Summary 112 Chapter 5: Working with Robotic Actuators and Wheel Encoders 113 114 Interfacing DC geared motor with Tiva C LaunchPad 116 118 121 124 125 128 132 136 136 137 137 138 139 140 142 144 147 147 149 150 152 Inertial Navigation Interfacing MPU 6050 with Tiva C LaunchPad Setting up the MPU 6050 library in Energia Interfacing code of Energia Processing encoder data Quadrature encoder interfacing code Working with Dynamixel actuators Questions Summary Chapter 6: Working with Robotic Sensors Working with ultrasonic distance sensors Interfacing HC-SR04 to Tiva C LaunchPad Working of HC-SR04 Interfacing code of Tiva C LaunchPad Interfacing Tiva C LaunchPad with Python Working with the IR proximity sensor Working with Inertial Measurement Unit Differential wheeled robot Installing the Energia IDE Interfacing code Interfacing quadrature encoder with Tiva C Launchpad [ iii ] Table of Contents
Interfacing MPU 6050 to Launchpad with the DMP support using Energia Questions Summary Chapter 7: Programming Vision Sensors Using Python and ROS List of robotic vision sensors and image processing libraries Introduction to OpenCV, OpenNI, and PCL What is OpenCV? Installation of OpenCV from source code in Ubuntu 14.04.2 Reading and displaying an image using the Python-OpenCV interface Capturing from web camera What is OpenNI Installing OpenNI in Ubuntu 14.04.2 What is PCL? Programming Kinect with Python using ROS, OpenCV, and OpenNI How to launch OpenNI driver The ROS interface of OpenCV Creating ROS package with OpenCV support Displaying Kinect images using Python, ROS, and cv_bridge Working with Point Clouds using Kinect, ROS, OpenNI, and PCL Opening device and Point Cloud generation Conversion of Point Cloud to laser scan data Working with SLAM using ROS and Kinect Questions Summary Chapter 8: Working with Speech Recognition and Synthesis Using Python and ROS Understanding speech recognition Block diagram of a speech recognition system Speech recognition libraries CMU Sphinx/Pocket Sphinx Julius Windows Speech SDK Speech synthesis Speech synthesis libraries eSpeak Festival 155 160 161 163 163 168 168 169 170 171 173 174 174 175 175 176 176 177 181 181 183 184 185 185 187 188 188 189 189 190 190 190 191 191 191 [ iv ] Table of Contents
Working with speech recognition and synthesis in Ubuntu 14.04.2 using Python Setting up Pocket Sphinx and its Python binding in Ubuntu 14.04.2 Working with Pocket Sphinx Python binding in Ubuntu 14.04.2 Output Real-time speech recognition using Pocket Sphinx, GStreamer, and Python in Ubuntu 14.04.2 Speech recognition using Julius and Python in Ubuntu 14.04.2 Installation of Julius speech recognizer and Python module Python-Julius client code Improving speech recognition accuracy in Pocket Sphinx and Julius Setting up eSpeak and Festival in Ubuntu 14.04.2 Working with speech recognition and synthesis in Windows using Python Installation of the Speech SDK Working with Speech recognition in ROS Indigo and Python Installation of the pocketsphinx package in ROS Indigo Working with speech synthesis in ROS Indigo and Python Questions Summary Chapter 9: Applying Artificial Intelligence to ChefBot Using Python Block diagram of the communication system in ChefBot Introduction to AIML Introduction to AIML tags Introduction to PyAIML Installing PyAIML on Ubuntu 14.04.2 Installing PyAIML from source code Working with AIML and Python Loading a single AIML file from the command-line argument Working with A.L.I.C.E. AIML files Loading AIML files into memory Loading AIML files and saving them in brain files Loading AIML and brain files using the Bootstrap method Integrating PyAIML into ROS aiml_server.py aiml_client.py aiml_tts_client.py [ v ] 192 192 193 194 195 198 198 199 201 201 202 203 204 204 205 207 207 209 210 211 211 214 215 215 215 216 218 218 219 220 221 221 223 223 Table of Contents
分享到:
收藏