Skip to content

Commit 2a126ca

Browse files
committed
corrected Figure numbers
1 parent d7f7399 commit 2a126ca

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

  • _docs/concepts/client_library/execution_management

_docs/concepts/client_library/execution_management/index.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@ Now we describe common software design patterns which are used in mobile robotic
122122

123123
**Concept:**
124124

125-
A common design paradigm in mobile robotics is a control loop, consisting of several phases: A sensing phase to aquire sensor data, a plan phase for localization and path planning and an actuation-phase to steer the mobile robot. Of course, more phases are possible, here these three phases shall serve as an example. Such a processing pipeline is shown in Figure 4.
125+
A common design paradigm in mobile robotics is a control loop, consisting of several phases: A sensing phase to aquire sensor data, a plan phase for localization and path planning and an actuation-phase to steer the mobile robot. Of course, more phases are possible, here these three phases shall serve as an example. Such a processing pipeline is shown in Figure 1.
126126

127127
<center>
128128
<img src="png/sensePlanActScheme.png" alt="Sense Plan Act Pipeline" width="60%"/>
129129
</center>
130130
<center>
131-
Figure 4: Multiple sensors driving a Sense-Plan-Act pipeline.
131+
Figure 1: Multiple sensors driving a Sense-Plan-Act pipeline.
132132
</center>
133133

134134
Typically multiple sensors are used to perceive the environment. For example an IMU and a laser scanner. The quality of localization algorithms highly depend on how old such sensor data is when it is processed. Ideally the latest data of all sensors should be processed. One way to achive this is to execute first all sensor drivers in the sense-phase and then process all algorithms in the plan-phase.
@@ -144,35 +144,35 @@ For this sense-plan-act pattern, we could define one executor for each phase. Th
144144

145145
**Concept:**
146146

147-
Often multiple sensors are being used to sense the environment for mobile robotics. While an IMU sensor provides data samples at a very high rate (e.g., 500 Hz), laser scans are availabe at a much slower frequency (e.g. 10Hz) determined by the revolution time. Then the challenge is, how to deterministically fuse sensor data with different frequencies. This problem is depicted in Figure 5.
147+
Often multiple sensors are being used to sense the environment for mobile robotics. While an IMU sensor provides data samples at a very high rate (e.g., 500 Hz), laser scans are availabe at a much slower frequency (e.g. 10Hz) determined by the revolution time. Then the challenge is, how to deterministically fuse sensor data with different frequencies. This problem is depicted in Figure 2.
148148

149149
<center>
150150
<img src="png/sensorFusion_01.png" alt="Sychronization of multiple rates" width="30%" />
151151
</center>
152152
<center>
153-
Figure 5: How to deterministically process multi-frequent sensor data.
153+
Figure 2: How to deterministically process multi-frequent sensor data.
154154
</center>
155155

156156
Due to scheduling effects, the callback for evaluating the laser scan might be called just before or just after an IMU data is received. One way to tackle this is to write additional synchronization code inside the application. Obviously, this is a cumbersome and not-portable solution.
157157

158-
An Alternative would be to evalute the IMU sample and the laser scan by synchronizing their frequency. For example by processing always 50 IMU samples with one laser scan. This approach is shown in Figure 6. A pre-processing callback aggregates the IMU samples and sends an aggregated message with 50 samples at 10Hz rate. Now both messages have the same frequency. With a trigger condition, which fires when both messages are available, the sensor fusion algorithm can expect always synchronized input data.
158+
An Alternative would be to evalute the IMU sample and the laser scan by synchronizing their frequency. For example by processing always 50 IMU samples with one laser scan. This approach is shown in Figure 3. A pre-processing callback aggregates the IMU samples and sends an aggregated message with 50 samples at 10Hz rate. Now both messages have the same frequency. With a trigger condition, which fires when both messages are available, the sensor fusion algorithm can expect always synchronized input data.
159159

160160
<center>
161161
<img src="png/sensorFusion_02.png" alt="Sychnronization with a trigger" width="40%" />
162162
</center>
163163
<center>
164-
Figure 6: Synchronization of multiple input data with a trigger.
164+
Figure 3: Synchronization of multiple input data with a trigger.
165165
</center>
166166

167167
In ROS 2, this is currently not possible to be modeled because of the lack of a trigger concept in the Executors of rclcpp and rclpy. Message filters could be used to synchronize input data based on the timestamp in the header, but this is only available in rclcpp (and not in rcl). Further more, it would be more efficient to have such a trigger concept directly in the Executor.
168168

169-
Another idea would be to activly request for IMU data only when a laser scan is received. This concept is shown in Figure 7. Upon arrival of a laser scan mesage, first, a message with aggregated IMU samples is requested. Then, the laser scan is processed and later the sensor fusion algorithm. An Executor, which would support sequential execution of callbacks, could realize this idea.
169+
Another idea would be to activly request for IMU data only when a laser scan is received. This concept is shown in Figure 4. Upon arrival of a laser scan mesage, first, a message with aggregated IMU samples is requested. Then, the laser scan is processed and later the sensor fusion algorithm. An Executor, which would support sequential execution of callbacks, could realize this idea.
170170

171171
<center>
172172
<img src="png/sensorFusion_03.png" alt="Sychronization with sequence" width="30%" />
173173
</center>
174174
<center>
175-
Figure 7: Synchronization with sequential processing.
175+
Figure 4: Synchronization with sequential processing.
176176
</center>
177177

178178
**Derived requirements:**
@@ -181,13 +181,13 @@ Figure 7: Synchronization with sequential processing.
181181

