Want to develop novel robot applications, but don’t know how to write a mapping or object-recognition system? You’re not alone, but you’re certainly not without help. By combining real-world examples with valuable knowledge from the Robot Operating System (ROS) community, this practical book provides a set of motivating recipes for solving specific robotics use cases.
Ideal for enthusiasts, from students in robotics clubs to professional robotics scientists and engineers, each recipe describes a complete solution using ROS open source libraries and tools. You’ll learn how to complete tasks described in the recipes, as well as how to configure and recombine components for other tasks. If you’re familiar with Python, you’re ready to go.
Learn fundamentals, including key ROS concepts, tools, and patterns
Program robots that perform an increasingly complex set of behaviors, using the powerful packages in ROS
See how to easily add perception and navigation abilities to your robots
Integrate your own sensors, actuators, software libraries, and even a whole robot into the ROS ecosystem
Learn tips and tricks for using ROS tools and community resources, debugging robot behavior, and using C++ in ROS
The ROS Graph
catkin, Workspaces, and ROS Packages
Names, Namespaces, and Remapping
The Tab Key
tf: Coordinate Transforms
Publishing to a Topic
Subscribing to a Topic
Defining Your Own Message Types
Mixing Publishers and Subscribers
Defining a Service
Implementing a Service
Using a Service
Defining an Action
Implementing a Basic Action Server
Using an Action
Implementing a More Sophisticated Action Server
Using the More Sophisticated Action
Chapter 6Robots and Simulators
Creating a Package
Reading Sensor Data
Sensing and Actuation: Wander-bot!
Moving Around Using ROS
Chapter 9Building Maps of the World
Maps in ROS
Recording Data with rosbag
Starting a Map Server and Looking at a Map
Chapter 10Navigating About the World
Localizing the Robot in a Map
Using the ROS Navigation Stack
Navigating in Code
Joints, Links, and Kinematic Chains
The Key to Success
Installing and Running a Simulated R2
Moving R2 from the Command Line
Moving R2 Around a Chessboard
Operating the Hand
Modeling a Chessboard
Playing Back a Famous Chess Game
Perception and Behavior
Detecting the Line
Following the Line
Chapter 13On Patrol
Defining State Machines with smach
Patrolling with State Machines
Driving to Bins
Picking Up the Item
Bringing Your Own Stuff into ROS
Chapter 15Your Own Sensors and Actuators
Adding Your Own Sensors
Adding Your Own Actuators
Chapter 16Your Own Mobile Robot
ROS Message Interface
Modeling the Robot: URDF
Simulation in Gazebo
Chapter 17Your Own Mobile Robot: Part 2
Adding a Laser Sensor
Configuring the Navigation Stack
Using rviz to Localize and Command a Navigating Robot
Chapter 18Your Own Robot Arm
ROS Message Interface
Modeling the Robot: URDF
Simulation in Gazebo
Using rviz to Send Goals
Chapter 19Adding a Software Library
Make Your Robot Talk: pyttsx
Tips and Tricks
The Master and Friends: roscore
Navigating the Filesystem: roscd
Starting a Node: rosrun
Starting Many Nodes: roslaunch
Testing a Many-Node System: rostest
Introspection: rosnode, rostopic, rosmsg, rosservice, and rossrv
Chapter 21Debugging Robot Behavior
Log Messages: /rosout and rqt_console
Nodes, Topics, and Connections: rqt_graph and rosnode
Morgan Quigley is a cofounder of the Open Source Robotics Foundation (OSRF), which develops and maintains the Robot Operating System (ROS). He came to OSRF after receiving a PhD in computer science at Stanford University, where he created one of the ancestors of ROS as part of the Stanford AI Robot (STAIR) project in 2006 and 2007. As it became clear that the future of robotics software was in collaborative development, this effort led him to cofound the ROS project with many other engineers. His research interests include robot software systems, open source software and firmware, embedded systems design, mechatronics, and sensor design.
Brian Gerkey is cofounder and CEO of OSRF. Prior to joining OSRF, he was Director of Open Source Development at Willow Garage. Previously, Brian was a Computer Scientist in the Artificial Intelligence Center at SRI, and before that, a postdoctoral research fellow in the Artificial Intelligence Lab at Stanford University. Brian received his PhD in computer science from the University of Southern California (USC) in 2003, his MS in computer science from USC in 2000, and his BSE in computer engineering, with a secondary major in mathematics and a minor in robotics and automation, from Tulane University in 1998. Since 2008, he has worked on the ROS Project, which develops and releases one of the most widely used robot software platforms in robotics research and education (and soon industry). He is founding and former lead developer on the open source Player Project, which continues to maintain widely used robot simulation and development tools.
Bill Smart is an associate professor at Oregon State University, where he codirects the Robotics program. His research interests span the areas of mobile robotics, machine learning, human–robot interaction, and the interaction between robotics and the law. Bill has been writing software for robots for over two decades, and doing active research and development of robot software architectures for over 15 years. At Oregon State University, he codirects the Robotics program and teaches classes in robotics and computer programming at both the undergraduate and graduate levels. He has been a ROS user since the beginning and was involved in some of the early planning workshops for the system. In 2010–11, he spent a 15-month sabbatical at Willow Garage, developing software for PR2 robots and enjoying the weather in California.
The animal on the cover of Programming Robots with ROS is a Salim Ali's fruit bat (Latidens salimalii). Named after the famed Indian ornithologist, the Salim Ali's fruit bat remains a rare species about which little is known, more than 60 years since it was first collected and mistaken for a short-nosed fruit bat. Confined to rainforests at the southern tip of the Indian Peninsula, in the vicinity of the Western Ghats mountain range that runs along the Arabian Sea, the Salim Ali's fruit bat is one of the more endangered species in a region acknowledged as one of the world's most biodiverse.
Members of the megabat suborder to which fruit bats belong do not feed on insects. Rather, they use long tongues to slurp out the nectar of flowers, or use specially adapted teeth to bite into fruit, from which they often drink only the juice. The consequence of the fruit bat's frequent interaction with flowers is a mutually beneficial relationship known as chiropterophily, in which the flowers rely on herbivorous bats to carry pollen from one flower to another. The megabat's consumption of fruit—primarily figs or the fruit of the bead tree, in the case of the Salim Ali's fruit bat—also perform the function of dispersing seeds.
By mechanisms that are not clear, the fruit bat's herbivorous nature has deprived almost all members of the Megachiroptera suborder of the ability to use echolocation. It is possible, according to some research, that the economy of energy achieved by insectivorous bats, whose flight activities also seem to physiologically prepare the bat for the vocalizations that act like submarine pings in echolocation, is not as easily realized by the heartier-meal-eating and generally bigger fruit bats. The megabats' larger eyes and keener sense of smell appear to compensate.
The last 25 years of the Salim Ali fruit bat's history have seen its status as a species threatened by extinction change from "rare" to "critically endangered" to the more optimistic "endangered." Research has indicated that there is a greater population and range than was previously recorded, and efforts have been made to discourage the private owners of the land on which the bat maintains roosts from hunting it as a pest or for its rumored medicinal value. However, the outlook for the survival of the species is still not bright, as humans continue to encroach on and fragment its primary habitat.
Many of the animals on O'Reilly covers are endangered; all of them are important to the world. To learn more about how you can help, go to animals.oreilly.com.