Safe Control for Soft-Rigid Robots with Self-Contact
using Control Barrier Functions

Zach J. Patterson1, Wei Xiao1, Emily Sologuren1, and Daniela Rus1 1 Computer Science and Artificial Intelligence Laboratory, MIT. [email protected], [email protected], [email protected]
Abstract

Incorporating both flexible and rigid components in robot designs offers a unique solution to the limitations of traditional rigid robotics by enabling both compliance and strength. This paper explores the challenges and solutions for controlling soft-rigid hybrid robots, particularly addressing the issue of self-contact. Conventional control methods prioritize precise state tracking, inadvertently increasing the system’s overall stiffness, which is not always desirable in interactions with the environment or within the robot itself. To address this, we investigate the application of Control Barrier Functions (CBFs) and High Order CBFs to manage self-contact scenarios in serially connected soft-rigid hybrid robots. Through an analysis based on Piecewise Constant Curvature (PCC) kinematics, we establish CBFs within a classical control framework for self-contact dynamics. Our methodology is rigorously evaluated in both simulation environments and physical hardware systems. The findings demonstrate that our proposed control strategy effectively regulates self-contact in soft-rigid hybrid robotic systems, marking a significant advancement in the field of robotics.

I Introduction

As the soft robotics field continues its growth towards maturity, there is a nascent trend towards soft-rigid hybrid robot forms to allow both compliance for safe operation in uncertain environments and rigidity to allow load bearing capability [1, 2, 3, 4]. Indeed, the majority of larger life forms (mammals, reptiles, birds, amphibians, and even fish) have some articulated rigid body structure that allows self-support under gravity. Such robots may expand the range of potential behaviors of robots, but they also may instantiate in new problems. In this work, we will look at a class of soft-rigid robots that frequently undergo rigid self contact and we will seek to control these systems to gracefully deal with self contact.

While the field of soft robotic control has experienced rapid growth over the past decade [5], critical open questions remain. Thus far, most works have focused on precise state [6] or end-effector tracking [7], yet these tasks may ultimately be incidental to the goals of soft robots. This is because, as discussed in [8], there is a trade-off between feedback and stiffness, with more feedback increasing the effective stiffness of the system, eliminating the benefits of soft materials. Feedforward control does not suffer the same issues, but requires precise models that are fundamentally difficult for soft robots. Thus, while balanced feedforward plus feedback controllers like the PD+ controller have been shown to stabilize state trajectories for soft robots [5], this comes at a cost of stiffening the robot’s potential interactions with the environment (or with itself in self-contact) [9]. This motivates exploration of alternative methods of certifying performance for soft robots, ones that do not necessitate asymptotic convergence to a trajectory. Inspired by the the above discussion, we explore formal guarantees in operation with the use of Control Barrier Functions (CBFs) to govern their behavior.

Barrier Functions (BFs) are Lyapunov-like functions [10, 11] and have their origins in the optimization literature [12], in which case they are added in objective functions. Their primary use is to enforce constraints while doing optimization. Control Barrier Functions (CBFs) represent an extension of BFs tailored for control systems. They transform a constraint defined in terms of system states into a constraint on the control inputs. CBFs offer a state-feedback controller that is rigorously proven to be safe while remaining computationally efficient [13]. Specifically, CBFs are well-suited for constraints characterized by a relative degree of one concerning the system dynamics [13, 14]. The High Order CBF (HOCBF) [15] is designed to effectively handle constraints with arbitrarily high relative degrees, making it a versatile extension of the conventional CBF framework.

For soft-rigid robots that experience self-contact, CBFs provide a natural mechanism to design controllers that can gracefully regulate behavior near contact points (they have previously been used for something similar with humanoids [16]). They also naturally encapsulate other constraints common in continuum robots, such as limits to extension. More generally for soft and interactive robots, CBFs provide a mechanism of safety and performance verification that can be used to guarantee properties without relying on asymptotically stable control of the state of the robot. In this work, we adopt the commonly-used Piecewise Constant Curvature (PCC) model for our system. To our knowledge, this is the first work applying CBFs to continuum robot models.

II Preliminaries and System Formulation

Refer to caption
Figure 1: An example of the type of hardware we examine for this work, where the modular soft-rigid segments frequently make self contact. We seek to operationalize representations of distance functions such as cjsubscript𝑐𝑗c_{j}italic_c start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT to gracefully control such structures in the presence of self contact using CBFs.

II-A High Order CBFs

We briefly introduce the background of high order CBFs [15] in this section, and we start with some definitions for CBFs/HOCBFs. Note that this section contains formal definitions and a theorem from previous works [15, 13, 17, 14], which we reproduce here for completeness.

In this paper, we consider an affine control system:

𝒙˙=f(𝒙)+g(𝒙)𝒖˙𝒙𝑓𝒙𝑔𝒙𝒖\dot{\bm{x}}=f(\bm{x})+g(\bm{x})\bm{u}over˙ start_ARG bold_italic_x end_ARG = italic_f ( bold_italic_x ) + italic_g ( bold_italic_x ) bold_italic_u (1)

where 𝒙Xn𝒙𝑋superscript𝑛\bm{x}\in X\subset\mathbb{R}^{n}bold_italic_x ∈ italic_X ⊂ blackboard_R start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT, f:nn:𝑓superscript𝑛superscript𝑛f:\mathbb{R}^{n}\rightarrow\mathbb{R}^{n}italic_f : blackboard_R start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT → blackboard_R start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT and g:nn×q:𝑔superscript𝑛superscript𝑛𝑞g:\mathbb{R}^{n}\rightarrow\mathbb{R}^{n\times q}italic_g : blackboard_R start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT → blackboard_R start_POSTSUPERSCRIPT italic_n × italic_q end_POSTSUPERSCRIPT are Lipschitz continuous, and 𝒖Uq𝒖𝑈superscript𝑞\bm{u}\in U\subset\mathbb{R}^{q}bold_italic_u ∈ italic_U ⊂ blackboard_R start_POSTSUPERSCRIPT italic_q end_POSTSUPERSCRIPT is the control constraint set.

Definition 1

([13]) A set Cn𝐶superscript𝑛C\subset\mathbb{R}^{n}italic_C ⊂ blackboard_R start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT is forward invariant for system (1) if solutions for some 𝐮U𝐮𝑈\bm{u}\in Ubold_italic_u ∈ italic_U starting at any 𝐱(0)C𝐱0𝐶\bm{x}(0)\in Cbold_italic_x ( 0 ) ∈ italic_C satisfy 𝐱(t)C,𝐱𝑡𝐶\bm{x}(t)\in C,bold_italic_x ( italic_t ) ∈ italic_C , t0for-all𝑡0\forall t\geq 0∀ italic_t ≥ 0.

Definition 2

(Relative degree [17]) The relative degree of a differentiable function b:n:𝑏superscript𝑛b:\mathbb{R}^{n}\rightarrow\mathbb{R}italic_b : blackboard_R start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT → blackboard_R w.r.t. system (1) is the number of times it must be differentiated along the dynamics until any component of 𝐮𝐮\bm{u}bold_italic_u appears in the corresponding derivative.

