Manuscript Offprint
arXiv:2610.21913Sub-Millisecond Reflexes for Continuous Physical Human-Robot Interaction
Jon Škerlj and Sami Haddadin
Abstract—Continuous physical human-robot interaction requires robots to rapidly adapt their control behaviour without interrupting task execution. However, existing ROS 2 control architectures rely on stop-to-switch mechanisms that introduce substantial delays and interrupt execution. We present an open-source, sub-millisecond reflex engine based on an enhanced ROS 2-compatible multimode controller that enables deterministic switching between control modalities and integrates reflex behaviours for mitigating contact hazards and kinematic limit violations. Experiments on a Franka Robotics manipulator demonstrate switching delays below 0.1 ms, more than four orders of magnitude faster than conventional ros2_control, while maintaining continuous operation during safety-critical events. In a multi-stage manipulation task, the proposed framework reduced execution time by 3.5% and peak trajectory jerk by more than threefold. By eliminating runtime middleware overhead, controller transitions are implemented as lock-free pointer operations, enabling reflex-level responsiveness within an open-source robotics framework.
I. INTRODUCTION
The deployment of service robots in domestic and home environments creates a need for physical human-robot interaction (pHRI) that is inherently safe and robust [1], [2]. Unlike a structured lab environment or an industrial cell, a home is a dynamic and unpredictable setting. While future humanoid service robots are expected to operate with human-level capabilities to execute complex, contact-rich manipulation tasks [3], [4], there is still work to be done, with current state-of-the-art systems primarily serving as research platforms [5]–[9].
During operation in such surroundings around humans, unforeseen collisions become inevitable [10]. Actively mitigating the severity of injuries during these collisions requires torque-controlled systems capable of rapid, low-latency reactions [11], [12]. While safety standards specify the high-rate measuring frequencies, such as 1 kHz (ISO 10218 [13], ISO 13482 [14]), for collision detection, a major gap remains in translating advanced safety and interaction algorithms to modular, open-source architectures [10].
In addition, the selected range of diverse domestic tasks, e.g., surface cleaning, folding clothes, or close-proximity physical assistance, directly dictates the requirements of the system's real-time control architecture. Different phases of these tasks often impose conflicting control objectives, such as accurate free-space motion, compliant interaction, force regulation, or safety-oriented recovery behaviours [15].
State-of-the-Art
i) Control behaviour switching

