{'fraction_non_alphanumeric': 0.03140282557507698, 'fraction_numerical': 0.010867596449918493, 'mean_word_length': 4.667778775824458, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Adaptive robot climbing with magnetic feet in unknown slippery structure

Firm foot contact is the top priority of climbing robots to avoid catastrophic events, especially when working at height. This study proposes a robust planning and control framework for climbing robots that provides robustness to slippage in unknown environments. The framework includes 1) a center of mass (CoM) trajectory optimization under the estimated contact condition, 2) Kalman filter–like approach for uncertain environment parameter estimation and subsequent CoM trajectory re-planing, and 3) an online weight adaptation approach for whole-body control (WBC) framework that can adjust the ground reaction force (GRF) distribution in real time. Though the friction and adhesion characteristics are often assumed to be known, the presence of several factors that lead to a reduction in adhesion may cause critical problems for climbing robots. To address this issue safely and effectively, this study suggests estimating unknown contact parameters in real time and using the evaluated contact information to optimize climbing motion. Since slippage is a crucial behavior and requires instant recovery, the computation time for motion re-planning is also critical. The proposed CoM trajectory optimization algorithm achieved state-of-art fast computation via trajectory parameterization with several reasonable assumptions and linear algebra tricks. Last, an online weight adaptation approach is presented in the study to stabilize slippery motions within the WBC framework. This can help a robot to manage the slippage at the very last control step by redistributing the desired GRF. In order to verify the effectiveness of our method, we have tested our algorithm and provided benchmarks in simulation using a magnetic-legged climbing robot Manegto.


Introduction
Climbing robots can keep humans away from dangerous tasks such as inspection of vertical structures. Various types of climbing robots are developed with different adhesion modalities: suction Tummala et al. (2002), biologically inspired adhesion, for example, micro-splines Spenko et al. (2008); Parness et al. (2017) and micro-fibrillar Kim et al. (2007). Magnetic adhesion is predominant in industry Jose et al. (2018), for maintenance and inspection purposes of ferromagnetic surfaces. Robots with wheels Tavakoli et al. (2013); Eich and Vögele (2011) and continuous tracks Kermorgant (2018) are often used with magnetic adhesion but these robots have difficulties in traversing complex 3D structure. Legged platforms, on the other hand, offer greater mobility given their ability to execute discontinuous contact transition Bandyopadhyay et al. (2018). However, these benefits are achieved at the cost of increased complexity requiring great intelligence to control a robot over the unstructured ground.
1.1 What do we need to concern about for climbing behaviors?
Most current studies on climbing robots focused on their design and mechanism and only a few studies have been conducted on dynamic robot climbing behavior. Several studies propose to utilize biologically inspired templates to generate climbing motions Brown et al. (2018), Lynch et al. (2012), but their implementations are limited to certain behavior and do not consider any constraint regarding safe holdings that should be guaranteed for stable climbing. Motion planning and control have also been studied for free-climbing Bretl (2006); Miller and Rock (2008) and vertical wall climbing Lin et al. (2019); Lin et al. (2018). However, most works are also limited since the problems are formulated quasi-static to avoid computational complexity.
Apparently, the climbing and walking behavior of legged robots share a common mechanism: multi-contact transition to relocate their footholds to the proper position. It is more challenging for climbing robots as they need to hold onto an inclined surface while lifting their entire mass. Besides, given that most climbing robots are developed to inspect in an unknown environment, assumed adhesion and friction quality can often be different from the real values. Therefore, the need for a method to avoid falling and deal with unexpected slippage cannot be overemphasized especially for climbing robots.
1.2 How can we deal with slippage using robot control?
A combination of walking pattern parameter adaptation (long-term strategy) and force control (short-term strategy) to compensate for slippages is effective for robots walking on a slippery ground Takemura et al. (2005). However, predefined walking pattern adaptation can recover only from the limited amount of slippage. Instead, the idea to handle slip force as disturbance acting on a robot is suggested by Kaneko et al. (2005). A humanoid can avoid falling by estimating slip force via observer and compensating for the reactive motion caused by slip force. Focchi et al. (2018); Jenelten et al. (2019) proposed slip detection and recovery mechanism for quadruped robots developed to be employed in a WBC framework. However, both methods can still fail to recover from traction loss without proper centroidal motion re-planning to generate required GRFs to keep contact firm.

