ebook img

ROS Robotics By Example PDF

428 Pages·2016·9.117 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview ROS Robotics By Example

ROS Robotics By Example Bring life to your robot using ROS robotic applications Carol Fairchild Dr. Thomas L. Harman BIRMINGHAM - MUMBAI ROS Robotics By Example Copyright © 2016 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 authors, 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: June 2016 Production reference: 1240616 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78217-519-3 www.packtpub.com Credits Authors Project Coordinator Carol Fairchild Kinjal Bari Dr. Thomas L. Harman Proofreader Safis Editing Reviewer Shweta Gupte Indexer Hemangini Bari Commissioning Editor Dipika Gaonkar Graphics Kirk D'Penha Acquisition Editors Vivek Anantharaman Prachi Bisht Production Coordinator Shantanu N. Zagade Content Development Editor Mehvash Fatima Cover Work Shantanu N. Zagade Technical Editor Devesh Chugh Copy Editors Roshni Banerjee Gladson Monteiro Rashmi Sawant About the Authors Carol Fairchild is the owner and principal engineer of Fairchild Robotics, a robotics development and integration company. She is a researcher at Baxter's Lab at the University of Houston–Clear Lake (UHCL) and a member of the adjunct faculty. Her research involves the use of Baxter for expanded applications. Ms. Fairchild has been involved in many aspects of robotics from her earliest days of building her first robot, a Heathkit Hero. She has an MS in computer engineering from UHCL and a BS in engineering technology from Texas A&M. Ms. Fairchild has taught middle-school robotics, coached FLL, and volunteered for FIRST Robotics in Houston. Dr. Thomas L. Harman is the chair of the engineering division at UHCL. His research interests are control systems and applications of robotics and microprocessors. Several of his research papers with colleagues involve robotic and laser applications in medicine. In 2005, he was selected as the UHCL Distinguished Professor. He has been a judge and safety advisor for the FIRST robotic contests in Houston. Dr. Harman has authored or coauthored 18 books on subjects including microprocessors, MATLAB and Simulink applications, and the National Electrical Code. His laboratory at UHCL has a Baxter two-armed robot and several TurtleBots as well as other robots. About the Reviewer Shweta Gupte is an embedded systems engineer with 4 years of experience in the robotics field. She has worked with robots both at the software level and at the low-level hardware interface. She has experience in working with embedded system design, RTOS, microcontroller programming and low-level robot interfaces , motion planning, and computer vision. Shweta has experience programming in C, embedded C, Java, MATLAB, and microcontroller assembly language. She has worked with low-level controllers, including the Renesas RX62, Renesas QSK, Arduino, PIC, and Rasberry Pi. Currently, she is working at Mathworks to develop MATLAB and Simulink products for robotics and embedded targets, including developing automated test beds and hardware testing. She has a master's degree in electrical engineering and a bachelor's degree in electronics and telecommunication. Her interests include playing with low- cost microcontroller-based robots and quadrotors. She likes to spend her spare time rock climbing and fostering rescued dogs. www.PacktPub.com eBooks, discount offers, and more 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.PacktPub. com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.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. TM https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books. Why subscribe? • Fully searchable across every book published by Packt • Copy and paste, print, and bookmark content • On demand and accessible via a web browser Table of Contents Preface xi Chapter 1: Getting Started with ROS 1 What does ROS do and what are the benefits of learning ROS? 2 Who controls ROS? 3 Which robots are using ROS? 3 Installing and launching ROS 5 Configuring your Ubuntu repositories 5 Setting up your sources.list 6 Setting up your keys 6 Installing ROS Indigo 6 Initialize rosdep 7 Environment setup 8 Getting rosinstall 8 Troubleshooting – examining your ROS environment 8 Creating a catkin workspace 9 ROS packages and manifest 10 ROS manifest 11 Exploring the ROS packages 11 rospack find packages 12 rospack list 13 ROS nodes and ROS Master 13 ROS nodes 14 Nodes can publish and nodes can subscribe 14 ROS Master 15 Invoking the ROS Master using roscore 15 ROS commands to determine the nodes and topics 17 [ i ] Table of Contents Turtlesim, the first ROS robot simulation 18 Starting turtlesim nodes 19 rosrun command 19 Turtlesim nodes 21 Turtlesim topics and messages 23 rostopic list 24 rostopic type 24 rosmsg list 24 rosmsg show 25 rostopic echo 25 Parameter Server of turtlesim 26 rosparam help 27 rosparam list for /turtlesim node 27 Change parameters for the color of the turtle's background 28 ROS services to move turtle 29 rosservice call 30 ROS commands summary 31 Summary 32 Chapter 2: Creating Your First Two-Wheeled ROS Robot (in Simulation) 33 Rviz 34 Installing and launching rviz 34 Using rviz 36 Displays panel 36 Views and Time panels 37 Toolbar 38 Main window menu bar 38 Creating and building a ROS package 39 Building a differential drive robot URDF 40 Creating a robot chassis 41 Using roslaunch 42 Adding wheels 45 Adding a caster 48 Adding color 49 Adding collisions 51 Moving the wheels 52 A word about tf and robot_state_publisher 54 Adding physical properties 54 Trying URDF tools 56 check_urdf 56 urdf_to_graphiz 56 [ ii ] Table of Contents Gazebo 57 Installing and launching Gazebo 58 Using roslaunch with Gazebo 59 Using Gazebo 60 Environment toolbar 60 World and Insert panels 61 Joints panel 62 Main window menu bar 62 Simulation panel 63 Modifications to the robot URDF 63 Adding the Gazebo tag 63 Specifying color in Gazebo 64 A word about <visual> and <collision> elements in Gazebo 64 Verifying a Gazebo model 64 Viewing the URDF in Gazebo 65 Tweaking your model 67 Moving your model around 67 Other ROS simulation environments 69 Summary 69 Chapter 3: Driving Around with TurtleBot 71 Introducing TurtleBot 72 Loading TurtleBot simulator software 74 Launching TurtleBot simulator in Gazebo 75 Problems and troubleshooting 77 ROS commands and Gazebo 78 Keyboard teleoperation of TurtleBot in simulation 80 Setting up to control a real TurtleBot 82 TurtleBot standalone test 83 Networking the netbook and remote computer 84 Types of networks 85 Network addresses 85 Remote computer network setup 87 Netbook network setup 88 Secure Shell (SSH) connection 88 Summary of network setup 89 Troubleshooting your network connection 89 Testing the TurtleBot system 90 TurtleBot hardware specifications 91 TurtleBot dashboard 92 [ iii ]

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.