For constraint b(𝒙)0𝑏𝒙0b(\bm{x})\geq 0italic_b ( bold_italic_x ) ≥ 0, the relative degree is the same for that of function b(𝒙)𝑏𝒙b(\bm{x})italic_b ( bold_italic_x ). Consider a constraint b(𝒙)0𝑏𝒙0b(\bm{x})\geq 0italic_b ( bold_italic_x ) ≥ 0 of relative degree m𝑚mitalic_m, where b:n:𝑏superscript𝑛b:\mathbb{R}^{n}\rightarrow\mathbb{R}italic_b : blackboard_R start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT → blackboard_R, we define ψ0(𝒙):=b(𝒙)assignsubscript𝜓0𝒙𝑏𝒙\psi_{0}(\bm{x}):=b(\bm{x})italic_ψ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( bold_italic_x ) := italic_b ( bold_italic_x ) and a sequence of functions ψi:n,i{1,,m}:subscript𝜓𝑖formulae-sequencesuperscript𝑛𝑖1𝑚\psi_{i}:\mathbb{R}^{n}\rightarrow\mathbb{R},i\in\{1,\dots,m\}italic_ψ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT : blackboard_R start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT → blackboard_R , italic_i ∈ { 1 , … , italic_m } in the form:

ψi(𝒙):=ψ˙i1(𝒙)+αi(ψi1(𝒙)),i{1,,m},formulae-sequenceassignsubscript𝜓𝑖𝒙subscript˙𝜓𝑖1𝒙subscript𝛼𝑖subscript𝜓𝑖1𝒙𝑖1𝑚\displaystyle\psi_{i}(\bm{x}):=\dot{\psi}_{i-1}(\bm{x})+\alpha_{i}(\psi_{i-1}(% \bm{x})),i\in\{1,\dots,m\},italic_ψ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( bold_italic_x ) := over˙ start_ARG italic_ψ end_ARG start_POSTSUBSCRIPT italic_i - 1 end_POSTSUBSCRIPT ( bold_italic_x ) + italic_α start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_ψ start_POSTSUBSCRIPT italic_i - 1 end_POSTSUBSCRIPT ( bold_italic_x ) ) , italic_i ∈ { 1 , … , italic_m } , (2)

where αi(),i{1,,m}subscript𝛼𝑖𝑖1𝑚\alpha_{i}(\cdot),i\in\{1,\dots,m\}italic_α start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( ⋅ ) , italic_i ∈ { 1 , … , italic_m } denotes a (mi)thsuperscript𝑚𝑖𝑡(m-i)^{th}( italic_m - italic_i ) start_POSTSUPERSCRIPT italic_t italic_h end_POSTSUPERSCRIPT order differentiable class 𝒦𝒦\mathcal{K}caligraphic_K function [17].

Further, we define the corresponding safe sets Ci,i{1,,m}subscript𝐶𝑖𝑖1𝑚C_{i},i\in\{1,\dots,m\}italic_C start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_i ∈ { 1 , … , italic_m } associated with (2):

Ci:={𝒙n:ψi1(𝒙)0},i{1,,m}.formulae-sequenceassignsubscript𝐶𝑖conditional-set𝒙superscript𝑛subscript𝜓𝑖1𝒙0𝑖1𝑚\displaystyle C_{i}:=\{\bm{x}\in\mathbb{R}^{n}:\psi_{i-1}(\bm{x})\geq 0\},i\in% \{1,\dots,m\}.italic_C start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT := { bold_italic_x ∈ blackboard_R start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT : italic_ψ start_POSTSUBSCRIPT italic_i - 1 end_POSTSUBSCRIPT ( bold_italic_x ) ≥ 0 } , italic_i ∈ { 1 , … , italic_m } . (3)
Definition 3

(High Order Control Barrier Function (HOCBF) [15]) Let Ci,i{1,,m}subscript𝐶𝑖𝑖1𝑚C_{i},i\in\{1,\dots,m\}italic_C start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_i ∈ { 1 , … , italic_m } be defined by (3) and ψi(𝐱),i{1,,m}subscript𝜓𝑖𝐱𝑖1𝑚\psi_{i}(\bm{x}),i\in\{1,\dots,m\}italic_ψ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( bold_italic_x ) , italic_i ∈ { 1 , … , italic_m } be defined by (2). A function b:n:𝑏superscript𝑛b:\mathbb{R}^{n}\rightarrow\mathbb{R}italic_b : blackboard_R start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT → blackboard_R is a HOCBF of relative degree m𝑚mitalic_m for system (1) if there exist (mi)thsuperscript𝑚𝑖𝑡(m-i)^{th}( italic_m - italic_i ) start_POSTSUPERSCRIPT italic_t italic_h end_POSTSUPERSCRIPT order differentiable class 𝒦𝒦\mathcal{K}caligraphic_K functions αi,i{1,,m1}subscript𝛼𝑖𝑖1𝑚1\alpha_{i},i\in\{1,\dots,m-1\}italic_α start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_i ∈ { 1 , … , italic_m - 1 } and a class 𝒦𝒦\mathcal{K}caligraphic_K function αmsubscript𝛼𝑚\alpha_{m}italic_α start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT such that

sup𝒖U[Lfmb(𝒙)+LgLfm1b(𝒙)𝒖+R(b(𝒙))\displaystyle\sup_{\bm{u}\in U}[L_{f}^{m}b(\bm{x})+L_{g}L_{f}^{m-1}b(\bm{x})% \bm{u}+R(b(\bm{x}))roman_sup start_POSTSUBSCRIPT bold_italic_u ∈ italic_U end_POSTSUBSCRIPT [ italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT italic_b ( bold_italic_x ) + italic_L start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m - 1 end_POSTSUPERSCRIPT italic_b ( bold_italic_x ) bold_italic_u + italic_R ( italic_b ( bold_italic_x ) ) (4)
+αm(ψm1(𝒙))]0,\displaystyle+\alpha_{m}(\psi_{m-1}(\bm{x}))]\geq 0,+ italic_α start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT ( italic_ψ start_POSTSUBSCRIPT italic_m - 1 end_POSTSUBSCRIPT ( bold_italic_x ) ) ] ≥ 0 ,

for all 𝐱C1,,Cm𝐱limit-fromsubscript𝐶1subscript𝐶𝑚\bm{x}\in C_{1}\cap,\dots,\cap C_{m}bold_italic_x ∈ italic_C start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ∩ , … , ∩ italic_C start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT. The part before the inequality in (4) is actually ψm(𝐱)subscript𝜓𝑚𝐱\psi_{m}(\bm{x})italic_ψ start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT ( bold_italic_x ), Lfsubscript𝐿𝑓L_{f}italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT (Lgsubscript𝐿𝑔L_{g}italic_L start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT) denotes Lie derivatives along f𝑓fitalic_f (g𝑔gitalic_g), and R(b(𝐱))=i=1m1Lfi(αmiψmi1)(𝐱).𝑅𝑏𝐱superscriptsubscript𝑖1𝑚1superscriptsubscript𝐿𝑓𝑖subscript𝛼𝑚𝑖subscript𝜓𝑚𝑖1𝐱R(b(\bm{x}))=\sum_{i=1}^{m-1}L_{f}^{i}(\alpha_{m-i}\circ\psi_{m-i-1})(\bm{x}).italic_R ( italic_b ( bold_italic_x ) ) = ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m - 1 end_POSTSUPERSCRIPT italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ( italic_α start_POSTSUBSCRIPT italic_m - italic_i end_POSTSUBSCRIPT ∘ italic_ψ start_POSTSUBSCRIPT italic_m - italic_i - 1 end_POSTSUBSCRIPT ) ( bold_italic_x ) .