Enhanced Multimode Controller
ii) Hazard management
Fig. 1: Conventional control frameworks interrupt tasks during control mode switching and hazardous events (left), whereas the proposed framework enables sub-millisecond reflex responses and uninterrupted physical human-robot interaction (right).
While unified control formulations can address several of these objectives at once [16], [17], no single control strategy is universally optimal for all phases of service robotic tasks. Different approaches may prioritize accuracy, compliance, force regulation, or rapid safety reactions, requiring distinct control characteristics and tuning objectives. Hence, enabling service humanoids to execute these multifaceted routines successfully requires the capability to dynamically and instantaneously switch their control behaviour according to task demands and environmental conditions [15], [16], [18].
Nowadays, the prevalent state-of-the-art open-source middleware like Robot Operating System 2 (ROS 2) [19] and its hardware-agnostic control framework ros2_control are constrained by their reliance on lifecycle node state transitions with a conservative “stop-to-switch” implementation [20]. This introduces timing inconsistencies and additional communication overhead [21], which fails to fulfill the real-time requirement and introduces time delays for long-horizon tasks. Consequently, conventional safety mechanisms may completely halt the robot’s motion upon safety-critical events. By doing so, these approaches sacrifice fluid physical manipulation and system autonomy for functional safety [10].
Having established the need for multi-modal control, safety requirements of low-latency interactions, and the limitations of the middleware “stop-to-switch” bottleneck, as visualized in Fig. 1, the novel contributions of our work are:
This work was supported by the Lighthouse Initiative Geriatronics by StMWi Bayern (Project X, grant no. IUK-1807-0007// IUK582/001) and LongLeif GaPa gGmbH (Project Y).
Munich Institute of Robotics and Machine Intelligence (MIRMI), Technische Universität München (TUM), Germany.
Mohamed Bin Zayed University of Artificial Intelligence, UAE
Corresponding author. Email: jon.skerlj@tum.de
• A real-time, sub-millisecond controller switching architecture for smooth continuous task execution compatible with existing ROS 2 ecosystems.
• A reflex engine built upon the proposed switching architecture, enabling rapid reactions to contact hazards, joint limits, and excessive velocities before manufacturer safety stops are triggered.
• Continuous execution of multistage manipulation tasks through seamless transitions between control behaviours, eliminating the traditional stop-to-switch interruption.
• Empirical validation on a physical Franka Robotics manipulator, demonstrating switching latencies below 0.1 ms, successful hazard mitigation, and uninterrupted task execution.
A. High-Frequency Torque Control
The groundwork for robots to be able to work side by side with humans today was established with the introduction of force and torque control [22]. The early work in this area supported control frequencies of 60 Hz [23] and 120 Hz [24], which prevented them from detecting higher oscillations at around 280 Hz. With the rapid technological advancement in recent decades, the current safety standards, e.g., ISO 10218 [13], require 1 kHz control and measurement frequencies to detect collisions and minimize injury risks during pHRI tasks. This torque command loop frequency enables utilization of Lagrangian dynamics for modelling, so that the joints can be treated as ideal torque sources by higher-level controllers [25]. Consequently, we have seen a prevalent increase in available collaborative robots (cobots), such as the DLR Lightweight Robot Series [26], Franka Emika Panda [25] & FR3 [27], KINOVA Gen 3 [28], etc.
B. Reflex Behaviours
A continuous, deterministic 1 kHz torque-control loop provides the necessary sensory readings for collision detection by estimating external contact wrenches, , via proprioceptive observers [29], [30]. However, translating these torque observations into safe physical interaction requires a structured control response tailored to the physical evolution of a collision [10]. In the literature, physical human-robot impacts are categorized into four distinct temporal phases [10]:
i) Pre-Collision Phase: Anticipatory measures (velocity scaling, posture optimization) bound kinetic energy before contact [11].
ii) Impact Phase I (Transient): Open-loop dynamics (10–20 ms) governed by structural inertia. Feedback control cannot attenuate initial peak forces [30], [31].
iii) Impact Phase II (Quasi-Static): Slower contact dynamics where low-latency control eliminates residual crushing forces and clamping [11], [32].
iv) Post-Collision Phase: Reaction termination, secondary hazard management, and task recovery [10], [33].
Since feedback loops cannot influence Phase I of the collision, reflex behaviours aim to mitigate the consequences of the last two stages. These maneuvers are categorized by their degree of task modification [10]:
i) Task-Preserving Reflexes: e.g., by adjusting execution timing ( ) along the nominal path without altering spatial geometry [30].
ii) Task-Relaxing Reflexes: e.g., by permitting transient path shifts before resuming normal tracking [10].
iii) Task-Abandoning Reflexes: e.g., by suspending tracking upon reaching the safety limits [10].
Despite the maturity of collision detection, temporal impact phases, and reflex taxonomies, their implementation has historically been confined to custom, proprietary real-time frameworks, for instance DLR's aRD/Beasty [3], [33] or ArmarX-RT [7], which lack generalizability and open-source accessibility. To achieve broader adoption across the robotics community, compatibility with modern open-source middleware is highly desirable.
Beyond reactive control, monitoring and recording frameworks have been proposed to capture robot and human states during pHRI, allowing safety-critical interactions to be analyzed and reconstructed [34], [35]. Such approaches provide complementary observability and traceability, whereas the present work focuses on closing the safety loop online through low-latency detection, reflex activation, and recovery.
C. Existing Robotics Middlewares
Modular robotics middlewares, primarily ROS 2 [19] and its hardware-agnostic control framework ros2_control [20], have greatly simplified robotics development utilizing component-based architectures. However, this modularity introduces significant communication and scheduling bottlenecks. Standard distributed multi-process configurations suffer from quadratic memory growth ( ) due to DDS network participant discovery [36]; meanwhile, serialization overhead and default executor scheduling models introduce timing jitter and latency [19], [36]. To address these problems, ROS 2 introduced node composition and intra-process communication, which uses smart pointers to achieve stable microsecond-level latencies ( ) [36].
Despite these optimizations, the standard ros2_control architecture remains heavily constrained by relying on standard lifecycle node transitions and a conservative “stop-to-switch” paradigm that involves various service calls and resource allocations [20] that block the real-time loop. To minimize velocity discontinuities during controller switching, some approaches use predefined transition zones to blend from one controller to another [37]. Unfortunately, this approach could lead to dangerous outcomes in contact-rich pHRI tasks where potential transition zones are almost non-existent. Conversely, the multipanda_ros2 addressed this issue to a certain degree, taking advantage of referencing and shared memory [18]. However, the reported values still showed an average switching delay of approximately 2 ms, which still does not satisfy strict ISO-defined requirements for collision detection [13], [14], [38].
On the other hand, high-performance platforms, to this day, usually rely on proprietary or in-house built frameworks to achieve deterministic execution. For instance, the DLR humanoid Rollin' Justin uses custom-built controllers for real-time control [3]. Similarly, the OROCOS framework integrates specialized toolkits to guarantee deterministic execution [39], [40]. While these custom solutions meet the strict timing constraints, they lack plug-and-play modularity, adaptability, and generalizability found in modern open-source ecosystems. This forces an unwanted trade-off between the flexibility of general-purpose middlewares and the rigid determinism of platform-specific architectures [19], [40].
III. METHODS
A. Multimode Controller Architecture
The foundation of the proposed real-time behaviour switching is built upon the open-source multipanda_ros2 framework, which provides native ROS 2 interfaces for coordinated control of multiple robots from a single process [18]. At its core is the Multimode Controller (MC), which integrates seamlessly into the ROS 2 environment as a standard ros2_control controller.
Rather than executing a monolithic control law, the MC acts as a central supervisor that orchestrates a modular suite of lightweight subprocesses called controllets. The MC itself does not compute a control law; instead, it delegates this task to the active controllets. Each controllet is assigned ownership of one or more hardware resources in the ros2_control framework at runtime and implements the specific command torque calculation required for its assigned task. The MC can be instantiated with an arbitrary number of these controllets based on the user's configuration, strictly ensuring that no more than one controllet has ownership of any single physical motor at any given instant to prevent hardware resource conflicts.
To achieve deterministic execution and minimize computational overhead within the real-time loop, the architecture is designed to completely avoid runtime memory allocations and unnecessary data copying. During initialization, the MC is populated with a vector of configured controllets. Each controllet is constructed utilizing C++ move operators and holds direct references to the shared command vector and the robot state data (e.g., joint positions and velocities) centrally managed by the MC. This zero-copy reference design provides controllets with instantaneous, real-time access to the complete robot state, which guarantees that the calculated torque commands remain temporally consistent when written to the underlying low-level robot control loop. For further details, please refer to [18].
B. Optimization for Sub-Millisecond Behaviour Switching
Maintaining a strict 1 kHz control frequency and deterministic sampling rate is an essential requirement for safe pHRI [10], [13]. The original implementation of the framework, transitioning between active controllets, incurs a switching delay of approximately 2 ms [18].
Detailed profiling and system-level tracing revealed that this multi-millisecond delay was primarily caused by the dynamic creation of ROS 2 communication entities during runtime. For instance, when a ROS 2 subscriber is instantiated, the corresponding callback registration and middleware resources must also be initialized, which is highly non-deterministic because it relies on the underlying Data