182182
### High-priority processing path
183183
**Concept**
184-
Often a robot has to fullfill several activities at the same time. For example following a path and avoiding obstacles. While path following is a permanent activity, obstacle avoidance is trigged by the environment and should be immediately reacted upon. Therefore one would like to specify priorities to activities. This is depicted in Figure 8:
184+
Often a robot has to fullfill several activities at the same time. For example following a path and avoiding obstacles. While path following is a permanent activity, obstacle avoidance is trigged by the environment and should be immediately reacted upon. Therefore one would like to specify priorities to activities. This is depicted in Figure 5:
185185

186186
<center>
187187
<img src="png/highPriorityPath.png" alt="HighPriorityPath" width="50%" />
188188
</center>
189189
<center>
190-
Figure 8: Managing high priority path with sequential order.
190+
Figure 5: Managing high priority path with sequential order.
191191
</center>
192192

193193
Assuming a simplified control loop with the activities sense-plan-act, the obstacle avoidance, which might temporarily stop the robot, should be processed before the planning phase. In this example we assume that these activites are processed in one thread.
@@ -197,22 +197,22 @@ Assuming a simplified control loop with the activities sense-plan-act, the obsta
197197

198198

199199
### Real-time embedded applications
200-
In embedded systems, real-time behavior is approached by using the time-triggered paradigm, which means that the processes are periodically activated. Processes can be assigned priorities to allow pre-emptions. Figure 1 shows an example, in which three processes with fixed periods are shown. The middle and lower process are preempted multiple times depicted with empty dashed boxes.
200+
In embedded systems, real-time behavior is approached by using the time-triggered paradigm, which means that the processes are periodically activated. Processes can be assigned priorities to allow pre-emptions. Figure 6 shows an example, in which three processes with fixed periods are shown. The middle and lower process are preempted multiple times depicted with empty dashed boxes.
201201

202202
<center>
203203
<img src="png/scheduling_01.png" alt="Schedule with fixed periods" width="30%"/>
204204
</center>
205205
<center>
206-
Figure 1: Fixed periodic preemptive scheduling.
206+
Figure 6: Fixed periodic preemptive scheduling.
207207
</center>
208208

209-
To each process one or multiple tasks can be assigned, as shown in Figure 2. These tasks are executed sequentially, which is often called cooperative scheduling.
209+
To each process one or multiple tasks can be assigned, as shown in Figure 7. These tasks are executed sequentially, which is often called cooperative scheduling.
210210

211211
<center>
212212
<img src="png/scheduling_02.png" alt="Schedule with fixed periods" width="30%"/>
213213
</center>
214214
<center>
215-
Figure 2: Processes with sequentially executed tasks.
215+
Figure 7: Processes with sequentially executed tasks.
216216
</center>
217217

218218
While there are different ways to assign priorities to a given number of processes,
@@ -226,10 +226,10 @@ However, data consistency is often an issue when preemptive scheduling is used a
226226
<img src="png/scheduling_LET.png" alt="Schedule with fixed periods" width="80%"/>
227227
</center>
228228
<center>
229-
Figure 3: Data communication without and with Logical Execution Time paradigm.
229+
Figure 8: Data communication without and with Logical Execution Time paradigm.
230230
</center>
231231

232-
An Example of the LET concept is shown in Figure 3. Assume that two processes are communicating data via one global variable. The timepoint when this data is written is at the end of the processing time. In the default case (left side), the process p<sub>3</sub> and p<sub>4</sub> receive the update. At the right side of the figure, the same scenario is shown with LET semantics. Here, the data is communicated only at period boundaries. In this case, the lower process communicates at the end of the period, so that always process p<sub>3</sub> and p<sub>5</sub> receive the new data.
232+
An Example of the LET concept is shown in Figure 8. Assume that two processes are communicating data via one global variable. The timepoint when this data is written is at the end of the processing time. In the default case (left side), the process p<sub>3</sub> and p<sub>4</sub> receive the update. At the right side of Figure 8, the same scenario is shown with LET semantics. Here, the data is communicated only at period boundaries. In this case, the lower process communicates at the end of the period, so that always process p<sub>3</sub> and p<sub>5</sub> receive the new data.
233233

234234
**Concept:**
235235
- periodic execution of processes
@@ -591,7 +591,7 @@ As the default rclcpp Executor works at a node-level granularity – which is a
591591
592592
Thus, an Executor instance can be dedicated to specific callback group(s) and the Executor’s thread(s) can be prioritized according to the real-time requirements of these groups. For example, all time-critical callbacks are handled by an "RT-CRITICAL" Executor instance running at the highest scheduler priority.
593593
594-
The following figure illustrates this approach with two nodes served by three Callback-group-level Executors in one process:
594+
The following Figure illustrates this approach with two nodes served by three Callback-group-level Executors in one process:
595595
596596
<center>
597597
<img src="png/cbg-executor_sample_system.png" alt="Sample system with two nodes and three Callback-group-level Executors in one process" width="60%" />
@@ -624,7 +624,7 @@ The callback-group-level executor has been merged into ROS 2 rclcpp in [pull req
624624
625625
### Test Bench
626626
627-
As a proof of concept, we implemented a small test bench in the present package cbg-executor_ping-pong_cpp. The test bench comprises a Ping node and a Pong node which exchange real-time and best-effort messages simultaneously with each other. Each class of messages is handled with a dedicated Executor, as illustrated in the following figure.
627+
As a proof of concept, we implemented a small test bench in the present package cbg-executor_ping-pong_cpp. The test bench comprises a Ping node and a Pong node which exchange real-time and best-effort messages simultaneously with each other. Each class of messages is handled with a dedicated Executor, as illustrated in the following Figure.
628628
629629
<center>
630630
<img src="png/ping_pong_diagram.png" alt="Architecture for the Callback-group-level Executor test bench" width="100%" />

0 commit comments

Comments
 (0)