Centroidal trajectory optimization
This study proposes to re-plan CoM motion via trajectory optimization to address the above limitations. Generating the proper CoM motion plays a critical role in vertical climbing Brown et al. (2018), though most studies achieve it via biologically inspired motion pattern. Trajectory optimization with centroidal dynamics is becoming popular in locomotion community Orin et al. (2013); Kim et al. (2019); Carpentier and Mansard (2018); Dai et al. (2014) due to its availability to handle friction condition simpler than solving full-body dynamics. Given the estimated adhesion force and friction coefficient, we can help a robot remain firm in contact by generating proper CoM motion. For example, by decelerating CoM in the gravity direction or normal to surface direction, we can relatively increase the normal contact force and reduce the tangential friction force at poor contact.
One well-known strategy to simplify centroidal dynamics optimization is the convexification of the system Ponton et al. (2018). By approximating non-convex quadratic constraint in a discrete-time system, it can obtain optimal CoM trajectory given multi-contact scenarios in 1 s for around 100 time steps. Another effective way to achieve fast computation is parameterization. Winkler et al. (2018); Ahn et al. (2021) leveraged phase-based parameterization to simplify trajectory description. Then, they formulate the problem to automatically determine the gait sequence, step timings, footholds, and swing-leg motions by solving nonlinear optimization in a discrete-time system. Though they provide the more generic form, the problem remains nonconvex, and thus it takes about 4 s to be solved. Fernbach et al. (2020) utilized both parameterization and convexification via Bezier curves. However, since the whole trajectory over the multi-contact sequence is determined by one 3d vector decision variable, the generated motion could be limited. Also, the double description (DD) method is known to be unstable means to compute the linear constraints, which can be critical in robotics.
The proposed centroidal trajectory optimization leverages phase-based parameterization and several assumptions are applied to convexify the problem. Also, we showed that inequality constraints hold over the entire time horizon if it holds at the boundary of the function. Reduced dimension of constraints compared to that of the discrete-time domain provides faster computation. As a result, the proposed CoM trajectory optimization algorithm achieves a state-of-the-art fast computation simultaneously with an online contact parameter estimation algorithm to update the CoM trajectory immediately. redundant robots like legged robots Khatib et al. (2004). A multilevel hierarchical control structure can be established via torque-based whole-body control, which allows humanoid robots to interact with the environment Sentis et al. (2010) compliantly. Optimization-based approaches have been popular for its ability to incorporate inequality constraints addressed within full-body dynamics Escande et al. (2014);Feng et al. (2015); Kim et al. (2020). Task hierarchy can be formulated as hierarchical least-square quadratic problems Escande et al. (2014); Bellicoso et al. (2016), but also can be considered via weighted cost terms in a single quadratic program Feng et al. (2015); Wiedebach et al. (2016). Even though weighted QP formulation can reduce the number of optimization problems to be solved, heuristically determined weights can violate the priority.
Whole-body locomotion controller (WBLC) leveraged a projection-based approach to consider equality task hierarchy and a QP formulation to find the command satisfying inequality constraints and full-body dynamics Kim et al. (2020). WBLC has successfully demonstrated dynamic locomotion of passive ankled robots. However, heuristic weights in QP formulation can violate the task hierarchy considered in task-priority projection-based inverse kinematics, especially when external disturbances or uncertainties exist in the environment. Lee et al. (2021) proposes a feedback gain adaptation method to stabilize external disturbances in WBLC based on the stability analysis. In this study, we suggest online weight adaption in QP formulation to address uncertainties, especially those that cause slippage. By regulating weights regarding reaction force depending on the slip level, we can enforce QP to find the command robust to the slippage.

Contribution
We summarize the contributions of this study as follows: • We devise a state-of-the-art fast CoM trajectory optimization, which can be solved in 50 μs for one-step climbing motion. By using phase-based parameterization and several assumptions to convexify the centroidal dynamics, the problem to determine CoM trajectory while satisfying the friction and adhesion condition during the swing phase can be solved about two orders of magnitude faster than other existing methods. • We propose a Kalman filter-like approach for estimating unknown friction coefficient and (magnetic) adhesion force at slippery contact. Based on the contact force measurement, we linearize the observation model and formulate the system propagating itself to apply Kalman filter algorithm. This can be used in combination with our state-of-the-art fast algorithm to re-plan CoM trajectory to generate an instant slip recovery motion.
• We provide an online weight adaptation approach to be used in a QP-based WBC framework to stabilize the slippage instantly. We increase the normal contact force and decrease the tangential force by regulating the weights for ground reaction force with respect to the slippage rate.
Altogether, our main contribution is an integrated framework that provides planning and control strategies for robot climbing robust to the unknown environment. The proposed CoM trajectory optimization can be solved in real time allowing instant and effective slippage recovery. In combination with an online weight adaptation, the framework yields the best results in dealing with unknown slippery condition.