Fig. 2: Visualization of the improved multimodal controller within the ros2_control framework. More detail about ros2_control components can be found in [20].
Distribution Service (DDS) [19]. It may trigger dynamic heap memory allocations, potentially leading to physical memory page faults, requiring internal synchronization locks within the middleware abstraction layers to update the global node graph and execute peer-to-peer participant discovery protocols [19], [21]. When these operations occur within or interfere with high-priority real-time execution threads, they can produce substantial execution jitter, thread blocking, and control loop deadline misses, thereby violating hard real-time requirements.
To achieve sub-millisecond determinism and enable instantaneous reflex reactions within open-source ecosystems, all ROS 2-related instantiations and communication interface bottlenecks were relocated to the timing-insensitive initialization phase of the MC. By pre-allocating memory and establishing all middleware endpoints before the real-time execution loop begins, the system completely avoids runtime heap allocations and expensive node graph modifications on the fly. Within the 1 kHz real-time execution thread, switching the active controllet is now reduced to a deterministic, lock-free pointer reassignment within the active memory space. Since both active and standby controllets maintain pre-initialized, direct references to the centrally managed robot state data and the shared command vector , changing control modalities does not require any context switches, system calls, or middleware intervention. This zero-overhead pointer swap successfully preserves the execution of the 1 kHz control cycle during transitions, eliminating middleware-induced delays.
C. Reflex Behaviours
While standard collaborative robot controllers rely on manufacturer-level safety monitors [25] that lock brakes upon limit violations, these rigid emergency stops cause severe hardware deadlocks, disrupt real-time control, and risk human injury from unmitigated clamping forces during post-impact phases. To ensure continuous operational safety and prevent rigid hardware stops, our framework embeds 1 kHz reactive reflex behaviours into the multimode controller framework, capitalizing on its features. By combining instantaneous torque damping with < 1 ms asynchronous controllet switching, the engine intercepts external contact forces, joint kinematic limits, and excessive velocities before manufacturer thresholds are reached, providing compliant collision mitigation, object affordance preservation, and seamless haptic task recovery .
1) Hazard Detection and Interception
At each 1 kHz cycle, joint-level position (q), velocity ( ), and torque ( ) safety boundaries are evaluated for each joint , where n denotes the total number of degrees of freedom:
- Position Limits (): With buffer vector :
- Velocity Limits (): With buffer vector :
- Joint Torque Limits (): With buffer vector :
On the operational space level, at the point of interest (typically the end-effector), the safety boundary is defined by the estimated contact wrench :
- Absolute Force Magnitude (): With scalar buffer :
- Absolute Moment Magnitude (): With scalar buffer :
2) Reflex State Machine
The state machine transitions across four discrete states \mathcal{S} \in \{\text{NORMAL, REFLEX, WAIT_FOR_RECOVERY, RECOVERY}\}, evaluated inside the 1 kHz execution loop visualized in Fig. 3.
All safety parameters, threshold modes, buffer margins, and reflex behaviours are defined declaratively via ROS 2 YAML configuration files, allowing per-application tuning without recompilation. For an intuitive user experience during program execution, a haptic gesture ( N) feature was implemented to trigger the recovery procedure without the need to run any manual computer commands. After the triggered hazard has been cleared, the desired operation can continue as before.
The source code with examples and documentation is publicly available at: https://github.com/RoboRef/franka_reflex_engine.