HOCBFs generalize CBFs of relative degree one [13], [14].

Theorem 1 ([15])

Given a HOCBF b(𝐱)𝑏𝐱b(\bm{x})italic_b ( bold_italic_x ) from Def. 3 with the associated sets C1,,Cmsubscript𝐶1subscript𝐶𝑚C_{1},\dots,C_{m}italic_C start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_C start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT defined by (3), if 𝐱(0)C1,,Cm𝐱0limit-fromsubscript𝐶1subscript𝐶𝑚\bm{x}(0)\in C_{1}\cap,\dots,\cap C_{m}bold_italic_x ( 0 ) ∈ italic_C start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ∩ , … , ∩ italic_C start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT, then any Lipschitz continuous controller 𝐮(t)U𝐮𝑡𝑈\bm{u}(t)\in Ubold_italic_u ( italic_t ) ∈ italic_U that satisfies the constraint in (4), t0for-all𝑡0\forall t\geq 0∀ italic_t ≥ 0 renders C1,,Cmlimit-fromsubscript𝐶1subscript𝐶𝑚C_{1}\cap,\dots,\cap C_{m}italic_C start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ∩ , … , ∩ italic_C start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT forward invariant for system (1).

CBFs/HOCBFs are used to transform nonlinear safety-critical control optimization problems onto a sequence of convex optimizations for system (1) [13], [14]. We discretize the time, and hold the state as a constant within each time interval. Then, the optimization becomes a quadratic program within each time interval when the cost is quadratic in control. The inter-sampling effect, feasibility, adaptivity, and optimality of the CBF method are extensively studied in [18].

With Hq×q𝐻superscript𝑞𝑞H\in\mathbb{R}^{q\times q}italic_H ∈ blackboard_R start_POSTSUPERSCRIPT italic_q × italic_q end_POSTSUPERSCRIPT (positive definite) and Fq𝐹superscript𝑞F\in\mathbb{R}^{q}italic_F ∈ blackboard_R start_POSTSUPERSCRIPT italic_q end_POSTSUPERSCRIPT, we can include the CBF as a constraint in the QP as follows:

min𝒖(t)Usubscript𝒖𝑡𝑈\displaystyle\min_{\bm{u}(t)\in U}roman_min start_POSTSUBSCRIPT bold_italic_u ( italic_t ) ∈ italic_U end_POSTSUBSCRIPT 𝒖T(t)H𝒖(t)+FT𝒖(t)superscript𝒖𝑇𝑡𝐻𝒖𝑡superscript𝐹𝑇𝒖𝑡\displaystyle\bm{u}^{T}(t)H\bm{u}(t)+F^{T}\bm{u}(t)bold_italic_u start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT ( italic_t ) italic_H bold_italic_u ( italic_t ) + italic_F start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT bold_italic_u ( italic_t ) (5)
s.t.
Lfmb(𝒙)+[Lg\displaystyle L_{f}^{m}b(\bm{x})+[L_{g}italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT italic_b ( bold_italic_x ) + [ italic_L start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT Lfm1b(𝒙)]𝒖+R(b(𝒙))+αm(ψm1(𝒙))0.\displaystyle L_{f}^{m-1}b(\bm{x})]\bm{u}\!+\!R(b(\bm{x}))+\alpha_{m}(\psi_{m-% 1}(\bm{x}))\geq 0.italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m - 1 end_POSTSUPERSCRIPT italic_b ( bold_italic_x ) ] bold_italic_u + italic_R ( italic_b ( bold_italic_x ) ) + italic_α start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT ( italic_ψ start_POSTSUBSCRIPT italic_m - 1 end_POSTSUBSCRIPT ( bold_italic_x ) ) ≥ 0 .

The main advantage of CBFs/HOCBFs lies in their high computation efficiency for nonlinear systems [13]. They are used to guarantee system safety. In this paper, we use CBFs/HOCBFs to achieve safe manipulation for soft-rigid robots.

II-B Kinematics and Dynamics

In the following work, we consider systems like those shown in Fig. 1. Manipulators of this type were first presented in [19]. The salient features of this device are the solid foam elastic continuum and the rigid plates that make frequent self contact during operation. The segments are actuated with three motor-driven tendons arranged equally around the perimeter. For the following, in order to model this system, we adopt a Piecewise Constant Curvature approximation of the kinematics [20]. Following Della Santina [21], we utilize a singularity free parametrization wherein the state variables for the segment are

