Skip to content

Commit 0567be7

Browse files
fmauchbjin-bdai
authored andcommitted
Try using SCHED_FIFO on any kernel (#1142)
(cherry picked from commit 0a3705f)
1 parent 4e278e7 commit 0567be7

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

controller_manager/doc/userdoc.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ Determinism
1111
-----------
1212

1313
For best performance when controlling hardware you want the controller manager to have as little jitter as possible in the main control loop.
14-
The normal linux kernel is optimized for computational throughput and therefore is not well suited for hardware control.
15-
The two easiest kernel options are the `Real-time Ubuntu 22.04 LTS Beta <https://ubuntu.com/blog/real-time-ubuntu-released>`_ or `linux-image-rt-amd64 <https://packages.debian.org/bullseye/linux-image-rt-amd64>`_ on Debian Bullseye.
1614

17-
If you have a realtime kernel installed, the main thread of Controller Manager attempts to configure ``SCHED_FIFO`` with a priority of ``50``.
15+
Independent of the kernel installed, the main thread of Controller Manager attempts to
16+
configure ``SCHED_FIFO`` with a priority of ``50``.
1817
By default, the user does not have permission to set such a high priority.
1918
To give the user such permissions, add a group named realtime and add the user controlling your robot to this group:
2019

@@ -36,6 +35,15 @@ Afterwards, add the following limits to the realtime group in ``/etc/security/li
3635
3736
The limits will be applied after you log out and in again.
3837

38+
The normal linux kernel is optimized for computational throughput and therefore is not well suited for hardware control.
39+
Alternatives to the standard kernel include
40+
41+
- `Real-time Ubuntu 22.04 LTS Beta <https://ubuntu.com/blog/real-time-ubuntu-released>`_ on Ubuntu 22.04
42+
- `linux-image-rt-amd64 <https://packages.debian.org/bullseye/linux-image-rt-amd64>`_ on Debian Bullseye
43+
- lowlatency kernel (``sudo apt install linux-lowlatency``) on any ubuntu
44+
45+
Though installing a realtime-kernel will definitely get the best results when it comes to low
46+
jitter, using a lowlatency kernel can improve things a lot with being really easy to install.
3947

4048
Subscribers
4149
-----------

0 commit comments

Comments
 (0)