Fig. 3: State machine for reactive reflex behaviours.
3) Available Reflex Behaviours
Following the taxonomy introduced in Sec. II-B, our reflex engine integrates the following five task-abandoning reflex behaviours (Tab. I):
i) Stop Reflex: Freezes the manipulator at the time of hazard detection .
ii) Admittance Reflex: Maps measured external torques to reference joint velocities via a proportional gain , guiding compliant evasive motion along the direction of external interaction forces.
iii) Joint Retraction: Displaces the target joint configuration along the negative joint torque vector scaled by Cartesian bounds via the manipulator Jacobian, actively relieving joint-level contact stresses.
iv) Cartesian Retraction: Actively displaces the Cartesian target position by distance along the negative external contact force vector, , while maintaining fixed orientation to prevent object tilting and secondary hazards.
v) Zero-G Reflex: Commands pure gravity compensation, eliminating residual contact forces and preventing severe human clamping in constrained collision scenarios.
TABLE I: Available state-of-the-art reflex behaviours [10].
| Name | Control Law | Parameters |
|---|---|---|
| Stop | ||
| Admittance | ||
| Joint Retract | ||
| Cart. Retract | ||
| Zero-G |
IV. EXPERIMENTAL PROCEDURE
All experiments were conducted on a Franka Robotics Panda manipulator controlled by an ASRock Industrial 4X4 Box 7735U/D5 NUC mini-PC with 32 GB of DDR5-4800 MHz RAM. The underlying software architecture was built on ROS 2, utilizing the open-source multipanda_ros2 framework [18] as the real-time backbone. To validate the proposed architecture, the experimental procedure was divided into three phases: i) Quantify the control switching delay, ii) Evaluate the reactive reflex behaviours, and iii) Execute a multi-stage task to show the capabilities compared to the state-of-the-art.
A. Control Behaviour Switching Delay
To benchmark the latency of state transitions, we measured the switching delay across 5 control behaviours mentioned in Tab. I for three distinct configurations:
i) Baseline ros2_control: Standard lifecycle state transitions, switching an active controller to an inactive state and vice versa with all controllers already loaded and configured at the start of the experiment.
ii) Original multimode controller: The baseline multipanda_ros2 framework using the default controllet switching.
iii) Improved multimode controller with optimized software design to minimize external delays at runtime.
Each configuration was recorded for a total of 100 switches of the control behaviour. The switching delay was quantified by recording the exact timestamp when the switch initiation request was triggered and comparing it against the timestamp when the newly computed command values, , first appeared in the internal libfranka control loop. Cross-correlation was applied between the two recorded datasets to precisely identify the temporal delay for each configuration.
B. Reflex Behaviours
To demonstrate the system’s ability to intercept hardware faults and maintain continuous operation, a series of kinematic and contact limit tests were conducted.
i) Joint Position Limit Test: A stiff joint impedance controller ( ) was utilized to purposefully command the manipulator into its physical joint limits, with only one joint being actively commanded per experiment. Maximal commanded speed was set at 75% of the hardware limit. This procedure was executed 10 times for each joint across all 7 degrees of freedom for a total of 70 repetitions. The position safety limit was set to 0.2 rad away from the hardware limits for all joints ( ).
ii) Joint Velocity Limit Test: Mirroring the previous setup, this test utilized a joint velocity controller to aggressively accelerate the manipulator beyond the manufacturer's specifications, maintaining the individual joint per experiment methodology. The velocity safety limit was set to 0.1 rad/s away from the hardware limits for all joints ( rad/s).
iii) Contact Detection: A mid-level stiffness ( ) Cartesian impedance controller was used to command the end effector into a rigid surface with varying end-effector velocity magnitudes, from 0.09 to 0.26 m/s before collision. This was repeated 10 times across three different approach configurations to evaluate the consistency of the external force-based reflex trigger. The external force threshold ( ) was set to 15 N for all experiments.
For position and velocity experiments, a stop reflex behaviour was implemented via a soft joint impedance controller ( N/m, N/m). However, contact detection tests utilized a Zero-G approach to resolve unexpected collisions.
C. Multistage Task Execution
To evaluate the real-world operational impact of real-time control-behaviour switching, we designed a continuous, multi-phase manipulation task inspired by a real use case where the robot is instructed to clean the table. This scenario was divided into three distinct parts, between which control behaviour must be switched:
i) Pick & Place: the robot relocates objects out of the way by moving quickly and precisely, utilizing a fast velocity controller.
ii) Surface wiping: requires the robot to maintain a steady normal force of 10 N against a surface while following a trajectory along a plane via a unified force-motion controller according to [17].
iii) Tool Release & Return: the robot returns the sponge to its designated spot and goes back to the starting position using a stiff joint impedance controller ( ).
The task performance of the enhanced multimode controller was benchmarked against the state-of-the-art ros2_control baseline. The task was executed 10 times for each approach, with evaluation metrics being task completion time and peak trajectory jerk.
V. RESULTS
A. Control Behaviour Switching Delay
The results of the switching latency can be seen in Fig. 4. A logarithmic scale is used to visualize the results, as they span multiple orders of magnitude. On average, the ros2_control baseline resulted in approximately 210 milliseconds of delay, while the default multimode controller and its improved version ended with an average delay of 1.8 and 0.01 ms, respectively. Furthermore, the latency distribution shown in Fig. 4 demonstrates that even the worst observed switching event of our proposed approach remained below 0.1 ms, indicating deterministic behaviour with negligible switching jitter across 100 trials.

