User Tools

Site Tools


getting_started:tutorials:rttest

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
getting_started:tutorials:rttest [2018/03/19 17:49] grafgetting_started:tutorials:rttest [2026/04/12 12:08] (current) – [Running the Example] ursgraf
Line 1: Line 1:
 ====== Test your Realtime System ====== ====== Test your Realtime System ======
-After successfully installing EEROS you might wonder how precise the periodic execution of your safety system and control system is. Keep in mind that EEROS will run on these systems with or without realtime capabilities. However, the latencies will greatly affect the precision of the periodic execution of the threads running the safety and control system. \\ +You might wonder how precise the periodic execution of your safety system and control system is. Keep in mind that EEROS will run on systems with or without realtime capabilities. However, the latencies will greatly affect the precision of the periodic execution of the threads running the safety and control system.  
-In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run examples/rtTest/rtTest1. This examples does: + 
 +In the EEROS library you will find a directory with examples. For this example see [[https://github.com/eeros-project/eeros-framework/blob/master/examples/rtTest/rtTest.cpp|rtTest.cpp]].  
 + 
 +==== Allow Realtime Priorities ==== 
 +All examples using the executor will have to change thread priorities to make them realtime capable. You could run these examples with ''sudo'', but it is preferable to give your current user the privilege to change scheduling parameters. Running with ''sudo'' can cause issues when using ROS2 and is not recommended due to security reasons. Edit the file ///etc/security/limits.conf// (on Ubuntu) and add the following lines: 
 +<code> 
 +your_username   soft    rtprio  99 
 +your_username   hard    rtprio  99 
 +your_username   soft    memlock unlimited 
 +your_username   hard    memlock unlimited 
 +</code> 
 +Log out and log back in in order for the changes to take effect. 
 + 
 +==== Running the Example ==== 
 +Open a shell in the build directory of your EEROS library and run //rtTest//. This examples does: 
   * Creates a single periodic task with a period of 1ms   * Creates a single periodic task with a period of 1ms
   * Measures the latency of the repetition frequency   * Measures the latency of the repetition frequency
 You can start the program with the option //-s// passing a number of seconds after which the program stops. You can start the program with the option //-s// passing a number of seconds after which the program stops.
 <code> <code>
-sudo ./examples/rtTest/rtTest1 -s 60 // run for a minute+$ ./examples/rtTest/rtTest -s 60 // run for a minute
 </code> </code>
-IMPORTANT You have to run a program using real time threads with root privileges. 
  
 The program will print out the cumulative runtime measurements of  The program will print out the cumulative runtime measurements of 
getting_started/tutorials/rttest.1521478188.txt.gz · Last modified: 2018/03/19 17:49 by graf