Three independent tuning changes that share one goal: make the driver behave correctly under load on a real-time kernel.
- Modbus background thread at
SCHED_FIFO priority 70 — above controller_manager, so the comm loop never blocks on lower-priority work.
controller_manager update thread at SCHED_FIFO priority 90 — the usual convention for hard real-time control loops.
/joint_states QoS overridden to BEST_EFFORT / VOLATILE / KEEP_LAST(1) — the sensor_data profile. Replaces the inherited RELIABLE / TRANSIENT_LOCAL default, which is wrong for a high-rate stream and costs unnecessary DDS bookkeeping.
Measured effect
On PREEMPT_RT (6.12.89-rt18) the SCHED_FIFO 70 setting trims ~190 µs per Modbus cycle (2.98 ms → 2.79 ms mean), measured end-to-end with modbus_cli against a 2F-85.
On a stock (non-RT) kernel the changes are harmless no-ops; PREEMPT_RT is the regime where they pay off.
Acceptance
modbus_cli --baud 230400 --period 2 --rt-priority 70 sustains ≥350 Hz with 100% successful cycles over a 10 s steady-state window on PREEMPT_RT.
colcon test --packages-select robotiq_driver robotiq_hardware_tests passes (host build, no hardware needed for the unit tests; --ctest-args -L hardware opts into the end-to-end ones).
No public API change — all of it is internal scheduling and QoS profile configuration.
Three independent tuning changes that share one goal: make the driver behave correctly under load on a real-time kernel.
SCHED_FIFOpriority 70 — abovecontroller_manager, so the comm loop never blocks on lower-priority work.controller_managerupdate thread atSCHED_FIFOpriority 90 — the usual convention for hard real-time control loops./joint_statesQoS overridden toBEST_EFFORT/VOLATILE/KEEP_LAST(1)— the sensor_data profile. Replaces the inheritedRELIABLE/TRANSIENT_LOCALdefault, which is wrong for a high-rate stream and costs unnecessary DDS bookkeeping.Measured effect
On PREEMPT_RT (
6.12.89-rt18) theSCHED_FIFO70 setting trims ~190 µs per Modbus cycle (2.98 ms → 2.79 ms mean), measured end-to-end withmodbus_cliagainst a 2F-85.On a stock (non-RT) kernel the changes are harmless no-ops; PREEMPT_RT is the regime where they pay off.
Acceptance
modbus_cli --baud 230400 --period 2 --rt-priority 70sustains ≥350 Hz with 100% successful cycles over a 10 s steady-state window on PREEMPT_RT.colcon test --packages-select robotiq_driver robotiq_hardware_testspasses (host build, no hardware needed for the unit tests;--ctest-args -L hardwareopts into the end-to-end ones).No public API change — all of it is internal scheduling and QoS profile configuration.