(a) Baseline ros2_control
(b) Original multimode controller
(c) Improved multimode controller
Fig. 4: Box plots of controller switching delays using a logarithmic scale for a) baseline ros2_control framework, b) original multimode controller, and c) improved multimode controller for 100 switches per each configuration.
B. Reflex Behaviours
The statistics of the stopping distances for the joint position and velocity limit tests are summarized in Fig. 5. The mean and standard deviation of the stopping distance values averaged across all 7 joints are and rad for the position and velocity limit tests, respectively. It can be seen that the means are comparable while the variability is significantly higher during the joint velocity limit tests due to the higher joint velocities at the time of the reflex trigger.
Moreover, Fig. 6 displays the recorded position and velocity trajectories for joint 2 since it produced the highest stopping distances. In the default mounting, this joint carries most of the robot weight, which creates the most demanding stopping conditions. Even with the highest observed values, none of the trials reached the actual hardware limit, which would completely stop the robot and produce high jerks.

(a) Joint Position Test
(b) Joint Velocity Test
Fig. 5: Stopping distances displayed per joint for a) joint position test and b) joint velocity test.

(a) Joint Position Test

(b) Joint Velocity Test
Fig. 6: Example trajectories of Joint 2 for (a) joint position and (b) velocity limit tests. Recorded joint angles are shown in blue and velocities in black, corresponding to the respective colour-coded vertical axes.
Finally, across 30 contact detection trials, Fig. 7 shows a mean force mitigation time of s for external forces exceeding 15 N, while Fig. 8 illustrates the corresponding end-effector stopping behaviours for measured external force (blue) and velocity (black) magnitudes. Similar to before, low-level hardware limits were not triggered, allowing uninterrupted execution throughout the experimental procedure.

Fig. 7: Results of the contact detection tests displaying time to mitigate force after an unexpected collision.

Fig. 8: Results of the contact detection tests displaying the magnitudes of end-effector force (blue) and velocity (black). Both trajectories correspond to the respective color-coded vertical axes.
C. Multistage Task Execution
The results of the real-world-inspired task can be seen in Fig. 9 and Tab. II. The task evolution is represented using the magnitude of task space velocity; blue colour denotes our approach, versus the baseline in red. The task completion time metric shows a significant speedup of nearly 0.5 s. Additionally, smoother control behaviour switches utilized by the multimode controller reduced peak operational-space jerk from to .