Organization of the article
This article is structured as follows: • Problem definition (Section 2): This section introduces the robot climbing problem. An overview of our problem solving is also described in this section with the summary of WBLC as preliminary studies for the proposed framework. • Multi-contact CoM trajectory generation for climbing (Section 3): This section describes the proposed CoM trajectory optimization method. Details are addressed from parameterization to approximations and applied linear algebra tricks step by step. • Contact parameter estimation and CoM re-planning (Section 4): This section develops a slip reflex strategy when the slippage occurs. The overall procedure can be described as follows: 1) Friction coefficient and adhesion force in slippery contacts are estimated via either solving the least-square problem or the Kalman filter-like approach. 2) Given the re-evaluated friction coefficient and adhesion force, CoM re-planning is performed through the revised CoM trajectory optimization described in Section 3 to satisfy the new constraints. • Online weight adaptation to stabilize slippery motions (Section 5): This section provides an online weight adaptation method that can be used in QP-based WBC.
Defining the slippage rate that determines how the slip is severe, the weights can be adjusted to reduce slip behaviors. • Experimental validation (Section 6): This section shows the performance of the proposed method via simulation experiment using a magnetic legged climbing robot Manegto. We have tested our algorithm and provided benchmarks. Several multi-contact scenarios including the different shapes of the climbing structure and various settings of the contact environment were used for the test.

Problem definition
In this study, we are aiming to solve a one-step climbing problem that can be described as follows: given the initial configuration of a robot in static equilibrium and given the next foot placement, the desired CoM position can be calculated-we chose the position close to the initial configuration and far from singularity-and we want to generate optimal trajectories for climbing and design the control laws robust to the environment uncertainties, especially the slip phenomenon. Figure 1 shows an overview of the proposed control architecture. This framework is developed based on a whole-body locomotion controller (WBLC) Kim et al. (2020), which takes prioritized tasks as an input and outputs torque command with desired joint position and velocity commands at the instant time horizon. Usually, tasks prioritized in the following order are widely used in a legged robot: 1) maintaining rigid contact, 2) tracking CoM (centroidal) trajectory, 3) tracking swing foot trajectory, and 4) staying close to the initial configuration. Both CoM trajectory and swing foot trajectory are simply described as a straight line or parabola in most WBC works. However, since CoM trajectory can play an important role in generating required GRF in climbing motion, we propose to generate CoM motion via trajectory optimization. In addition, to deal with the slippage caused by the unknown environment, the estimation of adhesion force and friction coefficient is applied to the slipping contact. The re-evaluated parameters are updated in WBC that computes torque commands that satisfies friction constraints associated with the estimated friction coefficient and full-body dynamics affected by estimated magnetic adhesion. CoM replanning could be also needed to generate the GRF that lies in the associated friction cone. Finally, a slip-aware online weight adaptation approach is integrated to the work with quadratic programming (QP) formulation in WBC to stabilize slippery motion instantly.

Whole-body locomotion controller extended to climbing
In this section, we first review WBLC with an extended formulation for climbing robots, especially those that use magnetism for adhesion, for example, Magneto Bandyopadhyay et al. (2018). WBLC proposed in Kim et al. (2020) solves the WBC problem by two sequential blocks: a Kinematic-level WBC that considers task hierarchy in inverse kinematics via projection-based method and a Dynamic-level WBC to compute torque command that satisfies all the dynamics constraints by solving quadratic programming (QP).

Magnetic climbing dynamics
Magneto is developed to climb the wall using a switchable electromagnet attached to each foot. Each leg of Magneto consists of actuated joints for actuators and passive joints for gimbals. Given a configuration space Q ∈ R n and an input space U ∈ R na , the dynamics of a robot can be formulated as follows: where q ∈ Q, M(q) ∈ S n ++ , b(q, _ q) ∈ R n , and τ a ∈ U denote the joint vector, mass/inertia matrix, sum of Coriolis/centrifugal Frontiers in Robotics and AI frontiersin.org 04 force and gravitational forces, and actuator command, respectively. S a ∈ R n×na denotes the selection matrix indicating the index set of actuated joints, which maps τ a into the generalized forces. F c ∈ R 6nc is a vertically concatenated contact wrench vector, where n c is the number of contacts and the corresponding contact Jacobian is represented as J c (q) ∈ R 6nc×n . Similarly, magnetic force applied to the climbing robot for adhesion can be represented as a stacked wrench vector F m ∈ R 6nm and the corresponding Jacobian matrix J m (q) ∈ R 6nm×n , where n m is the number of activated magnetic mechanisms. In this study, we have assumed that both the contact forces and magnetic forces are applied at the center of each foot if and only if contact is made; thus, we have n c = n m and J c (q) = J m (q). Then the ground reaction force wrench can be represented as F r = F c + F m ; the sum of forces are applied to the contacts.

