Plug, Play and Comply

A Modular Framework for Online Variable Impedance with Arbitrarily Oriented Compliance Axes

Mihael SimoničXiaocong Li

Eastern Institute of Technology, Ningbo

Abstract

The paper proposes a robot-agnostic compliant-control framework that extends the ROS control ecosystem with standardized joint and Cartesian command interfaces. It addresses a key limitation of existing control software: the lack of reusable infrastructure for implementing compliant-control algorithms across different manipulators while preserving a common interface to higher-level applications. A plugin-based architecture separates controller infrastructure from control-law implementation. Generic wrappers use existing hardware abstractions to interface with different manipulators, while runtime-loaded plugins implement only the control law. Command interfaces support updates of joint- and Cartesian-space references, stiffness and damping gains, nullspace targets, and feedforward terms, enabling variable impedance and diverse compliant-control formulations. Robot kinematics and dynamics are computed from URDF models using Pinocchio. The architecture facilitates the development of compliant-control strategies and enables the same implementation to be deployed across platforms unchanged. The complete framework, including reference controllers, high-level task interfaces, and example configurations for various manipulators, is available as open-source software. The reference Cartesian impedance controller supports task-dependent compliance by rotating translational and rotational stiffness and damping matrices, allowing the principal compliance directions to be updated online according to local task geometry rather than remaining fixed in the robot base or TCP frame. This is particularly important in contact-rich manipulation, where the desired directions of motion, constraints, and compliance directions may vary continuously throughout task execution. Real-robot experiments demonstrate task-dependent compliance in contact-rich manipulation, while simulations show portability across manipulators with distinct kinematic and dynamic characteristics.

Why

From high-level commands to compliant motion

High-level policies, teleoperation, and shared-autonomy systems often issue sparse action chunks or task-level corrections. A dependable low-level layer must turn those coarse commands into smooth, stable, and physically consistent interaction.

Execution flow

Wrapper, plugin, and safeguards

Compliant controllers commonly bundle the control law with middleware, model access, and vendor-specific hardware code. That makes a new control strategy costly to prototype and difficult to reuse.

Detailed framework architecture and command execution flow
Robot state and buffered commands pass through the model-backed wrapper, selected controller plugin, compensation, filtering, and safety checks.
Simulink-to-plugin

Generate reusable controller plugins

The pipeline scaffolds the command and state buses, provides a model template for the control law, and compiles it into a loadable plugin for the generic ROS 2 wrapper.

Simulink model-based controller plugin generation pipeline
Simulink plugin pipeline. Structured command and state buses let generated controllers use the same interface as handwritten C++ plugins.
Portability

Deploy the same controller across robots

Even mature robot-specific controllers are hard to transfer when dynamics and hardware access come from vendor APIs. URDF-backed models and common ROS 2 effort interfaces leave only description, naming, launch, and hardware configuration to change.

Franka FR3 robot
Franka FR3
KUKA LBR iiwa 14 robot
KUKA LBR iiwa 14
Flexiv Rizon 4s robot
Flexiv Rizon 4s
Universal Robots UR5e robot
UR5e
Online stiffness

Be soft where the task allows it

Contact-rich tasks need different behavior over time: compliance during search and alignment, followed by higher stiffness along constrained directions once contact is established.

Task-frame mapping

Rotate the compliance directions

A moving task frame whose tangent, normal, and binormal axes follow a curved surface path
Low stiffness follows the normal and binormal directions, while higher stiffness remains tangential.
\[ \begin{aligned} \mathbf{K}_{\mathrm{pos}} &= \mathbf{R}_{\mathrm{task}}\, \mathbf{K}_{\mathrm{pos,diag}}\,\mathbf{R}_{\mathrm{task}}^{\top}, \\ \mathbf{K}_{\mathrm{ori}} &= \mathbf{R}_{\mathrm{task}}\, \mathbf{K}_{\mathrm{ori,diag}}\,\mathbf{R}_{\mathrm{task}}^{\top}. \end{aligned} \]

The diagonal gains set the soft and stiff task directions. \(\mathbf{R}_{\mathrm{task}}\) rotates both stiffness matrices as the path bends.

Task phases

Change gains during the execution

Free-space approach

High stiffness

Contact detection

Lower normal stiffness

Surface following

Low normal, high tangential stiffness

Edge / corner transition

Increase compliance temporarily

Departure

High stiffness

Experiments

Compliance that follows the task

Real-robot tests on a Franka FR3 demonstrate geometry-aware behavior in contact-rich manipulation.

Curved-fixture following

The end effector establishes contact and follows a curved feature while the moving compliance frame keeps the soft direction aligned with the local surface normal.

Displaced curved fixture

The same command and controller follow a curved feature placed at a different position, demonstrating tolerance to fixture-placement error without reteaching the reference path.

Rotary connector manipulation

Task-aligned compliance accommodates contact and pose uncertainty while the robot engages and manipulates the rotary connector.

Hose connector mating

A PVC quick connector approaches with angular misalignment. Task-aligned compliance lets contact forces guide self-alignment and prevent binding during insertion.

Electrical plug insertion

The robot inserts an electrical plug while compliant translational and rotational directions accommodate small pose errors and protect the connector during contact.