Fig. 9: Multi-stage task velocity comparison between state-of-the-art baseline (ros2_control) in red and our approach (enhanced multimode controller) in blue.
TABLE II: Quantitative performance comparison across 20 trials of the multifaceted task (N = 10 per configuration).
| Metric | Proposed approach | ros2_control |
|---|---|---|
| Total Task Duration [s] | 14.09 ± 0.06 | 14.58 ± 0.10 |
| Peak Trajectory Jerk [m/s3] | 155.4 ± 40.6 | 499.0 ± 96.9 |
VI. DISCUSSION
A. Control Behaviour Switching Delay
As explained in Sec. V-A, the reported switching delay was reduced by more than 4 orders of magnitude compared to the standard open-source ros2_control baseline. Considering that the improved multimode approach is designed with open-source compatibility in mind, its benefits can be easily utilized by all robotics systems that already use ros2_control as their main control architecture. The control algorithm must only be copied from a ros2_control framework as an additional controllet to the multimode controller. In addition, the improved switching latency below 0.1 ms enables safety-oriented reflex behaviours to execute within the 1 kHz control loop.
B. Reflex Behaviours
The reflex behaviours of the limit tests to catch manufacturer-defined operation interruptions showed success throughout Sec. V-B. Nevertheless, it is important to note that the selection of reflex behaviours and threshold limits ( rad, rad/s) plays a major role. For all limit experiments, a stop reflex behaviour was implemented via a soft joint impedance controller ( N/m, N/m) that uses the spring behaviour to cushion abrupt stops. Hence, an overshoot behaviour appears that goes beyond the initially determined safety limit. This indicates that depending on the application, careful consideration should be performed when choosing the limits and reflex behaviours.
Lastly, the collision experiments (Fig. 8) show that the detected peak transient force ( ) is significantly larger than the set collision threshold. In agreement with the physical impact evolution outlined in Sec. II-B, active feedback control cannot attenuate the initial open-loop transient force peak during Impact Phase I [30]. However, because our architecture executes state transitions in sub-millisecond rates, the reflex engages well within Impact Phase II, eliminating static crushing forces before lower-level manufacturer safety limiters trip. This prevents sensor saturation and rigid emergency stops historically observed during unexpected rigid impacts [31].
While the presented experiments focus on repeatable and quantifiable scenarios, supplementary video material demonstrates the reflex engine's reactions during unexpected physical interactions. In these examples, the robot reacts to external contact, transitions to a suitable reflex behaviour, and resumes operation after the hazard has been resolved without triggering low-level safety stops. These examples show the framework's usefulness during realistic pHRI scenarios that are beyond controlled evaluation conditions presented in this work.
C. Multistage Task Execution
The task described in IV-C is a simplified representative real-world scenario to clearly showcase the benefits of the multimode controller. Even with only two control behaviour switches, it already shows significant time savings. The main source of the difference can be seen by looking at Fig. 9 in more detail, especially at the second switch time shortly after the 10 s mark. The task space velocity of our approach is slightly reduced due to the direction change, but it never reaches 0. However, all individual trajectories of the baseline approach are forced to fully stop before the new behaviour can be started. In our use case, this results in a total delay of approx. 0.5 s, which may improve throughput for long-horizon tasks.
Ultimately, the observed jerk in Tab. II should also be considered before deployment. More than a threefold reduction may reduce mechanical loads during controller transitions.
VII. Conclusion
This paper presented a novel open-source sub-millisecond controller-switching methodology for safe, uninterrupted task execution without requiring a single unified control strategy. Its modularity and compatibility with the existing ROS 2 ecosystem combine the flexibility of hardware-agnostic frameworks, such as ros2_control, with timing constraints and determinism typically associated with specialized systems. The proposed approach was validated experimentally on a Franka Robotics manipulator.
The improved multimode controller eliminates runtime overhead associated with modular abstractions and achieves switching delays of < 0.1 ms. This enables control behaviour transitions within latency ranges consistent with controller frequencies commonly required by collaborative robotics safety standards [13]. Building on this capability, we implemented five reflex behaviours to mitigate critical external forces and intercept joint position and velocity limits before rigid manufacturer safety stops are triggered, thereby maintaining continuous operation.
Furthermore, a multistage task inspired by a real pHRI use case demonstrated the benefits of seamless switching between control behaviours with different objectives. Despite requiring only two switches, the proposed approach reduced task duration by 3.5% compared with the standard ros2_control approach. Smoother transitions also reduced the maximum detected trajectory jerk by more than threefold, highlighting benefits for both long-term continuous operation and motion smoothness.
The presented experiments are limited to a set of predefined reflex behaviours and safety thresholds, whose selection remains application-dependent. Future work will therefore extend the library of available reflex behaviours and refine controller-specific parameters, with particular emphasis on task-preserving strategies that mitigate hazards while minimizing disruption to ongoing manipulation. Beyond classical control, the framework provides a promising foundation for learned robot policies, where rapid transitions to established control strategies may improve robustness in unexpected situations.
Ultimately, our goal is not only faster controller switching, but enabling robots to react, recover, and continue operating during physical interaction. By bringing reflex-level responsiveness to open-source robotic middleware, we aim to provide the robotics community with a modular and accessible foundation for more capable, resilient, and continuously operating service robots.
REFERENCES
[1] I. González Alonso, M. Fernández, J. M. Maestre, M. d. P. A. García Fuente, and I. G. Alonso, “Service robotics,” Service Robotics within the Digital Home: Applications and Future Prospects, pp. 89–114, 2011, doi: 10.1007/978-94-007-1491-5.
[2] J. Škerlj, M. Hamad, J. Elsner, A. Naceri, and S. Haddadin, "Safe-by-design digital twins for human-robot interaction: A use case for humanoid service robots," in IEEE Intl. Conf. on Robotics and Automation (ICRA), 2024, pp. 13369–13375, doi: 10.1109/ICRA57147.2024.10611178.
[3] C. Ott, O. Eiberger, W. Friedl, B. Bauml, U. Hillenbrand, C. Borst, A. Albu-Schaffer, B. Brunner, H. Hirschmuller, S. Kielhofer, R. Konitschke, M. Suppa, T. Wimbock, F. Zacharias, and G. Hirzinger, "A humanoid two-arm system for dexterous manipulation," in 6th IEEE-RAS International Conference on Humanoid Robots. IEEE, 12 2006, doi: 10.1109/ichr.2006.321397.
[4] Z. Gu, J. Li, W. Shen, W. Yu, Z. Xie, S. McCrory, X. Cheng, A. Shamsah, R. Griffin, C. K. Liu, A. Kheddar, X. B. Peng, Y. Zhu, G. Shi, Q. Nguyen, G. Cheng, H. Gao, and Y. Zhao, "Humanoid locomotion and manipulation: Current progress and challenges in control, planning, and learning," IEEE/ASME Transactions on Mechatronics, vol. 31, no. 2, pp. 2300–2330, 2026, doi: 10.1109/TMECH.2025.3579247.
[5] J. Pages, L. Marchionni, and F. Ferro, “TIAGo: the modular robot that adapts to different research needs,” in International workshop on robot modularity, IROS, vol. 290, 2016, accessed: August 20, 2026. [Online]. Available: https://clawar.org/wp-content/uploads/2016/10/P2.pdf
[6] S. Shigemi, ASIMO and Humanoid Robot Research at Honda. Springer Netherlands, 1 2018, pp. 55–90, doi: 10.1007/978-94-007-6046-2.9.
[7] T. Asfour, L. Kaul, M. Wachter, S. Ottenhaus, P. Weiner, S. Rader, R. Grimm, Y. Zhou, M. Grotz, F. Paus, D. Shingarey, and H. Haubert, "Armar-6: A collaborative humanoid robot for industrial environments," in IEEE/RAS Intl. Conf. on Humanoid Robots. IEEE, 2018, doi: 10.1109/humanoids.2018.8624966.
[8] M. Schwarz, C. Lenz, A. Rochow, M. Schreiber, and S. Behnke, "Nimbro avatar: Interactive immersive telepresence with force-feedback telemanipulation," in IEEE/RSJ Int. Conf. on Intelligent Robots and Systems (IROS). IEEE, 2021, pp. 5312–5319, doi: 10.1109/IROS51168.2021.9636191.
[9] M. Tröbinger, C. Jähne, Z. Qu, J. Elsner, A. Reindl, S. Getz, T. Goll, B. Loinger, T. Loibl, C. Kugler et al., “Introducing GARMI – A service robotics platform to support the elderly at home: Design philosophy, system overview and first results,” IEEE Robotics and Automation Letters (RA-L), vol. 6, no. 3, pp. 5857–5864, 2021, doi: 10.1109/LRA.2021.3082012.
[10] J. Vorndamme, A. Melone, R. Kirschner, L. Figueredo, and S. Haddadin, “Safe robot reflexes: A taxonomy-based decision and modulation framework,” IEEE Trans. on Robotics, vol. 41, pp. 982–1001, 2025, doi: 10.1109/TRO.2024.3519421.
[11] S. Haddadin, S. Haddadin, A. Khoury, T. Rokahr, S. Parusel, R. Burgkart, A. Bicchi, and A. Albu-Schäffer, “On making robots understand safety: Embedding injury knowledge into control,” Int. Journal of Robotics Research, vol. 31, no. 13, pp. 1578–1602, 2012, doi: 10.1177/0278364912462256.
[12] S. Haddadin and E. Croft, Physical Human–Robot Interaction. Cham: Springer International Publishing, 2016, pp. 1835–1874, doi: 10.1007/978-3-319-32552-1_69.
[13] I. O. for Standardization (ISO), “ISO 10218-2:2025: Robotics – safety requirements for robot systems in an industrial environment – part 2: Robot systems, robot applications and robot cells integration,” 2025.
[14] —, “ISO 13482:2014: Robots and robotic devices — safety requirements for personal care robots,” 2014.
[15] J. A. Barreiros, A. Özgün Önol, M. Zhang, S. Creasey, A. Goncalves, A. Beaulieu, A. Bhat, K. M. Tsui, and A. Alspach, “Learning contact-rich whole-body manipulation with example-guided reinforcement learning,” Science Robotics, vol. 10, no. 105, p. eads6790, 2025, doi: 10.1126/scirobotics.ads6790.
[16] A. Albu-Schäffer, C. Ott, and G. Hirzinger, “A unified passivity-based control framework for position, torque and impedance control of flexible joint robots,” The International Journal of Robotics Research, vol. 26, no. 1, pp. 23–39, jan 2007, doi: 10.1177/0278364907073776.
[17] S. Haddadin and E. Shahriari, “Unified force-impedance control,” Int. Journal of Robotics Research, vol. 43, no. 13, pp. 2112–2141, 2024, doi: 10.1177/02783649241249194.
[18] J. Škerlj, S. Bien, A. Naceri, and S. Haddadin, “Bridging the sim-to-real gap with multipanda_ros2: A real-time ros 2 framework for multimannual systems,” in IEEE Intl. Conf. on Robotics and Automation (ICRA), 2026, pp. 9679–9686, doi: 10.1109/ICRA57385.2026.11696149.
[19] S. Macenski, T. Foote, B. Gerkey, C. Lalancette, and W. Woodall, "Robot operating system 2: Design, architecture, and uses in the wild," Science Robotics, vol. 7, no. 66, p. eabm6074, 2022, doi: 10.1126/scirobotics.abm6074.
[20] S. Chitta, E. Marder-Eppstein, W. Meeussen, V. Pradeep, A. Rodríguez Tsouroukdissian, J. Bohren, D. Coleman, B. Magyar, G. Raiola, M. Lüdtke, and E. Fernández Perdomo, “ros_control: A generic and simple control framework for ros,” The Journal of Open Source Software, 2017, doi: 10.21105/joss.00456.
[21] M. L. Gambo, A. Danasabe, B. Almadani, F. Aliyu, A. Aliyu, and E. Al-Nahari, “A systematic literature review of dds middle-
ware in robotic systems," Robotics, vol. 14, no. 5, 2025, doi: 10.3390/robotics14050063.
[22] D. E. Whitney, “Force Feedback Control of Manipulator Fine Motions,” Journal of Dynamic Systems, Measurement, and Control, no. 2, pp. 91–97, 06 1977, doi: 10.1115/1.3427095.
[23] J. K. Salisbury, “Active stiffness control of a manipulator in cartesian coordinates,” in 19th IEEE Conference on Decision and Control including the Symposium on Adaptive Processes, 1980, pp. 95–100, doi: 10.1109/CDC.1980.272026.
[24] M. H. Raibert and J. J. Craig, “Hybrid Position/Force Control of Manipulators,” Journal of Dynamic Systems, Measurement, and Control, vol. 103, no. 2, pp. 126–133, 06 1981, doi: 10.1115/1.3139652.
[25] S. Haddadin, S. Parusel, L. Johannsmeier, S. Golz, S. Gabl, F. Walch, M. Sabaghian, C. Jähne, L. Hausperger, and S. Haddadin, “The franka emika robot: A reference platform for robotics research and education,” IEEE Robotics and Automation Magazine, vol. 29, no. 2, pp. 46–64, 2022, doi: 10.1109/MRA.2021.3138382.
[26] R. Bischoff, J. Kurth, G. Schreiber, R. Koeppe, A. Albu-Schaeffer, A. Beyer, O. Eiberger, S. Haddadin, A. Stemmer, G. Grunwald, and G. Hirzinger, “The kuka-dlr lightweight robot arm - a new reference platform for robotics research and manufacturing,” in ISR 2010 (41st International Symposium on Robotics) and ROBOTIK 2010 (6th German Conference on Robotics), 2010, pp. 1–8, accessed: August 20, 2026. [Online]. Available: https://ieeexplore.ieee.org/document/5756872
[27] F. R. GmbH, “Franka research 3,” Franka Robotics GmbH, Technical Report, 2026, accessed: August 10, 2026. [Online]. Available: https://franka.de/hubfs/Brochure_Franka%20Research%203_February%202026_English.pdf?hsLang=en
[28] K. Inc., “Kinova gen3,” Kinova Inc., Technical Report, 2022, accessed: August 10, 2026. [Online]. Available: https://drive.google.com/file/d/1UbCKUgOjKqTvQNwXWN5gIdBiP9Q4hP5d/view
[29] A. De Luca, A. Albu-Schäffer, S. Haddadin, and G. Hirzinger, “Collision detection and safe reaction with the dlr-iii lightweight manipulator arm,” in IEEE/RSJ Int. Conf. on Intelligent Robots and Systems (IROS), 2006, pp. 1623–1630, doi: 10.1109/IROS.2006.282053.
[30] S. Haddadin, A. Albu-Schäffer, A. De Luca, and G. Hirzinger, “Collision detection and reaction: A contribution to safe physical human-robot interaction,” in IEEE/RSJ Int. Conf. on Intelligent Robots and Systems (IROS), 2008, pp. 3356–3363, doi: 10.1109/IROS.2008.4650764.
[31] S. Haddadin, A. Albu-Schäffer, and G. Hirzinger, “Safety evaluation of physical human-robot interaction via crash-testing.” in Robotics: Science and Systems. The MIT Press, 2008, doi: 10.7551/mitpress/7830.003.0029.
[32] S. Haddadin, A. Albu-Schäffer, and G. Hirzinger, “Soft-tissue injury in robotics,” in IEEE Intl. Conf. on Robotics and Automation (ICRA), 2010, pp. 3426–3433, doi: 10.1109/ROBOT.2010.5509854.
[33] S. Parusel, S. Haddadin, and A. Albu-Schäffer, “Modular state-based behavior control for safe human-robot interaction: A lightweight control architecture for a lightweight robot,” in IEEE Intl. Conf. on Robotics and Automation (ICRA), 2011, pp. 4298–4305, doi: 10.1109/ICRA.2011.5980549.
[34] J. Skerlj, D. Pérez-Suay, S. Knebel, H. Sadeghian, A. Naceri, and S. Haddadin, “Virtual reality-based framework for service robotics: Data monitoring and recording during rehabilitation scenarios,” IFAC-PapersOnLine, 22nd IFAC World Congress, vol. 56, no. 2, pp. 7044–7051, 2023, doi: 10.1016/j.ifacol.2023.10.555.
[35] J. Skerlj, M. Braun, S. Witz, S. Breuer, M. Bak, S. Scholz, A. Naceri, R. Müller, S. Haddadin, and I. Eisenberger, “Data recording for responsible robotics,” in IEEE Intl. Conf. on Advanced Robotics and Its Social Impacts (ARSO), 2023, pp. 103–109, doi: 10.1109/ARSO56563.2023.10187414.
[36] S. Macenski, A. Soragna, M. Carroll, and Z. Ge, “Impact of ros 2 node composition in robotic systems,” IEEE Robotics and Automation Letters (RA-L), vol. 8, no. 7, pp. 3996–4003, 2023, doi: 10.1109/LRA.2023.3279614.
[37] L. M. Amaya-Mejía, K. Barad, M. Olivares-Mendez, and C. Martinez, "A hybrid adaptive visual servoing approach for robust robotic manipulation in space," in International Conference on Space Robotics (iSpaRo), 2025, pp. 531–538, doi: 10.1109/iSpaRo66239.2025.11436653.
[38] I. O. for Standardization (ISO), “ISO/TS 15066:2014: Robots and robotic devices — collaborative robots,” 2016.
[39] H. Bruyninckx, “Open robot control software: the orocos project,” in IEEE Intl. Conf. on Robotics and Automation (ICRA), vol. 3. IEEE, 2001, pp. 2523–2528, doi: 10.1109/ROBOT.2001.933002.
[40] A. Elkady and T. Sobh, “Robotics middleware: A comprehensive literature survey and attribute-based bibliography,” Journal of Robotics, vol. 2012, no. 1, p. 959013, 2012, doi: 10.1155/2012/959013.