Kinematic level WBC
A kinematic level WBC computes the desired joint command q d ∈ R n given the tasks defined in hierarchy. Let J k (q) and x des k denote kth prioritized task Jacobian and the desired position. Then Δq k , the change of joint configuration related to the kth task iteration, can be obtained by the propagation below: where N k (q) and J k|k−1 represent kth task null-space projection and prioritized Jacobians. Then the desired joint position can be obtained by q d q + N k 1 Δq k in consideration of task priority.
can be obtained from the following propagation: (3)

Dynamic level WBC
A dynamic level WBC calculates the desired torque command and modified joint command that satisfies dynamic constraints based on the optimization framework. This can be achieved by solving QP formulated as follows: are weight matrices corresponding to the joint acceleration relation δ€ q ∈ R n , ground reaction force F r ∈ R 6nc , and contact acceleration € x c ∈ R 6nc . K p , K d ∈ S n + are feedback gains corresponding to the desired joint commands q d , _ q d , € q d ∈ R n obtained by Kinematic Level WBC, and U(μ) ∈ R 17nc×6nc represents diagonally stacked rectangular contact wrench cones (Caron et al., 2015) with respect to the contacts where the friction coefficients are μ [μ 1 , . . . , μ nc ] ⊤ . Note that all the force wrenches and corresponding Jacobians in the formulation are expressed from the local body frame. Finally, torque command limits are considered given the minimum and maximum torques of the actuators τ min , τ max . By solving the aforementioned QP, we can finally compute the low-level joint torque command that satisfies all the dynamics constraints given the prioritized task.

Phase-based state machine
Phase-based state machines are used together with WBLC to control a legged robot. We defined four state machines for onestep climbing control: full-support, pre-swing transition, swing, and post-swing transition. Each state machine represents a WBLC controller defined to consider different contact phases-e.g., different contact dimensions and weight parameters-so that the multi-contact climbing motion can be controlled by using the proper controller. The details can be found in Kim et al. (2020).

Multi-contact CoM trajectory generation for climbing
This planner can cooperate with the WBLC framework by providing the optimal CoM trajectory for climbing motion as the first prioritized task. Given the current configuration and the next desired contact location, we want to find a CoM trajectory for one step climbing motion, which satisfies constraints established under the estimated adhesion forces and friction coefficients.

Centroidal dynamics with magnetic force and friction cone constraints
In this study, we formulated the problem with respect to the centroidal dynamics of a robot, which is commonly used in the legged robotics community as an effective way to simplify the robot dynamics while considering the contact constraints. By solving the Newton-Euler equations on the center of mass (CoM) of a robot, as described in free body diagram in Figure 2 we can formulate the centroidal dynamics as follows: where m is the mass of the robot, g = [0,0,−9.81] ⊤ is the gravity vector, p G ∈ R 3 is the robot CoM position, and _ L ∈ R 3 is angular momentum. p i ∈ R 3 , R i ∈ SO(3) are the position and orientation of the ith foot expressed in the world frame, which are used to map contact force f c,i ∈ R 3 , and magnetic force f m,i ∈ R 3 is expressed from the local foot frame. Finally, we defined P c , R c ∈ R 3×3nc , P m , R m ∈ R 3×3nm , f c ∈ R 3nc , and f m ∈ R 3nm to simply describe the equation using the stacked matrix and vector form.
In order to describe the friction that resists relative lateral motion between two solid surfaces in contact, the linearized Coulomb friction model was used in this study. It approximately provides a threshold value for friction force parallel to the surface as a function of the normal force. Based on the model, we can formulate the inequality constraints on contact forces as follows:

Phase-based CoM trajectory parameterization
Legged motion is often represented as a sequence of contact phases. For instance, one step climbing motion for a quadruped can be described as the contact sequence of (1) full support/preswing (n c = 4) → (2) swing (n c = 3) → (3) full support/post-swing (n c = 4). In this study, we composed CoM trajectories for climbing considering the contact sequence using cubic Hermite spline, where each piece represents the pre-swing, swing, and post-swing phase sequentially, as shown in Figure 3. Then CoM trajectory can be parameterized as three pieces of cubic Hermite polynomial defined by its duration(T), the initial and goal position of each node (p i , p g ), and the velocities (v i , v g ). This phase-based parameterization also matches with our WBLC (whole-body locomotion controller) framework well. Based on four state machines defined within WBLC (full support-transition-swing-transition), given that we Frontiers in Robotics and AI frontiersin.org can consider the transition as a part of the adjacent full support phase, the parameterized trajectory can be used according to the corresponding state machine. However, we still need several assumptions to remove the nonconvexity of the problem caused by the cross product term p G × € p G . Del Prete et al. (2018) utilized the fact that the cross product of the parallel vectors is zero to solve the zero-step capturability problem. To be more specific, they assumed that the best strategy to stop CoM is to decelerate it in the direction CoM moves. Inspired by the strategy, we applied a similar assumption to our spline formulation. During the swing phase and post-swing phase, CoM moves along the straight line but accelerates in the opposite direction: € p swing G (t) αd, € p post swing G (t) βd, where α, β are constants with different signs and d is an unit vector indicating the direction of straight motion. Then given the initial and goal CoM position p a and p b , respectively, CoM trajectory parameterization for one step climbing can be summarized as Table 1.