𝒒=[Δx,Δy,δL]T.𝒒superscriptsubscriptΔxsubscriptΔy𝛿𝐿𝑇\bm{q}=[\Delta_{\mathrm{x}},\Delta_{\mathrm{y}},\delta L]^{T}.bold_italic_q = [ roman_Δ start_POSTSUBSCRIPT roman_x end_POSTSUBSCRIPT , roman_Δ start_POSTSUBSCRIPT roman_y end_POSTSUBSCRIPT , italic_δ italic_L ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT . (6)

While these variables correspond directly to physical quantities, they are not necessarily intuitive for a human. Suffice it to say that the first two correspond to bending along the x and y axes respectively, while the third is a straightforward extension of compression of the segment. The reader is referred to [21] for more details. In the forthcoming, we will make use of the bend angle

θ=1dΔx2+Δy2,𝜃1𝑑superscriptsubscriptΔx2superscriptsubscriptΔy2\theta=\frac{1}{d}\sqrt{\Delta_{\mathrm{x}}^{2}+\Delta_{\mathrm{y}}^{2}},italic_θ = divide start_ARG 1 end_ARG start_ARG italic_d end_ARG square-root start_ARG roman_Δ start_POSTSUBSCRIPT roman_x end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + roman_Δ start_POSTSUBSCRIPT roman_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG , (7)

where d𝑑ditalic_d is the radius of the segment and is chosen here to be the distance from the center of a segment to a tendon. We can easily calculate the current position of any point on the robot by using the standard forward kinematics based on our PCC model:

r(𝒒)=FK(𝒒).𝑟𝒒FK𝒒r(\bm{q})=\mathrm{FK}(\bm{q}).italic_r ( bold_italic_q ) = roman_FK ( bold_italic_q ) . (8)

While the dynamics of our system are clearly hybrid, we will assume that we do not make contact for the purposes of our dynamic model (and indeed, the purpose of our demonstration of CBFs will be to prevent the robot from driving the system through the contact point). Therefore, we can derive and write the dynamics for our PCC model in the usual form,

M(𝒒)𝒒¨+C(q,𝒒˙)𝒒˙+G(𝒒)+K(𝒒)+D(𝒒)𝒒˙=𝝉,𝑀𝒒bold-¨𝒒𝐶𝑞bold-˙𝒒bold-˙𝒒𝐺𝒒𝐾𝒒𝐷𝒒bold-˙𝒒𝝉M(\bm{q})\bm{\ddot{q}}+C(q,\bm{\dot{q}})\bm{\dot{q}}+G(\bm{q})+K(\bm{q})+D(\bm% {q})\bm{\dot{q}}=\bm{\tau},italic_M ( bold_italic_q ) overbold_¨ start_ARG bold_italic_q end_ARG + italic_C ( italic_q , overbold_˙ start_ARG bold_italic_q end_ARG ) overbold_˙ start_ARG bold_italic_q end_ARG + italic_G ( bold_italic_q ) + italic_K ( bold_italic_q ) + italic_D ( bold_italic_q ) overbold_˙ start_ARG bold_italic_q end_ARG = bold_italic_τ , (9)

where M(𝒒)𝑀𝒒M(\bm{q})italic_M ( bold_italic_q ) is the mass matrix, C(q,𝒒˙)𝐶𝑞bold-˙𝒒C(q,\bm{\dot{q}})italic_C ( italic_q , overbold_˙ start_ARG bold_italic_q end_ARG ) is the Coriolis matrix, G(𝒒)𝐺𝒒G(\bm{q})italic_G ( bold_italic_q ) is the gravity force, K(𝒒)𝐾𝒒K(\bm{q})italic_K ( bold_italic_q ) is the elastic force (K(𝒒)=Kq𝐾𝒒𝐾𝑞K(\bm{q})=Kqitalic_K ( bold_italic_q ) = italic_K italic_q when using the linear elastic assumption), D(𝒒)𝐷𝒒D(\bm{q})italic_D ( bold_italic_q ) is the dam** matrix, and 𝝉𝝉\bm{\tau}bold_italic_τ is the input vector. We will now discuss the application of CBFs to this PCC soft robot model in general.

II-C CBFs for Soft Robots

To reiterate, the purpose of CBFs is to enforce that a closed loop system’s trajectories remain in a forward invariant set. Thus, within robotics we can use them to enforce set constraints on any property of the system that can be written as a function of the state and its derivatives (e.g. q𝑞qitalic_q, 𝒒˙bold-˙𝒒\bm{\dot{q}}overbold_˙ start_ARG bold_italic_q end_ARG, 𝒒¨bold-¨𝒒\bm{\ddot{q}}overbold_¨ start_ARG bold_italic_q end_ARG, etc), which includes most of the kinematic quantities of the robot. In this work, we will focus on safety constraints corresponding to constraints on points on the robot’s body with respect to other parts of the robot’s body or environment. For example, for a surgical soft robot, we might use such constraints to guarantee that the continuum does not touch a fragile piece of tissue during a minimally invasive surgery.

To specify such a constraint, we can begin by using the forward kinematics (8) to write down the point under consideration of our robot, r(𝒒)𝑟𝒒r(\bm{q})italic_r ( bold_italic_q ). Then, we can define our constraint with respect to the environment as,

b(𝒒)=h(r(𝒒)),𝑏𝒒𝑟𝒒b(\bm{q})=h(r(\bm{q})),italic_b ( bold_italic_q ) = italic_h ( italic_r ( bold_italic_q ) ) , (10)

where hhitalic_h is some function, often a distance function or similar, that describes the safe set. Given this safety constraint and that this safety constraint is relative degree two [17], we can choose both class 𝒦𝒦\mathcal{K}caligraphic_K functions in (2) as linear functions with constant coefficient p>0𝑝0p>0italic_p > 0. The CBF constraints corresponding to (4) are then

Lf2b+LgLfb𝒖+2pLfb+p2b0.superscriptsubscript𝐿𝑓2𝑏subscript𝐿𝑔subscript𝐿𝑓𝑏𝒖2𝑝subscript𝐿𝑓𝑏superscript𝑝2𝑏0L_{f}^{2}b+L_{g}L_{f}b\bm{u}+2pL_{f}b+p^{2}b\geq 0.italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_b + italic_L start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT italic_b bold_italic_u + 2 italic_p italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT italic_b + italic_p start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_b ≥ 0 . (11)

All that is left is to translate the CBF into kinematic and dynamic quantities of our robot as follows. We first note that u=𝝉𝑢𝝉u=\bm{\tau}italic_u = bold_italic_τ, f=[𝒒˙,M1(C𝒒˙+G+K𝒒+D𝒒˙)]𝑓bold-˙𝒒superscript𝑀1𝐶bold-˙𝒒𝐺𝐾𝒒𝐷bold-˙𝒒f=[\bm{\dot{q}},M^{-1}(C\bm{\dot{q}}+G+K\bm{q}+D\bm{\dot{q}})]italic_f = [ overbold_˙ start_ARG bold_italic_q end_ARG , italic_M start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_C overbold_˙ start_ARG bold_italic_q end_ARG + italic_G + italic_K bold_italic_q + italic_D overbold_˙ start_ARG bold_italic_q end_ARG ) ] and g=[0,M1]𝑔0superscript𝑀1g=[0,M^{-1}]italic_g = [ 0 , italic_M start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ] (9). Performing the Lie derivatives, we can write,

Lfbsubscript𝐿𝑓𝑏\displaystyle L_{f}bitalic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT italic_b =b˙=J𝒒˙absent˙𝑏𝐽bold-˙𝒒\displaystyle=\dot{b}=J\bm{\dot{q}}= over˙ start_ARG italic_b end_ARG = italic_J overbold_˙ start_ARG bold_italic_q end_ARG (12)
Lf2b+LgLfb𝒖superscriptsubscript𝐿𝑓2𝑏subscript𝐿𝑔subscript𝐿𝑓𝑏𝒖\displaystyle L_{f}^{2}b+L_{g}L_{f}b\bm{u}italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_b + italic_L start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT italic_L start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT italic_b bold_italic_u =b¨=J𝒒¨+J˙𝒒˙,absent¨𝑏𝐽bold-¨𝒒˙𝐽bold-˙𝒒\displaystyle=\ddot{b}=J\bm{\ddot{q}}+\dot{J}\bm{\dot{q}},= over¨ start_ARG italic_b end_ARG = italic_J overbold_¨ start_ARG bold_italic_q end_ARG + over˙ start_ARG italic_J end_ARG overbold_˙ start_ARG bold_italic_q end_ARG , (13)

where J𝐽Jitalic_J is the Jacobian of our constraint function (10):

J=b𝒒=hrr𝒒𝐽𝑏𝒒𝑟𝑟𝒒J=\frac{\partial b}{\partial\bm{q}}=\frac{\partial h}{\partial r}\frac{% \partial r}{\partial\bm{q}}italic_J = divide start_ARG ∂ italic_b end_ARG start_ARG ∂ bold_italic_q end_ARG = divide start_ARG ∂ italic_h end_ARG start_ARG ∂ italic_r end_ARG divide start_ARG ∂ italic_r end_ARG start_ARG ∂ bold_italic_q end_ARG (14)

and J˙˙𝐽\dot{J}over˙ start_ARG italic_J end_ARG is its time derivative. Finally, substituting (12) into (11), we have the following CBF constraints in terms of our PCC quantities:

