Swing control for a three-link brachiation robot based on sliding-mode control on irregularly distributed bars

The bionic-gibbon robot is a popular bionic robot. The bionic-gibbon robot can imitate a gibbon in completing brachiation motion between branches. With nonlinear and underactuated properties, the robot has important research value. This paper designs a type of bionic-gibbon robot with three links and two grippers. To simplify the controller, a plane control model is proposed, and its dynamic model is established. The control strategy in this paper divides the brachiation motion into several processes: adjust posture, open the gripper, the swing process and close the gripper. Based on sliding-mode control (SMC), the control method for the swing process is designed. The target position of the brachiation motion is set as the origin of the sliding-mode surface. In a finite time, the robot will reach the target position along the approach rate we adopt. In this way, the robot can complete the desired brachiation motion only by setting the position parameters of the target bar. We perform some simulations in ROS-Gazebo. The simulation results show that the bionic-gibbon robot can complete continuous brachiation motion on irregularly distributed bars. The sliding-mode control and the threelink structure significantly improve the robustness and swing efficiency of the bionic-gibbon robot.


Introduction
Inspired by animals, many bionic robots have been designed and constructed. Inspired by the gibbon, as shown in Fig. 1 (Tashakori et al., 2020), a new bionic robot -the brachiation robot -has been designed. It moves forward by alternately swinging its body and grasping a bar like a gibbon. With nonlinear and underactuated characteristics, the brachiation robot has important research value. Saito et al. (1993) carried out earlier research on the brachiation robot, proposed a heuristic learning method for it and achieved the swing motion of the two-link brachiation robot. Hasegawa et al. (1999) introduced the self-scaling reinforcement learning algorithm to the brachiation robot controller, which improved the accuracy in grasping the bar. However, the two control methods require long training for the new bar at different positions. Nakanishi et al. (1997Nakanishi et al. ( , 1998 proposed an alternative control method -target dynamics -for the brachiation robot. This method makes the robot swing like a pendulum. Therefore, starting from the posture of grabbing the single bar, the brachiation robot needs to swing several times to get energy before completing the first grab. It affects motion efficiency. Kajima et al. (2003Kajima et al. ( , 2005Kajima et al. ( , 2006 and  achieved brachiation motion on a multi-locomotion robot -"Gorilla Robot III". An energy-based control method was proposed and introduced into the swing motion controller. However, the robot could only perform continuous brachiation motion between the evenly distributed bars. Doi et al. (2006) applied the pas-sive dynamic autonomous control method to the robot, which realized continuous swing on the irregular horizontal ladder. However, this irregularity was limited to the horizontal direction, and the vertical direction was not considered. Meghdari et al. (2013) presented a control method based on minimum control effort trajectory planning and tracking, and the CE-DRA brachiation robot achieved brachiation motion on completely irregularly distributed bars. However, there was no research on the continuous swing. Liu (2017, 2019) developed two robust brachiation controllers and enabled the robot to swing along a structural member with an upward slope. However, the distribution of support rods was regular and lacked arbitrariness. The brachiation robot only considered the swing motion, not the grasping action. Wu et al. (2018) proposed big damping turn-back angle feedback and an energy pumping control strategy for the brachiation robot. This control strategy contained two control methods and divided the brachiation motion into four phases, which complicated the controller. In addition, the papers by Zhang et al. (2021), Hengmin et al. (2020 and Wang et al. (2020) also do relevant work.
Although a lot of research has been done on the brachiation robot, there are still some problems, such as grasping the target bars at different heights and distances, continuous brachiation and simplification of the controller. Meanwhile, most brachiation robots adopt the two-link model and ignore the body of the gibbon. In this paper, we design a three-link brachiation robot with two grippers. The robot achieves continuous brachiation motion on irregularly distributed bars. The irregular distribution of the bars can be at different distances and heights. Meanwhile, the controller is simple and robust.
The paper is organized as follows. In Sect. 2, the brachiation robot is presented. The plane control model is established based on the robot, and its dynamic model is introduced. In Sect. 3, we propose a control strategy for the robot, which divides the brachiation motion into four processes. Based on the sliding-mode control, we design a control method for the swing process of the robot. In Sect. 4, the simulation environment is established in ROS-Gazebo. The robot carries out single and continuous swing motion simulation. Finally, we analyse the simulation results.

The brachiation robot and control model
In this paper, a three-link brachiation robot is designed as shown in Fig. 2a. This robot has two arms and one body. Each arm has a gripper that can grasp a bar. Each arm is driven by a motor between the body and the arm. When a gripper grasps the bar, the gripper and the bar form a rotary joint that is assumed to be a passive joint. Therefore, the robot is an underactuated mechanism in the swing process. To simplify the controller, the robot is simplified to a plane model. Moreover, the plane model is idealized without friction and disturbance, and the grippers in the closed state are considered to be part of the arm. We establish a plane control model for the controller as shown in Fig. 2b. Where m i , l i and l ci are the mass, length and centre of mass of link i, (i = 1, 2, 3), respectively. J i is the moment of inertia of link i about the rotation axis. Respectively, q i and τ i are generalized angle and generalized torque. The kinematic and dynamic parameter values of the brachiation robot control model are shown in Table 1. There τ ei represents the maximum torque of the motor. By the Lagrange equation, the dynamic equation of the system is as follows: is the inertial matrix, and it is reversible, The corresponding proof is in Murray et al. (1994). Because the inertia matrix M (q) is symmetric and positive definite, according to the knowledge of linear algebra, we can find that the inertia matrix M (q) is invertible. H (q,q) represents the nonlinear Coriolis, centrifugal force, and gravity term. The matrix M (q) and vector H (q,q) are given by where where + m 2 gL c2 cos (q 1 + q 2 ) + m 3 gL c3 cos (q 1 + q 3 ) , h 2 = m 2 L 1 L c2 sin (q 2 )q 2 1 + m 2 gL c2 cos (q 1 + q 2 ) , h 3 = m 3 L 1 L c3 sin (q 3 )q 2 1 + m 3 gL c3 cos (q 1 + q 3 ) .
What needs to be emphasized is that τ 2 and τ 3 are generalized torque in the control model. We finally want to get the torque τ 4 of the motor between the body and the support arm and the torque τ 5 of the motor between the body and the swing arm. Through Newton's third law, we can get 3 Design of the controller

The control strategy of the brachiation motion
By analysing the brachiation motion of the gibbon, we project the brachiation motion of the robot as shown in Fig. 3a. The motion process is divided into four steps: (1) adjust posture, (2) open the gripper, (3) the swing process, and (4) close the gripper. In step (1), the controller is provided with the position of the target bar and adjusts the robot's posture. When the two grippers grasp the bars, the robot forms redundant constraints with the two bars. Therefore, in this step, precise position control is required to keep the robot in a certain posture to prepare for the next swing motion.
In step (2), open a gripper by position control and start the swing process. In step (3), the robot swings from the initial position to the target position. In this step, the robot is underactuated. The controller adopts torque control to control the robot by using the sliding-mode control algorithm. According to the target position and robot state, the sliding-mode control algorithm as shown in Fig. 3b can get the control torque of the motor. In step (4), when the swing arm reaches the target point, the gripper closes and the robot completes a single brachiation motion. After that, the robot can perform the next single brachiation motion to achieve continuous brachiation motion.

The sliding-mode control algorithm
The sliding-mode control (Utkin, 1977) is a type of nonlinear control method. It is easy to implement and has stronger robustness to disturbances (Young et al., 1999). Meanwhile, this control method with fast response is suitable for fast swing motion. Therefore, this paper selects the sliding-mode control and applies it to the brachiation motion. To introduce this control method into the robot controller, the target position of brachiation motion is set as the origin of the slidingmode surface. Suppose that when the gripper reaches the target point, the values of q 1 and q 2 are q d1 and q d2 . Select the sliding-mode surface function as follows: here, c 1 and c 2 are the control parameters. Then, Eq.
In the next simulation, the validity of Eq. (8) will be guaranteed. Through Eq.
(2), we can get the final control target τ 4 and τ 5 . Consider the following Lyapunov function candidate: Then, When the brachiation robot does not reach the target point, V > 0 andV < 0. According to the Lyapunov theorem for global stability, it can be deduced that the target point is globally asymptotically stable. Next, we will prove the convergence law of tracking error. According to Eq. (10) we can geṫ According to Lemma 3.2.4 in Ioannou and Sun (1995), we can get So, V exponentially converges to zero, and the convergence rate depends on α.

Simulation and result analysis
To verify the efficiency of the robot brachiation controller we design, the brachiation robot is established in the simulation software Gazebo as shown in Fig. 2a, and we establish the control system by using ROS-Gazebo. ROS is a popular operating system in robot development, and Gazebo is physical simulation software compatible with ROS. The control parameters are set: c 1 = 10, c 2 = 10, k 1 = 100, k 2 = 0.5, k 3 = 1000, k 4 = 0.5, α 1 = 0.5 and α 2 = 0.5. Next, the simulation experiment of single and continuous brachiation motion is carried out.

The single brachiation movement
The single swing process of the brachiation robot is shown in Fig. 4. We select the initial position (x = −0.5 m, y = 0 m) and the target position (x = 0.75 m, y = 0.15 m). Compared with the distance between the initial position and the midsupport bar, the distance between the target position and the mid-support bar changes in the horizontal and vertical directions. This ensures the arbitrariness of the target point. Control torque is shown in Fig. 5. Due to the limitation of motor torque, the saturation constraint is applied to Eq. (2). The motor torque is limited to [−35, 35] N m. This reflects the robustness of the controller to the motor torque limitation. The angle value of the brachiation robot is shown in Fig. 6. We can see that the torque control starts to work at 0.08 s. It ends at 0.47 s and the torque of the motor returns to zero. The brachiation robot reaches the target bar only through the first swing, which improves the movement efficiency. Besides, the controller is designed based on the plane control mode without considering joint friction and the action of the grippers in Eq. (1). However, it is used to control the three-dimensional brachiation robot with grippers and joint friction in Gazebo. Simulation results show that the controller has strong robustness for the robot with the uncertainties model and the action of the grippers.
To evaluate the swing ability of different brachiation robots, we define two evaluation indexes: swing efficiency and swing height.
Definition 1: swing efficiency is the horizontal distance that the robot can reach with a single swing, divided by the length of the two arms.
Definition 2: swing height is the height that the robot can reach with a single swing.
Through the two evaluation indexes, the three-link robot in this paper is compared with the two-link brachiation robots as shown in Table 2. We can see that the three-link structure improves the swing efficiency and swing height of the brachiation robot. The three-link robot has one more motor than the two-link robot. Therefore, the three-link robot has a stronger adjustment force. In addition, the third link adds mass and moment of inertia to the dynamic system of the robot, which  enhances the balance ability of the system and increases the range of motion of the two arms.

The continuous brachiation movement
The continuous swing process of the brachiation robot on irregularly distributed bars is shown in Fig. 7    The simulation environment is set up in Gazebo as shown in Fig. 8, which shows the initial state of the brachiation robot and the distribution of support bars. The simulation of the continuous swing motion in Gazebo is shown in Fig. 9. The robot performs the first single swing motion in Fig. 9a-d, the second one in Fig. 9e-h and the third one in Fig. 9i-l. The angle value of the continuous swing is shown in Fig. 10. The robot completes the first single swing motion at 1.58 s, the second one at 2.94 s and the third one at 4.43 s. After every single swing, the roles of the swing arm and the support arm are swapped. Meanwhile, the angle value of the control  model also changes, which is not continuous, as shown in Fig. 10. In the position control phase, the angle value is relatively stable. The robot can maintain a certain state, which provides a stable initial posture for the next swing process. In the torque control phase, the angle changes monotonously. The robot quickly reaches the target position.

Disturbance analysis
The swing motion of the brachiation robot is often influenced by various disturbances. To verify the effectiveness of the proposed control scheme under complex disturbances, a disturbance analysis is performed. The disturbance term is added to the control input, and Eq. (1) can be rewritten as follows: where, supposing that d 1 = A cos 2π T t and d 2 = A sin 2π T t , A is the amplitude and T is the period. Substitutingq 1 andq 2 from Eq. (13) into Eq. (4) yields Through Eqs. (14) and (7) we can get the control torque as follows: τ 2 τ 3 = n 12 n 13 n 22 n 23 −1 ·     −k 1 s 1 − k 2 |s 1 | α 1 sgn (s 1 ) − c 1q1 +n 11 h 1 + n 12 h 2 + n 13 h 3 − d 1 −k 3 s 2 − k 4 |s 2 | α 2 sgn (s 2 ) − c 2q2 +n 21 h 1 + n 22 h 2 + n 23 h 3 − d 2     .
(15) Figure 11. The distance to the target point.
Using the disturbance control input Eq. (15) and the nondisturbance control input Eq. (8) model, respectively, the swing motion is carried out from the initial position (x = −0.5 m, y = 0 m) to the target position (x = 0.75 m, y = 0.15 m). During the swing period from opening the gripper to closing the gripper, the simulation experiment records the distance from the gripper to the target position. By comparing the distance curve of the above two models, the effect of disturbance on the control scheme is obvious, as shown in Fig. 11. Under the disturbance term with A = 5 and T = 0.1, the recorded distance approaches zero; in other words, the gripper reaches the target position and completes the swing motion. Compared with the case without disturbance, when there is disturbance, the distance curve has a small range of fluctuations and is relatively stable overall. In addition, Fig. 11 shows that the distance takes a longer time to approach zero under disturbance. We can conclude that the proposed control algorithm is effective under disturbances.

Conclusions
The main contribution of this paper is to apply the slidingmode control to the swing motion of the brachiation robot. The sliding-mode control has robustness to the initial point, the target point, the action of the gripper, the uncertainties model and the motor torque limitation, which realizes the continuous swing of the robot on irregularly distributed bars. Besides, compared with the two-link structure as shown in Table 2, the three-link structure introduced in this paper improves the swing efficiency and increases the swing height of the brachiation robot. The simulation experiment in ROS-Gazebo shows that the robot completes the single swing motion to the target bar (x = 0.75 m, y = 0.15 m), and the swing efficiency reaches 75 %. Meanwhile, the robot carries out the continuous swing motion on irregularly distributed bars.
Compared to evenly distributed bars, the positions of the irregularly distributed bars have changed by 0.2 m in the horizontal direction and by 0.1 m in the vertical direction. The simulation results show that the sliding-mode control and three-link structure significantly improve the robustness and swing efficiency of the brachiation robot. The direction for future work is to build the physical brachiation robot. To further verify the reliability of the controller, we will carry out the swing motion on the physical robot.
Data availability. The data in this study can be requested from the corresponding author.
Author contributions. ZL proposed the research route and completed the first draft. GL completed the simulation experiment and data analysis. HZ completed the algorithm improvement. RW designed the brachiation robot model. CL reviewed the paper and gave constructive suggestions to improve the quality of the paper.

Competing interests.
The contact author has declared that neither they nor their co-authors have any competing interests.
Disclaimer. Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.