Book Image

Learning ROS for Robotics Programming Second Edition

Book Image

Learning ROS for Robotics Programming Second Edition

Overview of this book

Table of Contents (27 chapters)
Learning ROS for Robotics Programming Second Edition
Credits
About the Author
Acknowledgments
About the Author
Acknowledgments
About the Author
Acknowledgments
About the Author
Acknowledgments
About the Reviewer
About the Reviewer
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Sending goals


We are sure that you have been playing with the robot by moving it around the map a lot. This is funny but a little tedious, and it is not very functional.

Perhaps you were thinking that it would be a great idea to program a list of movements and send the robot to different positions with only a button, even when we are not in front of a computer with rviz.

Okay, now you are going to learn how to do it using actionlib.

The actionlib package provides a standardized interface for interfacing with tasks. For example, you can use it to send goals for the robot to detect something at a place, make scans with the laser, and so on. In this section, we will send a goal to the robot, and we will wait for this task to end.

It could look similar to services, but if you are doing a task that has a long duration, you might want the ability to cancel the request during the execution, or get periodic feedback about how the request is progressing. You cannot do this with services. Furthermore...