Robotics & Mechatronics · Embedded execution and hardware contracts
Measure update timing and missed deadlines
A nominal 20 ms loop does not prove outputs arrive every 20 ms. Measure acquisition, execution and output events, then connect the actual timing to the task.
All numerical tables, scenarios and records are original constructed teaching data unless a specific external dataset is named. No physical experiment is claimed. A worked simulation model is distinguished from an executed simulator.
Lesson preparation and course links
Use the local explanations and supplied units, diagrams, tables and examples; advanced chapters build on the named local chapters. External links are point-of-need depth, not a requirement to finish an entire map.
Back to the Robotics chapterAfter reading, you can
Compare nominal update periods with actual acquisition, calculation and actuation timestamps and their task consequences.
Retain actual events, including the missing update
All times use an aligned monotonic clock in this constructed log. Nominal releases are 0, 20, 40, 60, 80, 100 ms. The 80 ms update is missed.
| Acquisition / ms | Update start / ms | Output commit / ms |
|---|---|---|
| 0 | 0 | 5 |
| 20 | 20 | 25 |
| 40 | 41 | 46 |
| 60 | 60 | 65 |
| 80 | 101 | 106 |
Calculate the metric that answers the question
Execution duration here is 5 ms for each recorded update. Start intervals are 20, 21, 19 and 41 ms; output intervals are 20, 21, 19 and 41 ms. The final gap is longer than a nominal period because an update was missed. Reporting only average execution time would hide it.
Acquisition-to-output ages are 5, 5, 6, 5 and 26 ms. With a stipulated maximum usable age 25 ms, the last input is too old at output. A timely calculation using stale input does not make a timely robot decision.
Translate time into a conditional task effect
At a constant 20 mm/s, an extra 21 ms beyond the nominal 20 ms output gap corresponds to 0.42 mm of additional time at the previous command. This is a conditional distance estimate, not a measured overshoot. The actual drive may hold, ramp or time out according to its contract.
Define deadline semantics: start deadline, completion deadline and data-age limit are different. Count missed updates explicitly. Record whether the controller used a stale snapshot, skipped an output, changed mode or entered its configured fault response.
Use a workload change that tests the hypothesis
Repeat the same task with a declared processing or communication load, preserving configuration and input replay. Compare worst observed intervals, missed count and task outcome, not only a mean. Retain enough records to inspect the longest gaps.
Official framework update rates describe supported scheduling mechanisms, not a guarantee for an arbitrary host. A successful software replay cannot establish physical actuator timing unless the actual application/measurement path is included.
Classify the final update
The last recorded start is 101 ms, 1 ms after the 100 ms nominal release, but the previous 80 ms release has no update. Both facts belong in the record. The output at 106 ms uses acquisition 80 ms, age 26 ms.
Under a≤25 ms age rule, this update must not produce a new normal movement decision from that snapshot. Its logged output should be the contract’s invalid-data response. The timestamp “106” alone does not say which output was sent; inspect the output type as well.
Try the reasoning
What is the longest supplied output interval?
Show the answer and reasoning
106−65=
41 ms. Why does 5 ms execution time not prove a 20 ms update guarantee?
Show the answer and reasoning
Scheduling gaps and missed releases can occur before execution; input age can also differ.
At 20 mm/s, what extra distance corresponds to 21 ms under constant motion?
Show the answer and reasoning
20×
0.021= 0.42 mm, conditional on the stated motion assumption. Which final field makes the 106 ms record interpretable?
Show the answer and reasoning
Output type/value and branch, together with the 80 ms acquisition identity and validity decision.
What to carry forward
Measure end-to-end event timing and missed updates. Average rate and execution duration cannot replace task-bound latency evidence.
References
Sources supporting this lesson’s explanations and examples.
ros-controls project3 sources
- ros2_control: Different update rates for Hardware Componentsros2_control contributorsOfficial software documentationKilted, displayed October 2026 documentation
- ros2_control: Controller Managerros2_control contributorsOfficial software documentationKilted, displayed October 2026 documentation
- ros2_control: Hardware Components and hardware interface typesros2_control contributorsOfficial software documentationKilted, displayed October 2026 documentation