ros2_control icon indicating copy to clipboard operation
ros2_control copied to clipboard

Tests on RT-PREEMPT

Open olivier-stasse opened this issue 5 years ago • 7 comments

This issue is to track the implementation of a github-action runner using Linux RT-PREEMPT

The main issue with this thread is to implement a test to check if the main ros_control part are breaking minimal real-time requirements.

Example: For torque control robot, a minimal 1 KHz loop is required. It also implies having at least 800 us free for computation over 1 ms. This time is typically what is required to solve a Quadratic Program with a robot of 30 DoFs with various local control with sensor feedback. The middleware foot print has to be minimal, i.e. not more than few tens of microseconds on a normal laptop.

TO DO list

  • [X] Formal support to have a serveur on the host institution (LAAS/CNRS)
  • [X] Getting the computer
  • [X] Focal install
  • [x] Linux 5.4 rt install
  • [x] Declare the self-hosted runner for github action (see https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners)
  • [ ] Writing the test using specifically the RT-PREEMPT call and testing the ros2_control infra-structure
  • [ ] Integration in ros2_control

Remarks

The issue will be edited depending on the feedback

olivier-stasse avatar Jul 10 '20 04:07 olivier-stasse

Some real-time results on the computer with a Linux v5.4.47 kernel with the RT_PREEMPT patch:

sudo ./cyclictest -a -t -n -p99
[sudo] password for ostasse: 
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 1.16 1.25 0.57 1/472 1496           

T: 0 ( 1491) P:99 I:1000 C: 103515 Min:      3 Act:   13 Avg:   12 Max:      30
T: 1 ( 1492) P:99 I:1500 C:  69010 Min:      3 Act:   12 Avg:   12 Max:      40
T: 2 ( 1493) P:99 I:2000 C:  51757 Min:      3 Act:   13 Avg:   12 Max:      45
T: 3 ( 1494) P:99 I:2500 C:  41406 Min:      3 Act:   12 Avg:   13 Max:      40

The kernel is compiled without the ACPI option. When it is left the last column is reaching 7000 to 8000 microseconds of latencies, instead of the current 30-45 us. See https://www.redhat.com/sysadmin/real-time-kernel for similar results.

olivier-stasse avatar Jul 10 '20 18:07 olivier-stasse

Test on setting a self-hosted runner done. see https://github.com/olivier-stasse/ros2_control/runs/870780047?check_suite_focus=true

olivier-stasse avatar Jul 14 '20 20:07 olivier-stasse

@bmagyar: To use the computer for the repository or the organisation (it would be probably better to add the runner only to the repository for a test) the instructions to go through are the following:

Setting -> Actions -> Add Runner.

The interface propose to choose the operating system ('Linux' is needed) and the architecture ('X64' is needed)

During the creation (and ONLY during) the interface provides instructions to install the services on the runner. I need you to send me the instructions.

Let me know when it is convenient for you to do this.

olivier-stasse avatar Jul 20 '20 12:07 olivier-stasse

@olivier-stasse I've sent an email with the instructions to you to your @laas.fr email, thanks for following up on this :+1:

Also, you may find these useful/inspiring for some test implementations: https://github.com/ros2/realtime_support

bmagyar avatar Aug 01 '20 07:08 bmagyar

Dear @bmagyar on my side the runner is working and ready. Let me know if it is not working for you.

olivier-stasse avatar Aug 05 '20 06:08 olivier-stasse

This is connected #48 and it replaces is actually.

destogl avatar Feb 15 '21 18:02 destogl

This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.

github-actions[bot] avatar May 27 '25 12:05 github-actions[bot]