February 2018
Beginner
580 pages
13h 20m
English
In this section, we will discuss the workings of an action client. demo_action_client.cpp is the action client node that will send the goal value consisting of a number which is the goal. The client is getting the goal value from the command-line arguments. The first command-line argument of the client is the goal value, and the second is the time of completion for this task.
The goal value will be sent to the server and the client will wait until the given time, in seconds. After waiting, the client will check whether it completed or not; if it is not complete, the client will preempt the action.
The client code is a bit lengthy, so we will discuss the important sections of the code:
#include <actionlib/client/simple_action_client.h> ...