p2b+2pJ𝒒˙+JM1(C𝒒˙GK𝒒D𝒒˙+𝝉)+J˙𝒒˙>0.superscript𝑝2𝑏2𝑝𝐽bold-˙𝒒𝐽superscript𝑀1𝐶bold-˙𝒒𝐺𝐾𝒒𝐷bold-˙𝒒𝝉˙𝐽bold-˙𝒒0p^{2}b+2pJ\bm{\dot{q}}+JM^{-1}(-C\bm{\dot{q}}-G-K\bm{q}-D\bm{\dot{q}}+\bm{\tau% })+\dot{J}\bm{\dot{q}}>0.italic_p start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_b + 2 italic_p italic_J overbold_˙ start_ARG bold_italic_q end_ARG + italic_J italic_M start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( - italic_C overbold_˙ start_ARG bold_italic_q end_ARG - italic_G - italic_K bold_italic_q - italic_D overbold_˙ start_ARG bold_italic_q end_ARG + bold_italic_τ ) + over˙ start_ARG italic_J end_ARG overbold_˙ start_ARG bold_italic_q end_ARG > 0 . (15)

In the next section, we will show a specific application of this CBF for regulating self-contact of a soft-rigid hybrid robot.

III Control Approach

A basic control goal for this type of system is to prevent the controller from trying to actuate through self-contact, which can potentially break the robot. In this section, we will define this safety constraint mathematically and derive a nominal controller. The control idea is naturally encompassed by Control Barrier Functions, upon which we will elaborate in the following.

III-A Nominal Control Input

For our nominal control input, we utilize a PD+ controller [5] of the following form,

𝝉nom=M(𝒒)𝒒¯¨+C(𝒒,𝒒˙)𝒒˙+G(𝒒)+K𝒒¯+D𝒒¯˙+KP(𝒒¯𝒒)+KD(𝒒¯˙𝒒˙),subscript𝝉nom𝑀𝒒bold-¨bold-¯𝒒𝐶𝒒bold-˙𝒒bold-˙𝒒𝐺𝒒𝐾bold-¯𝒒𝐷bold-˙bold-¯𝒒subscript𝐾Pbold-¯𝒒𝒒subscript𝐾Dbold-˙bold-¯𝒒bold-˙𝒒\bm{\tau}_{\mathrm{nom}}=M(\bm{q})\bm{\ddot{\overline{q}}}+C(\bm{q},\bm{\dot{q% }})\bm{\dot{q}}+G(\bm{q})+K\bm{\overline{q}}+D\bm{\dot{\overline{q}}}\\ +K_{\mathrm{P}}(\bm{\overline{q}}-\bm{q})+K_{\mathrm{D}}(\bm{\dot{\overline{q}% }}-\bm{\dot{q}}),start_ROW start_CELL bold_italic_τ start_POSTSUBSCRIPT roman_nom end_POSTSUBSCRIPT = italic_M ( bold_italic_q ) overbold_¨ start_ARG overbold_¯ start_ARG bold_italic_q end_ARG end_ARG + italic_C ( bold_italic_q , overbold_˙ start_ARG bold_italic_q end_ARG ) overbold_˙ start_ARG bold_italic_q end_ARG + italic_G ( bold_italic_q ) + italic_K overbold_¯ start_ARG bold_italic_q end_ARG + italic_D overbold_˙ start_ARG overbold_¯ start_ARG bold_italic_q end_ARG end_ARG end_CELL end_ROW start_ROW start_CELL + italic_K start_POSTSUBSCRIPT roman_P end_POSTSUBSCRIPT ( overbold_¯ start_ARG bold_italic_q end_ARG - bold_italic_q ) + italic_K start_POSTSUBSCRIPT roman_D end_POSTSUBSCRIPT ( overbold_˙ start_ARG overbold_¯ start_ARG bold_italic_q end_ARG end_ARG - overbold_˙ start_ARG bold_italic_q end_ARG ) , end_CELL end_ROW (16)

where q¯¯𝑞\overline{q}over¯ start_ARG italic_q end_ARG is a desired trajectory. As demonstrated in [22], this controller is asymptotically stable for trajectory q¯¯𝑞\overline{q}over¯ start_ARG italic_q end_ARG if KP,KD>0subscript𝐾Psubscript𝐾D0K_{\mathrm{P}},K_{\mathrm{D}}>0italic_K start_POSTSUBSCRIPT roman_P end_POSTSUBSCRIPT , italic_K start_POSTSUBSCRIPT roman_D end_POSTSUBSCRIPT > 0. An issue with this controller for our system is that, if it allowed to operate without constraint, it can damage the physical robot by attempting to push through contact points. This inspires the use of Control Barrier Functions in the following section to attenuate the controller near self-contact.

III-B CBFs for Safe Self-contact

To specify our CBFs, for each segment (in Fig. 1 there are two), we take the points of the top hexagonal plates of the segment using the PCC forward kinematics from Eq. (8). This gives the following function for each point:

cj(𝒒)=1θd(sin(θ)(L0,id+dδLirΔy,isin(ϕj)rΔx,icos(ϕj))),subscript𝑐𝑗𝒒1𝜃𝑑𝜃subscript𝐿0𝑖𝑑𝑑𝛿subscript𝐿𝑖𝑟subscriptΔy𝑖subscriptitalic-ϕ𝑗𝑟subscriptΔx𝑖subscriptitalic-ϕ𝑗c_{j}(\bm{q})=\frac{1}{\theta d}(\sin(\theta)(L_{0,i}d+d\delta L_{i}\\ -r\Delta_{\mathrm{y},i}\sin(\phi_{j})-r\Delta_{\mathrm{x},i}\cos(\phi_{j}))),start_ROW start_CELL italic_c start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ( bold_italic_q ) = divide start_ARG 1 end_ARG start_ARG italic_θ italic_d end_ARG ( roman_sin ( italic_θ ) ( italic_L start_POSTSUBSCRIPT 0 , italic_i end_POSTSUBSCRIPT italic_d + italic_d italic_δ italic_L start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL - italic_r roman_Δ start_POSTSUBSCRIPT roman_y , italic_i end_POSTSUBSCRIPT roman_sin ( italic_ϕ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) - italic_r roman_Δ start_POSTSUBSCRIPT roman_x , italic_i end_POSTSUBSCRIPT roman_cos ( italic_ϕ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) ) ) , end_CELL end_ROW (17)

where L0,isubscript𝐿0𝑖L_{0,i}italic_L start_POSTSUBSCRIPT 0 , italic_i end_POSTSUBSCRIPT is the uncompressed length of a segment, ϕjsubscriptitalic-ϕ𝑗\phi_{j}italic_ϕ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT is the angle of the corner of the plate relative to the x-axis (shown in Fig. 2), d𝑑ditalic_d is the distance from the center of the segment to the cable routes, and r𝑟ritalic_r is the distance from a corner of the hexagon plate to the center of the segment. For these last two quantities, in our case, d=r𝑑𝑟d=ritalic_d = italic_r. See Fig. 2 for an illustration of some of these. The quantity cjsubscript𝑐𝑗c_{j}italic_c start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT is useful for our purposes because when cj>ϵsubscript𝑐𝑗italic-ϵc_{j}>\epsilonitalic_c start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT > italic_ϵ, where ϵitalic-ϵ\epsilonitalic_ϵ is some positive constant (a good choice is corresponding to the thickness of the plates), the plates are not in contact and they make contact as cjϵ0subscript𝑐𝑗italic-ϵ0c_{j}-\epsilon\rightarrow 0italic_c start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT - italic_ϵ → 0.