Reformulation of centroidal dynamics based on spline parameterization
Now, we can reformulate the centroidal dynamics by substituting the parameterized CoM trajectory p HS (t; T, p i , p g , v i , v g ), summarized in Table 1 into Eqs 5, 6. Given that slippage is most likely to happen during (2) swing and (3) post-swing phase, we assumed that parameterized CoM motion that satisfies friction conditions during (2) swing and (3) post-swing phase will also satisfy friction conditions during (1) pre-swing phase. Last, we assumed that both magnetic force f m and contact force f c are applied at the center of each foot frame for Magneto only if the foot is in contact, that is, P c P m and R c R m in Eq. 5. Then we have the following: 2) Swing: where P s , R s ∈ R 3×9 represent the configuration matrices(P c , R c in Eq. 5) mapping the force vectors f c , f m ∈ R 9 during the swing phase. Finally, we denoted the coefficients of the obtained parameterized centroidal dynamics during the swing phase as A s ∈ R 6×9 , B sa (t), B sb (t) ∈ R 6×3 , c s ∈ R 6 , and the corresponding friction cone matrix as D s ∈ R 15×9 .
3) Post swing: where P f , R f ∈ R 3×12 represent the configuration matrices mapping the force vectors f c , f m ∈ R 12 during the post swing phase. A f ∈ R 6×12 , B f (t) ∈ R 6×3 , and c f ∈ R 6 are coefficients of the parameterized centroidal dynamics during the post-swing phase and D f ∈ R 20×12 is the corresponding friction cone matrix.

Problem solution for parameterized CoM trajectory generation
By applying parameterized CoM spline to the centroidal dynamics, the problem of determining CoM trajectory during one step climbing can be simplified as a problem to find α, β, d that satisfies Eqs 7-10. However, the problem is still non-linear since we have multiplication of variables, αd, βd in equation. Also, the different dimension of contact force vector (f c ) in (7, 8) and (9, 10) makes a problem hard to be solved. Along with the assumptions we made in the CoM trajectory parameterization, we need several more tricks to solve the problem.

Pre-determining the ratio of accelerations
First, we pre-determine γ α β , the ratio of the accelerations during the swing phase and the post swing phase. This way, we can linearize the problem by decoupling the constraint between αd and βd. We, specifically, chose γ that minimizes the maximum (1) Pre swing (2) Swing (3) Post swing Note that vectors are denoted by boldface letters to avoid confusion with scalar variables. Given knots values described in the table.
Frontiers in Robotics and AI frontiersin.org 07 distance between the CoM goal position and the trajectory over the swing phase. This limits the trajectory to have minimal movement.
Assuming γp ≠ 0 and solving for γ < 0, we get the following:

Contact force determination in centroidal dynamics
We took a simple solution for contact force in centroidal dynamics by mapping the weighted inverse of configuration matrix A s and A f . In the centroidal dynamics described in Eqs. 7, 9, given the rank of the equation is six and f c is either nine or 12, there is an infinite number of possible f c tracking the given CoM trajectory. One effective way to handle a set of inequalities and equates is using the double description method as Fernbach et al. (2020) reformulate the problem. This way, we can find all feasible solutions based on the numerical conversion between the convex hull description method, but at the same time, it is known to be sometimes computationally unstable, which can be problematic in robotics. Instead, we simply assumed that contact force can be easily obtained by mapping the weighted inverse matrix A −1 W −1 A ⊤ (AW −1 A ⊤ ) −1 to the dynamics. This method is quite reliable, and we can configure it to find the contact force as close to the center of the friction cone as possible by designing the weight matrix W considering the shape of friction cone D, where we provided the details in Appendix. Then by denoting x = βd and substituting f c A −1 f (B f (t)βd + c f ) and f c A −1 s ((B sa (t)γ p + B sb (t))βd + c s ) into each inequality equation, we have two linear matrix inequalities (LMI) for each phase.
By splitting the inverse matrix A −1 f , A −1 s into left and right column matrices and expressing B f (t), B sa (t), and B sb (t) as a function of t, Eqs (12) and (13) can be rewritten as follows:

