February 2018
Beginner
580 pages
13h 20m
English
In this section, we will discuss demo_action_server.cpp. The action server receives a goal value that is a number. When the server gets this goal value, it will start counting from zero to this number. If the counting is complete, it will successfully finish the action, if it is preempted before finishing, the action server will look for another goal value.
This code is a bit lengthy, so we can discuss the important code snippet of this code.
Let's start with the header files:
#include <actionlib/server/simple_action_server.h> #include "mastering_ros_demo_pkg/Demo_actionAction.h"
The first header is the standard action library to implement an action server node. The second header is generated from the stored ...