Refer to caption
Figure 2: Illustration of some key quantities for the robot. The six red dots corresponding to the corners of the plate are used as our CBFs by deriving the forward kinematics of each point. The quantity d𝑑ditalic_d represents the distance to these corners, ϕitalic-ϕ\phiitalic_ϕ represents the angle of rotation for the vector pointing to each corner from the center.

Our barrier functions will then take the form,

bj(𝒒)=cj(𝒒)ϵj,subscript𝑏𝑗𝒒subscript𝑐𝑗𝒒subscriptitalic-ϵ𝑗b_{j}(\bm{q})=c_{j}(\bm{q})-\epsilon_{j},italic_b start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ( bold_italic_q ) = italic_c start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ( bold_italic_q ) - italic_ϵ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT , (18)

where ϵj>0subscriptitalic-ϵ𝑗0\epsilon_{j}>0italic_ϵ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT > 0 is a parameter to specify the distance from contact that the safety constraint should be enforced. To calculate our CBF (15), we also need to calculate the Jacobian of (18), which in this case is simply

Jj(𝒒)=cj(𝒒)𝒒.subscript𝐽𝑗𝒒subscript𝑐𝑗𝒒𝒒J_{j}(\bm{q})=\frac{\partial c_{j}(\bm{q})}{\partial\bm{q}}.italic_J start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ( bold_italic_q ) = divide start_ARG ∂ italic_c start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ( bold_italic_q ) end_ARG start_ARG ∂ bold_italic_q end_ARG . (19)

We omit inclusion of the explicit solution of the Jacobians due to their length, but they are easily calculated using a symbolic computing package. The time derivatives of the Jacobians, J˙jsubscript˙𝐽𝑗\dot{J}_{j}over˙ start_ARG italic_J end_ARG start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT, are similarly calculated. We can then form matrices by stacking the safety constraints and their Jacobians, b(𝒒)=[b1,,bN]T𝑏𝒒superscriptsubscript𝑏1subscript𝑏𝑁𝑇b(\bm{q})=[b_{1},...,b_{N}]^{T}italic_b ( bold_italic_q ) = [ italic_b start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_b start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT, J(𝒒)=[J1,,JN]T𝐽𝒒superscriptsubscript𝐽1subscript𝐽𝑁𝑇J(\bm{q})=[J_{1},...,J_{N}]^{T}italic_J ( bold_italic_q ) = [ italic_J start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_J start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT, J˙(𝒒)=[J˙1,,J˙N]T˙𝐽𝒒superscriptsubscript˙𝐽1subscript˙𝐽𝑁𝑇\dot{J}(\bm{q})=[\dot{J}_{1},...,\dot{J}_{N}]^{T}over˙ start_ARG italic_J end_ARG ( bold_italic_q ) = [ over˙ start_ARG italic_J end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , over˙ start_ARG italic_J end_ARG start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT, where N𝑁Nitalic_N is the number of constraints. Note that b𝑏bitalic_b, J𝐽Jitalic_J, and J˙˙𝐽\dot{J}over˙ start_ARG italic_J end_ARG all have limits that are well defined as θ0𝜃0\theta\rightarrow 0italic_θ → 0 (straight configuration). Along with the dynamic quantities from (9), we now have everything we need to calculate our CBF according to (15). All that is left is to encapsulate our nominal controller and CBF into a quadratic program as follows:

min𝝉subscript𝝉\displaystyle\min_{\bm{\tau}}roman_min start_POSTSUBSCRIPT bold_italic_τ end_POSTSUBSCRIPT 12𝝉𝝉nom212superscriptnorm𝝉subscript𝝉nom2\displaystyle\frac{1}{2}||\bm{\tau}-\bm{\tau}_{\mathrm{nom}}||^{2}divide start_ARG 1 end_ARG start_ARG 2 end_ARG | | bold_italic_τ - bold_italic_τ start_POSTSUBSCRIPT roman_nom end_POSTSUBSCRIPT | | start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT (20)
s.t. Safety (HOCBF) Constraint (15).

IV Simulation Results

Refer to caption
Figure 3: Results in Simulation. a) Shows the generalized coordinates (solid lines) and set points (dashed lines) for a two segment simulated soft-rigid manipulator. b) Output torques from QP (20). c) Safety constraint values during the simulation. Note that there are 6 safety constraint functions (18) per segment for a total of 12 (lines corresponding to the first and second segment are solid and dashed respectively).

We implement the previously discussed safety constraints in a simulation to control the dynamics (9) for a two link soft-rigid hybrid manipulator. The simulator is written in Julia and we compute the mass and coriolis matrices using Featherstone’s algorithms [23]. Elasticity and dam** are taken to be linear. We forward integrate the closed loop system using the DifferentialEquations package [24], and we solve QP (20) using the Convex package [25]. For both packages, the default solvers proved to be adequate for our needs.

Parameters are set to L0=0.1msubscript𝐿00.1mL_{0}=0.1\mathrm{m}italic_L start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT = 0.1 roman_m, d=0.04m𝑑0.04md=0.04\mathrm{m}italic_d = 0.04 roman_m, r=0.05m𝑟0.05mr=0.05\mathrm{m}italic_r = 0.05 roman_m, bending stiffness κθ=10Nmradsubscript𝜅𝜃10Nmrad\kappa_{\theta}=10\mathrm{\frac{Nm}{rad}}italic_κ start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT = 10 divide start_ARG roman_Nm end_ARG start_ARG roman_rad end_ARG, axial stiffness κL=10Nmsubscript𝜅𝐿10Nm\kappa_{L}=10\mathrm{\frac{N}{m}}italic_κ start_POSTSUBSCRIPT italic_L end_POSTSUBSCRIPT = 10 divide start_ARG roman_N end_ARG start_ARG roman_m end_ARG, bending dam** βθ=5Nmsradsubscript𝛽𝜃5Nmsrad\beta_{\theta}=5\mathrm{\frac{Nms}{rad}}italic_β start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT = 5 divide start_ARG roman_Nms end_ARG start_ARG roman_rad end_ARG, axial dam** βL=5Nsmsubscript𝛽𝐿5Nsm\beta_{L}=5\mathrm{\frac{Ns}{m}}italic_β start_POSTSUBSCRIPT italic_L end_POSTSUBSCRIPT = 5 divide start_ARG roman_Ns end_ARG start_ARG roman_m end_ARG, and module mass mj=0.15kgsubscript𝑚𝑗0.15kgm_{j}=0.15\mathrm{kg}italic_m start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT = 0.15 roman_kg. PD gains are set to KP=5subscript𝐾P5K_{\mathrm{P}}=5italic_K start_POSTSUBSCRIPT roman_P end_POSTSUBSCRIPT = 5 and KD=1subscript𝐾D1K_{\mathrm{D}}=1italic_K start_POSTSUBSCRIPT roman_D end_POSTSUBSCRIPT = 1 and ϵj=0.005msubscriptitalic-ϵ𝑗0.005m\epsilon_{j}=0.005\mathrm{m}italic_ϵ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT = 0.005 roman_m for all barrier functions. We simulate from initial conditions (𝒒,𝒒˙)=(𝟎,𝟎)𝒒bold-˙𝒒00(\bm{q},\bm{\dot{q}})=(\mathbf{0},\mathbf{0})( bold_italic_q , overbold_˙ start_ARG bold_italic_q end_ARG ) = ( bold_0 , bold_0 ) and attempt to reach a set point 𝒒¯=[0.08,0.0,0.05,0.0,0.06,0.07]Tbold-¯𝒒superscript0.080.00.050.00.060.07𝑇\bm{\overline{q}}=[0.08,0.0,-0.05,0.0,-0.06,-0.07]^{T}overbold_¯ start_ARG bold_italic_q end_ARG = [ 0.08 , 0.0 , - 0.05 , 0.0 , - 0.06 , - 0.07 ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT.

Results are shown in Fig. 3. We note that, as is evident from Fig. 3a, the desired set point is not possible without moving through the contact. This can be seen by observing Fig. 3c, where some safety constraint functions reach zero, but are kept from crossing the boundary due to the invariant property of CBFs. Because the CBF prevents the safety constraints from drop** below zero, it necessarily prevents states from converging to set points when doing so would counteract the safety constraint [13], appearing in Fig. 3a as high errors for the regulator.

V Hardware Results

Refer to caption
Figure 4: Plots for experiments on hardware. a) Generalized coordinates and set points for two segment manipulator controlled with a CBF. b) Commanded generalized forces from Eq. (20). c) Safety constraint values during an experiment. Note that there are 6 functions per segment for a total of 12. Note that the barrier functions are prevented from drop** below zero. d) Generalized coordinates and set points for two segment manipulator controlled with PD+. e) Commanded generalized forces from Eq. (16). f) Safety constraints (which are not actually enforced by the nominal controller and thus are allowed to be violated).
Refer to caption
Figure 5: Top: snapshots from trials controlled by QP (20). Bottom: snapshots from PD+ controlled trial
Refer to caption
Figure 6: Zoomed in images from the end of the two experiments of Fig. 5 to highlight the physical difference in convergence.

