Skip to content

Commit e82c80d

Browse files
authored
docs(TurtleSim): improve TurtleSim diagram (#218)
1 parent 1c2e2d8 commit e82c80d

File tree

2 files changed

+69
-73
lines changed

2 files changed

+69
-73
lines changed

DroidControlShip.code-workspace

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55
}
66
],
77
"settings": {
8-
"editor.formatOnSave": true
8+
"editor.formatOnSave": true,
9+
"cSpell.words": [
10+
"cppcheck",
11+
"teleop",
12+
"Ulzer",
13+
"wbsim",
14+
"webots",
15+
"Webots",
16+
"XRCE",
17+
"zumo",
18+
"Zumo"
19+
]
920
}
10-
}
21+
}
Lines changed: 56 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,89 @@
11
@startuml TurtleSim for DCS
22

3-
node "PC" as pc {
4-
3+
node "PC" {
54
package "Webots" {
6-
component "World-file" <<world>> as world
7-
component "WebotsSim" <<executable>> as wbsim
8-
component "Zumo" <<proto>> as wbZumo
9-
component "ZumoComSystem" <<proto>> as wbDcs
10-
component "ROS2SupervisorProto" <<proto>> as WbRos2Proto
5+
component "WebotsSim" <<executable>> as wbsim
6+
component "World file" <<world>> as world
7+
component "Zumo" <<proto>> as wbZumoProto
8+
component "ZumoComSystem" <<proto>> as wbDcsProto
9+
component "ROS2SupervisorProto" <<proto>> as wbRos2Proto
1110

1211
wbsim ..> world
13-
wbsim ..> wbZumo
14-
wbsim ..> wbDcs
15-
wbsim ..> WbRos2Proto
12+
wbsim ..> wbZumoProto
13+
wbsim ..> wbDcsProto
14+
wbsim ..> wbRos2Proto
1615
}
17-
18-
note bottom of Webots
19-
Standard Zumo World Setup
16+
note left of Webots
17+
Standard Zumo world setup
2018
end note
2119

2220
package "ROS2" {
2321
cloud "ROS2 Logical Network" as ros2LogicalNetwork
2422

2523
node "teleop_turtle" <<executable>> as teleopTurtle {
26-
component "/teleop_turtle" <<ros2-node>> as teleop_turtle_node
24+
component "/teleop_turtle" <<ros2-node>> as teleopTurtleNode
2725
}
28-
node "DCS" <<executable>> as dcs {
29-
Package "AppTurtle" <<app>> as turtleApp #YellowGreen {
3026

27+
node "Ros2SuperVisor" <<executable>> as wbSupervisorApp {
28+
component "/Ros2SuperVisor/Ros2SuperVisor" <<ros2-node>> as ros2SupervisorNode
29+
note bottom of ros2SupervisorNode
30+
Simulation time through /clock topic.
31+
May not be required.
32+
end note
33+
}
34+
35+
node "DroidControlShip" <<executable>> as dcs {
36+
package "AppTurtle" <<app>> as turtleApp #YellowGreen {
3137
component "libController" <<lib>>
3238
component "MicroRosClient" <<lib>>
33-
34-
}
35-
component "/dcs_zumo" <<ros2-node>> as dcs_zumo_node #YellowGreen{
36-
37-
}
38-
component "/dcs" <<ros2-node>> as dcs_node {
39-
4039
}
40+
note left of turtleApp
41+
Translates between ROS2 messaging and
42+
RemoteControl SerMux protocol.
43+
end note
44+
45+
component "/dcs" <<ros2-node>> as dcsNode
46+
note bottom of dcsNode
47+
Not used for TurtleSim.
48+
Only shown as an example for
49+
cs specific node.
50+
Could be GPS, LEDs...
51+
end note
52+
53+
component "/dcs_zumo" <<ros2-node>> as dcs_zumo_node #YellowGreen
4154
}
42-
43-
node "Ros2SuperVisor" <<executable>> as wbSuperVisorApp {
44-
component "/Ros2SuperVisor/Ros2SuperVisor" <<ros2-node>> as wb_ros2_supervisor
45-
}
46-
47-
node "micro-ROS\nAgent" <<executable>> as agent {
48-
49-
}
50-
51-
turtleApp .u.> dcs_node
52-
turtleApp .u.> dcs_zumo_node
53-
54-
teleop_turtle_node ---> dcs_zumo_node : Twist-Messages
55-
56-
agent -u-> ros2LogicalNetwork
57-
dcs <-> agent : \n\nXRCE Protocol over UDP
58-
59-
note bottom of dcs_node
60-
Not used for turtle sim
61-
Only shown as example for
62-
cs specific node.
63-
Could be GPS, leds ...
64-
end note
65-
66-
note right of turtleApp
67-
Translate between ROS2 messaging and
68-
RemoteControl SerMux
69-
end note
70-
7155
note left of dcs
7256
DCS is a ROS2 package
7357
that acts as a webots controller.
7458
end note
7559

76-
note bottom of wb_ros2_supervisor
77-
Simulation time through /clock topic.
78-
May not be required.
79-
end note
80-
}
60+
node "micro-ROS\nAgent" <<executable>> as uRosAgent
61+
62+
turtleApp .u.> dcsNode
63+
turtleApp .u.> dcs_zumo_node
8164

82-
Package "RadonUlzer" {
83-
component "RemoteControl" <<app>> as RuRcApp {
65+
teleopTurtleNode ---> dcs_zumo_node : geometry_msgs/Twist
8466

85-
}
67+
uRosAgent -u-> ros2LogicalNetwork
68+
dcs <-> uRosAgent : \n\nXRCE protocol over UDP
8669
}
8770

88-
interface PortOrPipe
89-
note left of PortOrPipe
71+
node "RadonUlzer" <<executable>> as radonUlzer {
72+
component "RemoteControl" <<app>> as radonUlzerRcApp
73+
}
74+
75+
interface Socket as iSocket
76+
note left of iSocket
9077
Webots Controller API Messages
91-
TcpIp Port or Pipe
78+
over TCP/IP socket.
9279
end note
9380

94-
cloud "ROS2 Logical Network" as ros2LogicalNetwork
95-
96-
wbsim -u-() PortOrPipe
97-
turtleApp --( PortOrPipe : To ZumoComSystem Proto
81+
wbsim -u-() iSocket
82+
turtleApp --( iSocket : To ZumoComSystem proto
83+
radonUlzer --( iSocket : To Zumo proto
9884

99-
turtleApp <-> RuRcApp : SerMux Protocol
100-
RuRcApp --( PortOrPipe : To Zumo Proto
85+
turtleApp <-> radonUlzerRcApp : SerMux over simulated serial comm in Webots
10186

102-
WbRos2Proto ---- wb_ros2_supervisor
87+
wbRos2Proto ---- ros2SupervisorNode
10388

104-
@enduml
89+
@enduml

0 commit comments

Comments
 (0)