Skip to content

Commit cbeaa5a

Browse files
author
Murilo Marinho
committed
[actions] Adding mermaid diagram for the action server.
1 parent 3ede53f commit cbeaa5a

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

docs/source/action_clients.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ calls for the goal and the result, the node is free to do other tasks while thos
3636
end
3737
Action Server -->>- Action Client: ActionClientNode.action_result_callback()
3838

39-
Overview
40-
--------
39+
Action Client
40+
-------------
4141

4242
#. Create the Node with an :code:`ActionClient`.
4343
#. Update the :file:`setup.py` so that :program:`ros2 run` finds the node (if needed).

docs/source/action_servers.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,29 @@ While being conscious of our objectives, for any action server, it is important
1616
#. Publish feedback as it becomes available. Without feedback, an Action might always be replaced more effectively by a Service.
1717
#. Set the final state of the goal and send a Result.
1818

19+
20+
Diagram
21+
-------
22+
23+
This is the sequence diagram from the point of view of the action server. The major difference with a service server
24+
is the need to process and send feedback until the action is completed or aborted.
25+
26+
.. mermaid::
27+
28+
%%{init: { "theme" : "dark" }}%%
29+
sequenceDiagram
30+
participant Action Client as Action Client
31+
participant Action Server as Action Server
32+
autonumber
33+
Action Client ->>+ Action Server: ActionServer.callback(ServerGoalHandle)
34+
loop While action has not ended
35+
Action Server -->> Action Client: ServerGoalHandle.publish_feedback()
36+
end
37+
Action Server -->>- Action Client: return Action.Result()
38+
39+
Action Server
40+
-------------
41+
1942
In this section, we will do the following.
2043

2144
#. Create the node with an :code:`ActionServer`.

0 commit comments

Comments
 (0)