Applying necessary and sufficient condition to satisfy inequality over the given time horizon
Proposition 1. Given an inequality (f(t)B 1 + B 2 )x + c ≥ 0 defined over a bounded function f min ≤ f(t) ≤ f max , ∀t ∈ (0, T), if an inequality holds at the boundary values (f min B 1 + B 2 )x + c ≥ 0 and The detailed proof of Proposition 1 is provided in Appendix. Based on Proposition 1, the problem to find x that satisfies inequalities along t can be reduced to the inequalities at the boundary of quadratic functions f f (t) (T 3 − t) 2 , t ∈ (0, T 3 ) and f s (t) γ*(T 2 − t) 2 + T 3 (T 3 + 2T 2 − t), t ∈ (0, T 2 ). Then by stacking inequalities for f min and f max , we finally obtained the condition for x = βd:

Parameterized CoM trajectory optimization
Given the predefined sequence of contact for one step climbing motion, we parameterized the CoM trajectory with three polynomials corresponding to each contact phase and found the sufficient condition for the parameters that satisfy the centroidal dynamics and linearized friction cone inequalities as described in Inequality 14. Based on parameterization and all the assumptions and tricks we apply to simplify the problem, the problem to determine CoM trajectory can be reduced to the quadratic programming for x as follows: where x βd ∈ R 3 , D x ∈ R 70×3 , and d x ∈ R 70 .

Contact parameter estimation and
CoM re-planning

Friction and magnetic adhesion force estimation
If we have an F/T sensor on the feet so that we can measure the reaction force at each contact, we can estimate the friction and magnetic adhesion force. Once the slippage is detected, then the frictional force can be formulated at the sliding foot as follows: Frontiers in Robotics and AI frontiersin.org where [f x , f y , f z ] ⊤ is the measured contact force represented in the local foot coordinate, f t ∈ R is the measured friction force which is equivalent to the tangential contact force, andf t ∈ R is the estimated friction force computed based on the normal contact force(f z ∈ R), the estimated friction coefficientμ ∈ R, and magnetic adhesion force (f m ∈ R). Let us define the parameter we want to estimate as θ [μ,μf m ] ⊤ and assume that we can access the T-period of time sampling data for the estimation. Then we can estimate the parameter by solving the least-square problem below: By solving the first order necessary condition (FONC), we get However, the least square estimation can be problematic if the contact is unstable. This can give inconsistent estimation value, which can be sometimes even unusable. In order to treat this issue, we propose the Kalman filter-like approach for estimating the friction coefficient and magnetic adhesion force. We first assumed that the system is propagating itself and has a T-period of time sampling ground reaction force data as observation. Also, we assumed that the measured normal force can be used as an observation model rather than observed data to simply linearize the model. This way, we can estimate the environment parameters more robust to the noise.
Though the formulated system is non-linear, given that the observation model H k is not a constant but a function of the observed data, we just considered it as a time-varying observation model to apply the Kalman filter algorithm. Then we have the following: (2) Swing (3) Post swing Frontiers in Robotics and AI frontiersin.org 09

CoM re-planning for slip reflex
When a robot climbs in an unknown environment, we can expect a robot to experience slip behavior when the uncertainty for a contact is high, for example, when the foot in contact was a swing foot in the previous step. If a slip is detected and the estimated friction coefficient and adhesion forces are significantly inferior, then we will need to re-plan the CoM trajectory for generating the desirable contact forces to keep rigid contact. The slip is supposed to be detected during the preswing or swing phase when the uncertainty for a contact is high. If slip is detected during the pre-swing phase, then the CoM trajectory optimization for re-planning will have the same formulation as the one solved in Section 3. The re-computed α, β, d for re-evaluatedμ,F m can be used to update CoM trajectory. The only difference is the initial position and velocity of the CoM set to zero in the previous problem will be substituted into the current position and velocity of CoM.

Revised CoM trajectory optimization algorithm for re-planning in the swing phase
The CoM re-planing problem can be defined as follows: given the current and the desired configuration; given the current and desired CoM position p a , p b ; and given the current and desired contacts configurationP s , P f , R s , R f , find the CoM trajectory that satisfies the new friction condition. Let t now be the time past since a robot started the swing phase, then we can re-parameterize the CoM trajectory for the remaining climbing motion as Table 2.
Then the centroidal dynamics during the swing and postswing phase can be rewritten as follows: 2) Swing: 3) Post swing: Then similar to the problem solving we described in Eq. 12 (15), we can reformulate the optimization problem for x = αd with D x ′ and d x ′ defined similar to D x and d x in Eq. 14 as follows: 5 Online weight adaptation to stabilize slippery motions In this section, we present an online weight adaptation approach to stabilize slippery motions by redistributing the contact force at each contact instantly. As discussed in the previous section, the final

