Writing an action server
In this section, you’ll write your first action server. In this server, we will be able to receive goals. When a goal is received, we will decide whether to accept or reject it. If it’s accepted, we will execute the goal. For this application, executing the goal means we will start to count from zero to the target number and wait for the provided delay between each iteration. Once the goal has been executed, we will return a result to the client.
That’s what we will implement in the code, starting with Python and then C++. In this section, we start only with the minimum functionalities for the action communication to work correctly. We will add the feedback and cancel mechanisms later. Since actions are a bit more complex than topics and services, let’s start simple and go step by step.
For a better learning experience, make sure you use the GitHub code while following along as I will not necessarily display all lines in this...