We use the hardware shown in Fig. 1 to validate our approach. The hardware consists of Dynamixel servo motors that actuate cables to bend and compress the PCC segments. We interface with the Dynamixels via the serial port in a Python script. To speed up the code, we calculate the mass matrix, Coriolis matrix, Jacobians, and Jacobian time derivatives using a C program that is called from Python. The QP is solved using the Python CVXPY module [26, 27]. Finally, the decision variables output by our QP are generalized forces acting on our state variables and need to be transformed such that they take the form of cable tensions. We do this using the transformation from [21], along with another simple transformation to account for the fact that we have three cables.

To identify the parameters of our hardware, we measure those that are readily measurable (mass, geometric properties), measure stiffness using simple feedforward experiments, and use a least squares method to identify dam** and (linear) actuator gain parameters as in [7, 28]. For our barrier functions, ϵj=0.005msubscriptitalic-ϵ𝑗0.005m\epsilon_{j}=0.005\mathrm{m}italic_ϵ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT = 0.005 roman_m for all safety constraints.

Our code runs at 33Hz33Hz33\mathrm{Hz}33 roman_H roman_z, with the main bottleneck being the motor communication (see e.g. [29]). We begin at rest and attempt to reach a set point 𝒒¯=[0.0,0.0,0.15,0.0,0.065,0.0]Tbold-¯𝒒superscript0.00.00.150.00.0650.0𝑇\bm{\overline{q}}=[0.0,0.0,-0.15,0.0,-0.065,0.0]^{T}overbold_¯ start_ARG bold_italic_q end_ARG = [ 0.0 , 0.0 , - 0.15 , 0.0 , - 0.065 , 0.0 ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT, which significantly violates the specified barrier for both modules. Results are shown in Fig. 4. The plots on the the left, Fig. 4a-c, depict a single trial for which the CBFs are active, while those on the right, Fig. 4d-e, depict a trial with the CBFs inactive. First, in Fig. 4a, note that the set points for δL1𝛿subscript𝐿1\delta L_{1}italic_δ italic_L start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and Δy,2subscriptΔ𝑦2\Delta_{y,2}roman_Δ start_POSTSUBSCRIPT italic_y , 2 end_POSTSUBSCRIPT are not achieved by the controller. To see why, we can observe the safety constraints in 4c are prevented from drop** below zero, implying that the CBFs were engaged. In Fig. 4d, we can see that Δy,2subscriptΔ𝑦2\Delta_{y,2}roman_Δ start_POSTSUBSCRIPT italic_y , 2 end_POSTSUBSCRIPT is able to reach the set point while δL1𝛿subscript𝐿1\delta L_{1}italic_δ italic_L start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT reaches the limit of the platform. For both modules, Fig. 4c shows that the safety constraints are violated (drop below zero). Application of the CBF also results in a roughly 50% difference in actuator output at steady state, as can be observed from comparing Fig. 4b and e. We show snapshots of each trial in Fig. 5. The last snapshots from each are enlarged in Fig. 6, and it is visually evident from the gaps between the plates, or lack thereof, that the case using our CBF method is able to attenuate the controller before the contact, whereas the PD+ controller obviously does not have this capability.

VI Discussion and Conclusion

To the best of our knowledge, we have demonstrated the first use of Control Barrier Functions for an application in soft robotics modeled by the Piecewise Constant Curvature kinematic assumption. Specifically, we have shown that incorporating a CBF into a strategy for controlling serial soft-rigid hybrid robots is an effective strategy for regulating self contact. We derived a general CBF for a broad class of constraints on the soft robot - namely, those constraints that can be written as functions of some kinematic quantity of the robot. For our specific case of regulating self-contact, we used the CBFs to attenuate a nominal PD-style controller and implemented the solution in simulation and on hardware. Both our general approach and the specific result can easily be applied to any nominal controller, for example task space controllers [30, 7]. In future work, we will explore this approach for a broader array of systems, safety constraints, and applications.

A potential issue with this control approach is that it essentially sacrifices the nice stability property of the nominal controller when the CBF is active. The common way to deal with this is to incorporate a Control Lyapunov Function (CLF) as well, but these competing constraints may be in conflict, resulting in an infeasible QP. [31] provides an interesting solution to this problem using a passivity constraint, which would be interesting to implement in future work.

Finally, an open question is whether CBFs can regulate robot-environment interactions. After all, the purported point of soft robots is to allow them to make frequent, inherently safe contact with the environment. It remains to be seen whether CBFs can be used for this purpose for soft robots and this will be a topic of future work.

In conclusion, we demonstrated a Control Barrier Function workflow for regulating self contact for serial soft-rigid hybrid systems. We derived barrier functions of second degree for a Piecewise Constant Curvature system and used them in a QP based framework for effective control both in simulation and on hardware.

Acknowledgment

This work was done with the support of National Science Foundation EFRI program under grant number 1830901 and the Gwangju Institute of Science and Technology.

References

  • [1] J. M. Bern, F. Zargarbashi, A. Zhang, J. Hughes, and D. Rus, “Simulation and Fabrication of Soft Robots with Embedded Skeletons,” in 2022 International Conference on Robotics and Automation (ICRA), May 2022, pp. 5205–5211.
  • [2] W. Zhu, C. Lu, Q. Zheng, Z. Fang, H. Che, K. Tang, M. Zhu, S. Liu, and Z. Wang, “A Soft-Rigid Hybrid Gripper With Lateral Compliance and Dexterous In-Hand Manipulation,” IEEE/ASME Transactions on Mechatronics, vol. 28, no. 1, pp. 104–115, Feb. 2023.
  • [3] E. Coevoet, Y. Adagolodjo, M. Lin, C. Duriez, and F. Ficuciello, “Planning of Soft-Rigid Hybrid Arms in Contact With Compliant Environment: Application to the Transrectal Biopsy of the Prostate,” IEEE Robotics and Automation Letters, vol. 7, no. 2, pp. 4853–4860, Apr. 2022.
  • [4] J. Zhang, T. Wang, J. Wang, M. Y. Wang, B. Li, J. X. Zhang, and J. Hong, “Geometric Confined Pneumatic Soft–Rigid Hybrid Actuators,” Soft Robotics, vol. 7, no. 5, pp. 574–582, Oct. 2020.
  • [5] C. Della Santina, C. Duriez, and D. Rus, “Model-Based Control of Soft Robots: A Survey of the State of the Art and Open Challenges,” IEEE Control Systems Magazine, vol. 43, no. 3, pp. 30–65, Jun. 2023.
  • [6] Z. J. Patterson, A. P. Sabelhaus, and C. Majidi, “Robust Control of a Multi-Axis Shape Memory Alloy-Driven Soft Manipulator,” IEEE Robotics and Automation Letters, vol. 7, no. 2, pp. 2210–2217, Apr. 2022.
  • [7] C. Della Santina, R. K. Katzschmann, A. Bicchi, and D. Rus, “Model-based dynamic feedback control of a planar soft robot: Trajectory tracking and interaction with the environment,” The International Journal of Robotics Research, vol. 39, no. 4, pp. 490–513, Mar. 2020.
  • [8] C. Della Santina, M. Bianchi, G. Grioli, F. Angelini, M. Catalano, M. Garabini, and A. Bicchi, “Controlling Soft Robots: Balancing Feedback and Feedforward Elements,” IEEE Robotics & Automation Magazine, vol. 24, no. 3, pp. 75–83, Sep. 2017.
  • [9] ——, “Controlling soft robots: balancing feedback and feedforward elements,” IEEE Robotics & Automation Magazine, vol. 24, no. 3, pp. 75–83, 2017.
  • [10] K. P. Tee, S. S. Ge, and E. H. Tay, “Barrier lyapunov functions for the control of output-constrained nonlinear systems,” Automatica, vol. 45, no. 4, pp. 918–927, 2009.
  • [11] P. Wieland and F. Allgower, “Constructive safety using control barrier functions,” in Proc. of 7th IFAC Symposium on Nonlinear Control System, 2007.
  • [12] S. P. Boyd and L. Vandenberghe, Convex optimization.   New York: Cambridge university press, 2004.
  • [13] A. D. Ames, J. W. Grizzle, and P. Tabuada, “Control barrier function based quadratic programs with application to adaptive cruise control,” in Proc. of 53rd IEEE Conference on Decision and Control, 2014, pp. 6271–6278.
  • [14] P. Glotfelter, J. Cortes, and M. Egerstedt, “Nonsmooth barrier functions with applications to multi-robot systems,” IEEE control systems letters, vol. 1, no. 2, pp. 310–315, 2017.
  • [15] W. Xiao and C. Belta, “Control barrier functions for systems with high relative degree,” in Proc. of 58th IEEE Conference on Decision and Control, Nice, France, 2019, pp. 474–479.
  • [16] C. Khazoom, D. Gonzalez-Diaz, Y. Ding, and S. Kim, “Humanoid Self-Collision Avoidance Using Whole-Body Control with Control Barrier Functions,” in 2022 IEEE-RAS 21st International Conference on Humanoid Robots (Humanoids), Nov. 2022, pp. 558–565.
  • [17] H. K. Khalil, Nonlinear Systems.   Prentice Hall, third edition, 2002.
  • [18] W. Xiao, C. G. Cassandras, and C. Belta, Safe Autonomy with Control Barrier Functions: Theory and Applications.   Springer Nature, 2023.
  • [19] J. M. Bern, L. Z. Yañez, E. Sologuren, and D. Rus, “Contact-Rich Soft-Rigid Robots Inspired by Push Puppets,” in 2022 IEEE 5th International Conference on Soft Robotics (RoboSoft), Apr. 2022, pp. 607–613.
  • [20] R. J. Webster and B. A. Jones, “Design and Kinematic Modeling of Constant Curvature Continuum Robots: A Review,” The International Journal of Robotics Research, vol. 29, no. 13, pp. 1661–1683, Nov. 2010.
  • [21] C. Della Santina, A. Bicchi, and D. Rus, “On an Improved State Parametrization for Soft Robots With Piecewise Constant Curvature and Its Use in Model Based Control,” IEEE Robotics and Automation Letters, vol. 5, no. 2, pp. 1001–1008, Apr. 2020.
  • [22] C. Della Santina, R. K. Katzschmann, A. Bicchi, and D. Rus, “Model-based dynamic feedback control of a planar soft robot: Trajectory tracking and interaction with the environment,” The International Journal of Robotics Research, vol. 39, no. 4, pp. 490–513, Mar. 2020.
  • [23] R. Featherstone, Rigid body dynamics algorithms.   Springer, 2014.
  • [24] C. Rackauckas and Q. Nie, “DifferentialEquations.jl–a performant and feature-rich ecosystem for solving differential equations in Julia,” Journal of Open Research Software, vol. 5, no. 1, 2017.
  • [25] M. Udell, K. Mohan, D. Zeng, J. Hong, S. Diamond, and S. Boyd, “Convex optimization in Julia,” SC14 Workshop on High Performance Technical Computing in Dynamic Languages, 2014.
  • [26] S. Diamond and S. Boyd, “CVXPY: A Python-embedded modeling language for convex optimization,” Journal of Machine Learning Research, vol. 17, no. 83, pp. 1–5, 2016.
  • [27] A. Agrawal, R. Verschueren, S. Diamond, and S. Boyd, “A rewriting system for convex optimization problems,” Journal of Control and Decision, vol. 5, no. 1, pp. 42–60, 2018.
  • [28] L. Ljung, “System identification,” in Signal Analysis and Prediction.   Springer, 1998, pp. 163–173.
  • [29] M. Bestmann, J. Güldenstein, and J. Zhang, “High-frequency multi bus servo and sensor communication using the dynamixel protocol,” in RoboCup 2019: Robot World Cup XXIII 23.   Springer, 2019, pp. 16–29.
  • [30] O. Khatib, “A unified approach for motion and force control of robot manipulators: The operational space formulation,” IEEE Journal on Robotics and Automation, vol. 3, no. 1, pp. 43–53, Feb. 1987.
  • [31] V. Kurtz, P. M. Wensing, and H. Lin, “Control Barrier Functions for Singularity Avoidance in Passivity-Based Manipulator Control,” in 2021 60th IEEE Conference on Decision and Control (CDC), Dec. 2021, pp. 6125–6130.