Slippage rate for weight adaptation
In order to update weight gains according to the slippage rate in contact, we need a way to measure the rate of slippage. In this study, we defined the slippage rate based on slip velocity at each contact as follows: By defining the rate with the threshold, we can provide weight adaptation only if the slippage is large enough and the rate parameter itself is continuous as well.

Weight adaptation to the slippage
Based on the structure of WBLC, we formulated an extension version of WBLC for climbing in Section 2.2. Recalling that the cost function is designed to minimize the ground reaction force and tracking error: Let us say we have contact foot 1, 2, . . . , c. Then the corresponding slippage ratio and weight matrix can be described as follows: α s α s1 , . . . , α sc ( ) , W f diag w fx1 , w fy1 , w fz1 , . . . , w fxc , w fyc , w fzc .
Typically, we used predefined weight parameters in WBC and usually took w fxi , w fyi w xy and w fzi w z . Once we have foot in slippery contact, α si > 1, we can update the corresponding weight parameters based on the ratio online as follows:

Experimental validation
In this section, we focus on showing the performance of the proposed framework. In Section 6.1, we present how the proposed algorithm yields competitive performance against other CoM trajectory generation methods. Then, in Section 6.2, parameter estimation to identify unknown slippery condition is presented. Finally, in Section 6.4, we have demonstrated robot climbing behavior in unknown slippery conditions with and without the proposed strategies to evaluate the performance of the algorithms.

Comparison benchmarks of proposed CoM trajectory optimization
In order to show the performance of our CoM trajectory optimization, we choose to compare the computation time of the proposed algorithm with a state-of-the-art convexified formulation Ponton et al. (2018) and parameterized formulation (CROC) Fernbach et al. (2020). Generated CoM trajectory and corresponding ground reaction force distribution are also analyzed for comparison. The codes used in our benchmark modified for climbing is provided for CROC 1 and convexified centroidal optimization 2 , and for the proposed method 3 .
For these benchmarks, we have performed a climbing simulation in two different structures.
• The first structure described in Figure 4A is a flat slope inclined at α = 1 rad, where all the contacts of a robot are always on the same planar. One of the contacts is set particularly poor, where the environment parameter of the left bottom foot is set to μ s = 0.3 and f m = 30(N), while other feet are set to μ s = 0.5 and f m = 70(N). • The second structure described in Figure 4B is a hexagonal structure, which leads a robot to climb with a set of non-coplanar contacts. All the parameters that determine the contact quality are given the same for all feet as μ s = 0.5 and f m = 70(N).
In each structure, a robot is climbing up on a wall by moving its feet in the order of left bottom, right top, left top, and right bottom foot. All the benchmark simulations were run on Ubuntu 18.04.5 LTS with Processor Intel ® Core TM i7-8700K CPU @ 3.70GHz × 12, Memory 16 GB. QuadProg++ (Goldfarb and Idnani (1983)) were used to solve the QP problem in our software.
As described in Table 3, the computation time of the proposed algorithm is about 4~5 orders of magnitude faster than the convexified centroidal dynamics optimization method and two orders of magnitude faster than CROC. This result is natural considering that the dimension of convexified centroidal dynamics optimization is much larger because it solves the problem for the time discretization variables. On the other hand, parameterization can reduce the dimension of the problem effectively. Though CROC also uses parameterization, the double description (DD) method to handle inequality conditions in CROC takes a relatively long time. Instead, we utilized the weighted inverse matrices to determine contact forces in the centroidal dynamics equation, which helps us to find a reasonable solution two orders of magnitude faster. Furthermore, as the DD method is known to suffer from computational instability, which can cause a critical problem in robotics, the proposed solving method can be beneficial in terms of computation stability as well.
Not surprisingly, the trajectory obtained by different algorithms was different as shown in Figure 5. It is natural, considering that there are always an infinite number of trajectories that satisfy constraints in many trajectory optimization problems. One of the advantages we can take from parameterization is that we can expect a shape of the trajectory planning. This is important in robotics since unexpected plans can often cause a critical problem. In addition, the more variables the problem has, the more weight parameters we need to tune. In Ponton et al. (2018), the obtained trajectories were sensitive to the choice of weights, resulting in another difficulty in weight tuning. Finally, as we obtain the contact force placed as close as possible to the center of the friction cone, we can see the desired contact forces obtained by the proposed method tend to have more margin in inequalities.

