getting_started:practical_problems:monitor
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
getting_started:practical_problems:monitor [2018/04/18 22:04] – graf | getting_started:practical_problems:monitor [2018/05/31 12:02] (current) – graf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Determine the Realtime Performance of your Application ====== | ====== Determine the Realtime Performance of your Application ====== | ||
It is of general interest to know whether your system fulfills your realtime requirements. As soon as a control system does not run reliably the question is in the room if your control algorithm has a bug or whether your underlying system does not perform as it is intended. \\ | It is of general interest to know whether your system fulfills your realtime requirements. As soon as a control system does not run reliably the question is in the room if your control algorithm has a bug or whether your underlying system does not perform as it is intended. \\ | ||
- | For this purpose you can use [[tools: | + | For this purpose you can use [[tools: |
- | For a certain type of safety critical robots, it is desirable to change into a safe level in case of the jitter in periodicity of a time domain or the safety system itself to exceed a certain level. This could be achieved by using the monitor functions of the timer, see [[tools: | + | |
- | Assign your timedomain to a periodic with the same sampling time. Then, add a monitor function, which periodically checks for the maximum and triggers a specific safety event. | ||
- | |||
- | <code cpp> | ||
- | eeros:: | ||
- | eeros:: | ||
- | |||
- | periodic.monitors.push_back([=](PeriodicCounter &c, Logger< | ||
- | if (c.period.max >= dt) safetySystem.triggerEvent(myEvent); | ||
- | }); | ||
- | |||
- | eeros:: | ||
- | </ | ||
- | Make sure to add the periodic to the executor. Usually you add the timedomain to the executor and its associated periodic is generated internally. However, in this case, we have to declare the periodic explicitely in order to be able to assign the monitor function. |
getting_started/practical_problems/monitor.1524081890.txt.gz · Last modified: 2018/04/18 22:04 by graf