Skip to content

Commit 516595f

Browse files
author
Murilo Marinho
committed
[services] Improving mermaid diagram
1 parent 66fb4b0 commit 516595f

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

docs/source/service_servers_and_clients.rst

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,27 @@ The :code:`ServiceServer` will provide a service that can be accessed by one or
1111
In this sense, a :code:`Service` is much less of an abstract entity than a :code:`Topic`.
1212
Each :code:`Service` should only have a single :code:`ServiceServer` that will receive a :code:`Request` and provide a :code:`Response`.
1313

14-
.. mermaid:: Action client and server sequence diagram.
15-
16-
%%{init: { "theme" : "dark" }}%%
17-
graph LR;
18-
A[Service Client #1] --> B[Service Server]
19-
C[Service Client #2] --> B
20-
B --> A
21-
B --> C
14+
Diagram
15+
-------
16+
17+
.. mermaid::
18+
19+
---
20+
config:
21+
theme: redux-dark-color
22+
look: neo
23+
---
24+
sequenceDiagram
25+
Service Client 1 ->>+ Service Server: service_client.call_async()
26+
loop
27+
Service Client 1-->Service Client 1: rclpy.spin()
28+
end
29+
Service Server -->>- Service Client 1: ServiceServerNode.service_callback()
30+
Service Client 2 ->>+ Service Server: service_client.call_async()
31+
loop
32+
Service Client 2-->Service Client 2: rclpy.spin()
33+
end
34+
Service Server -->>- Service Client 2: ServiceServerNode.service_callback()
2235

2336
Create the package
2437
------------------

0 commit comments

Comments
 (0)