Parameter estimation
As described in Section 4, unknown environment parameters μ and F m can be estimated based on the friction force model when The comparison of centroidal climbing motion obtained by different algorithms. One-step climbing motions for the right top foot are compared on two structures [(A) a flat slope at α = 1 rad and (B) a hexagonal structure]. The plots on the right show the corresponding desired GRF distribution on each foot with friction inequality constraints.
Frontiers in Robotics and AI frontiersin.org a slip occurs. Figure 6 shows the parameter estimation based on two different algorithms. Once the contact velocity exceeds the threshold, we prepare the parameter estimation, assuming that there is a slip. Though we assumed that we can detect the slippage by thresholding the contact velocity computed based on the floating base configuration, this cannot be achieved in the real Once the slip detection is triggered, we store the contact force data during 15 time samples. Then, we can estimate the unknown   Frontiers in Robotics and AI frontiersin.org 14 parameters θ [μ, μF m ] ⊤ that tell how slippery the surface is via either least-square estimation or Kalman filter-like approach. As you can see from Figure 6B, parameter estimation through the least-square estimation was not desirable; The observation of contact forces is too noisy even in simulation, and observation data captured during the traction loss doesn't match with the friction force model we used for estimation. On the other hand, Kalman filter-like approach worked well with a small value for model covariance Q k = diag([0.000004, 0.01]), and a relatively large value for observation covariance R k = 0.25. From the initial guess of parameters, you can see it converges in 30ms to the ground-truth value in Figure 6C.

Slip-aware online weight adaption for QP based WBC
In Section 5, we present an online weight adaptation for QPbased WBC framework. Figure 7 shows a part of motion suffering from sliding. It describes how the proposed algorithm shapes the corresponding weights based on the slip velocity and how it affects the corresponding ground reaction forces. Once the slip velocity exceeds the threshold, it starts to change the weights, and this can help a robot to slightly redistribute contact forces to stop sliding.

Climbing in unknown slippery condition
In Section 4 and Section 5, we proposed CoM trajectory replanning based on re-evaluated parameters and an online weight adaptation to stabilize a slip. Lastly, in this section, to verify the performance of the proposed control framework in terms of robustness to the unknown slippage, we examine the slip velocity of the foot in unknown slippery conditions with respect to the following 4 controllers: • WBLC without any adaptation, • WBLC with parameter estimation and CoM re-planning, • WBLC with an online weight adaptation, • WBLC with both methods.
In this simulation, the controller assumes the environment parameters for all feet to be μ = 0.5, F m = 50N, while the parameters of the left bottom foot are set to μ = 0.3, F m = 20N. The climbing scenario on a flat slope described in Figure 4A was used for this verification test.
In Figure 8, the slip velocities of the left bottom foot for each controller are shown with snapshots of the simulation. As shown in Figure 8A, without any adaptation, the controller cannot compute the adequate trajectory and control satisfying the real friction constraints, and that eventually results in contact loss at the left bottom foot after four climbing steps are made. You can also see that a slip tends to occur during the swing phase and post swing transition where one of the feet is used for making a step.
Figures 8B,C shows both CoM replanning and an online weight adaptation for WBC are effective to stabilize the slippery motion. The difference shown in the results for the two methods is that the online weight adaptation method faces the second slip once the slippery is stabilized especially around the start of the post-swing transition phase for each climbing step. That could be caused since the weights are initialized in every phase in our controller. Finally, as shown in Figure 8D, we validated that the slip can be prevented the most when both methods are applied.

Conclusion
In this study, we have presented several strategies to stabilize known and unknown slippery motion within a WBLC framework. In an effort to stabilize unknown slip, CoM re-planning based on unknown parameter estimation and online weight adaptation for WBC were presented. When the environment parameters are unknown and different from what we assume when we solve the problem, the obtained solution can suffer from unknown behaviors, for example, slip, traction loss, etc. Based on the friction force model, the friction coefficient and the friction force limit calculated from the adhesion force can be estimated when the contact is under the slip condition. Then, CoM re-planning is performed based on the proposed CoM trajectory optimization algorithm. The proposed CoM trajectory optimization achieved fast computation by leveraging a phase-based parameterization and we verified it by providing comparison benchmarks with other state-of-art algorithms. Therefore, the proposed CoM trajectory generation method allows for CoM re-planning in real time, and this can reduce the slip by generating adequate contact forces to increase the normal force and decrease the tangential force at slippery contact. The proposed strategies are shown to be effective to reduce slip through the simulation experiment.
Frontiers in Robotics and AI frontiersin.org