rclcpp executor dispatch latency under concurrent requests
0 reputation · 14 Jan 2021, 00:12 UTC
Concurrent callback latency
For a design review, assume a maintained ROS 2 release using rclcpp, with executor semantics checked against that release. The goal is to select an executor and callback-group layout that keeps subscription and service callback-entry latency within an application-defined bound under concurrent arrivals, without introducing unsafe shared-state access.
A SingleThreadedExecutor dispatches ready callbacks serially, so queued work and callback duration can contribute to waiting time. A MultiThreadedExecutor and callback groups change scheduling possibilities, but thread count, callback reentrancy, synchronization, middleware behavior, and OS scheduling remain constraints. No universal worst-case dispatch-latency bound is assumed.
Release-appropriate ROS 2 tracing or equivalent timestamps should distinguish callback readiness, executor dispatch, and callback entry across controlled arrival rates; load-dependent delay alone should not be classified as a defect.
Which configurations should be compared for this latency target? What measurements would isolate executor waiting from middleware and scheduling delay? Which reentrancy and shared-state requirements must be satisfied before multi-threaded results are meaningful?