# ROS 2 Reflex Engine Switches Robot Controllers in Under 0.1 ms

Published 2026-10-22 · Robotics.world Team · Robotics.world

> Jon Škerlj and Sami Haddadin report a ROS 2-compatible reflex engine that switched control behaviours in under 0.1 milliseconds on a Franka Panda robot. Their arXiv paper also reports a 3.5% faster table-cleaning task, while noting limits in the collision tests.

> “By eliminating runtime middleware overhead, controller transitions are implemented as lock-free pointer operations, enabling reflex-level responsiveness within an open-source robotics framework.”
>
> [Jon Škerlj and Sami Haddadin, authors of the paper](https://arxiv.org/abs/2610.21913)

A ROS 2-compatible controller from Jon Škerlj and Sami Haddadin switches a Franka Panda robot between control behaviours in less than 0.1 milliseconds, according to a paper posted to arXiv on October 15. The authors report that the change lets the robot respond to contact and joint-limit hazards without pausing its task to reload a controller.

## Moving the switch out of ROS 2’s runtime path

The proposed reflex engine builds on the open-source multipanda_ros2 framework and runs as a multimode controller within ros2_control. It uses small modules called controllets, each assigned a particular control behaviour, such as movement, compliant interaction or stopping. The controller prepares its communication interfaces and memory before real-time execution starts, rather than creating ROS 2 communication entities during a switch.

During the 1 kHz control loop, changing behaviours becomes a lock-free pointer reassignment between already initialized controllets. The design avoids runtime memory allocation and middleware operations at the moment of transition. The linked [franka_reflex_engine repository](https://github.com/RoboRef/franka_reflex_engine) contains ROS 2 packages for Franka manipulators.

## Measured against a 210 ms baseline

The team tested 100 switches in each of three configurations. Standard ros2_control lifecycle switching averaged about 210 milliseconds; the original multimode controller averaged 1.8 milliseconds; and the optimized version averaged 0.01 milliseconds. The slowest observed switch in the optimized setup remained below 0.1 milliseconds.

Those figures measure the time from a switch request until new command values appeared in the robot’s internal control loop. They describe controller-transition latency, not the full time required to detect a collision and remove contact force. The distinction matters: in 30 contact trials, the mean force-mitigation time was 0.122 seconds after external force crossed the study’s 15-newton threshold.

## Five reflexes, with a limit on what they can prevent

The software includes stop, admittance, joint-retraction, Cartesian-retraction and gravity-compensation reflexes. Its state machine monitors joint position, velocity and torque, as well as estimated force and moment at the robot’s end effector. In tests that drove joints toward position or velocity limits, none of the trials reached the robot’s hardware limits.

The authors also report a key limitation: feedback control cannot suppress the initial peak force during the first, transient phase of an impact. They say the fast transition instead lets the reflex act in the later phase of contact, before the robot’s own safety limiters trigger. Their discussion cautions that chosen thresholds and reflex behaviour affect results; the soft stop used in the joint tests allowed some overshoot beyond the set safety boundary.

## A modest task-time gain and lower jerk

For a table-cleaning task, the Panda picked up and moved objects, wiped a surface while maintaining 10 newtons of force, then returned a sponge. Across 10 runs per configuration, the optimized controller completed the task in an average of 14.09 seconds, compared with 14.58 seconds for the ros2_control baseline. Peak trajectory jerk fell from 499.0 to 155.4 metres per second cubed.

The test shows how continuous switching can avoid stops between task phases, but it covers one robot and a simplified manipulation routine. The paper, which its authors say they submitted to IEEE, presents the results as a software architecture validated on the Franka Panda—not as evidence that sub-millisecond switching alone establishes a robot’s safety in other settings.

## Sources

1. Original source · Preprint [Sub-Millisecond Reflexes for Continuous Physical Human-Robot Interaction](https://arxiv.org/abs/2610.21913) arXiv:2610.21913

Other pages read

2. [GitHub](https://github.com/RoboRef/franka_reflex_engine) github.com

## Related stories

- [Stanford’s GGraph Unites GPU Robot Learning and ROS 2](https://robotics.world/news/stanford-ggraph-gpu-robot-learning-ros2)
- [Arduino introduces RouterBridge_ROS for bringing board I/O into ROS 2](https://robotics.world/news/arduino-direct-ros-2-bridge-ventuno-q)
- [StrataSLAM is released for multi-floor mapping in ROS 2](https://robotics.world/news/strataslam-multi-floor-mapping-ros-2)
- [ROS 2 Rolling updates rosbag2 to use faster MCAP library](https://robotics.world/news/ros-2-rolling-rosbag2-mcap-write-performance)
- [Northwestern preprint proposes four-factor robot risk filter](https://robotics.world/news/northwestern-preprint-four-factor-robot-risk-filter)

## Explore

[More articles](https://robotics.world/news)

---

Canonical: https://robotics.world/news/ros-2-reflex-engine-sub-millisecond-switching
