1. Introduction
Over the few years, the problem of dynamic modeling and analysis of hexapod robots has been studied for estimating the foot–ground interactions and locomotion optimization. Jin et al. [Reference Jin, Ding, Gao, Su and Zhang1] defined the equations of motion of a heavy-weight hexapod using Kane’s dynamic formulation to study the influence of spring–damper models in the main body’s acceleration, for a regular surface. A similar strategy is proposed by Liu et al. [Reference Liu, Su, Zhou, Gao, Ding, Jiang, Zou and Ma2] for the study of the feet contact forces and the design of active suspension models for the legs in heavy-weight hexapod. The dynamic modeling analysis has also been used for the study of underwater tasks. Considering the seabed as a soft terrain, Ding et al. [Reference Ding, Hu, Liu, Gao, Deng, Zhang and Tang3] implemented the dynamic model of a limb and hydrodynamic forces to study the contact forces of the foot when the robot crawls on the sea. In a similar approach, Wang et al. [Reference Wang, Lu, Zhang, Chen, Zhao and Gao4] presented the hexapod robot dynamic model for the design of passive and active suspension models in the legs, considering the robot’s landing in the seabed. Burkus et al. [Reference Burkus, Odry, Awrejcewicz, Kecskés and Odry5] developed the multibody model of a hexapod robot using Simscape and MATLAB to optimize its locomotion in terms of energy consumption, mass, and joints actuation. Deepa et al. and Xue et al. [Reference Deepa, Angalaeswari, Subbulekshmi, Krithiga, Sujeeth and Kathiravan6, Reference Xue, Li, Chen, Wang, Wang and Ma7] also studied the locomotion efficiency of a hexapod robot using the dynamic simulation software CoppeliaSim. Using the Euler–Lagrangian dynamic formulation, Chang and Lin [Reference Chang and Lin8] presented the study of running and turning gaits for a hexapod with spring-loaded inverted pendulum limbs. The same dynamic formulation is implemented by Chávez and Alcántara [Reference Chavez and Alcantara9] in order to evaluate the energy consumption and trajectory of a hexapod walking across a plane. In a different application of the hexapod’s dynamic model, Ouyang et al. [Reference Ouyang, Chi, Pang, Liang and Ren10] proposed a Reinforcement Learning algorithm to generate locomotion using the joints’ torque and velocity, and the torso’s orientation. By defining the Lagrange equations of motion for each limb, the work presented by Zhang et al. [Reference Zhang, Gao and Sun11] discusses the torso stability during the hexapod navigation across a plane. The Lagrange formulation is also used to study the motion of a hexapod’s legs and estimate the slippage between the foot and the ground in the work presented by Liu et al. [Reference Liu, Xing, Jiang, Liang, Zhao and Su12]. Similarly, He et al. [Reference He, Cao, Li, Zhu and Aimin13] presented a simplified multibody model of a hexapod robot to study the normal and tangential contact forces of the feet in order to predict the sinking and slippage of these bodies in a soft terrain. Due to formulation complexity, the majority of presented studies only consider the limbs dynamic model to study the robot’s behavior. Besides, hexapod locomotion is mainly studied in regular surfaces, despite the terrain stiffness. However, the dynamic formulation of a hexapod robot can provide an insight into the robot’s behavior in different terrain topologies and assess the robot’s design and control.
In turn, the control strategies commonly used in hexapods aim at developing efficient and adaptive locomotion [Reference Sun, Zhan, Duan, Bai, Zheng and Chen14–Reference Irawan and Nonami16]. Several studies employ Artificial Intelligence (AI) for the efficient gait generation in regular surfaces [Reference Strohmer, Manoonpong and Larsen17–Reference Barrio, Lozano, Martínez, Rodríguez and Serrano19]. The study of gait generation aims at developing path planning algorithms based on the hexapod’s behavior, for more complex environments [Reference Khazaee, Sadedel and Davarpanah20]. In the design of exploration hexapod robots, Simultaneous Localization and Mapping techniques have been studied for the navigation across unknown environments and identification of human-hostile areas [Reference Deepa, Angalaeswari, Subbulekshmi, Krithiga, Sujeeth and Kathiravan6]. Regarding rescue and scouting missions, the implementation of image processing and AI in hexapod robots is also proposed for human recognition [Reference Rawat, Misra, Mitra and Sinha21]. The drawback of the presented works is considering that the hexapod walks across regular surfaces. For locomotion across irregular terrains, the usage of kinematics approaches for the generation of adaptive locomotion prevails. Zhao et al. [Reference Zhao, Gao, Sun and Yin22] discussed the implementation of adaptive impedance models combined with a terrain classification method in a hexapod, to walk across different terrain topologies. The usage of impedance models is also proposed by Yin et al. [Reference Yin, Zhao, Xiao and Gao23] to adapt the foothold positions based on terrain cost map estimation, which reduces the torso’s oscillation during locomotion. Nonetheless, the terrain’s inclination influences the gait efficiency, and thus the torso’s orientation must be adjusted to ensure the system’s stability and improve its performance.
From the discussion described above, it is clear that there is additional room for researching the control and implementation of hexapod robots for irregular terrains, in terms of stability and posture control. It can be mentioned that the study of the hexapod’s dynamic model in complex environments is worthy of investigation, since most studies implement the presented control in the physical prototype without estimating the robot’s behavior through computational simulations. Thus, it can be observed that there is a gap in the thematic literature in terms of studying the dynamic modeling of hexapod robots as well as their posture control to walk in irregular terrains. Hence, the main purpose of this work is twofold. The first objective is to model the full multibody of a hexapod robot and describe the equations of motion that are used to evaluate the robot’s locomotion in irregular terrains from the dynamic point of view. The second goal of this work is to propose a posture control for generating stable locomotion in irregular terrains, regarding the data provided by the defined dynamic model for the control’s feasibility assessment.
By and large, there are three main methodologies to deal with the problem associated with ground discontinuities or irregularities, namely the virtual model control (VMC), the foothold planning approach, and the AI-enhanced methodology. In the VMC, the animal’s reflexive behavior is mimicked to adjust the hexapod robot’s posture based on the foot force distribution. By using virtual springs and dampers, the VMC aims at estimating the limbs’ joints torque to estimate the torso center of mass position. Nelson and Quinn [Reference Nelson and Quinn24] utilized the VMC for the position adjustment of a hexapod when an external load is applied to the torso. These authors showed that the implementation of the VMC ensures that the hexapod’s main body remained horizontal during the system’s navigation across complex environments. In turn, Tikam et al. [Reference Tikam, Withey and Theron25] combined the VMC with virtual suspension models to adapt the system’s response to the torso height, roll, and pitch deviations. The VMC was assessed for the correction of a commercially available hexapod’s standing posture in an irregular environment. The proposed control ensures that the torso remains horizontal and that all limbs are in contact with the ground during the gait phase transition. Liu et al. [Reference Liu, Wang, Zhang and Zhao26] presented a similar strategy to control the hexapod posture when climbing stairs. For the tested running scenario, the methodology obtained a maximum offset value of 11.0° and 3.2° for the torso’s pitch and roll angles. The system’s stability potentially increases with the implementation of the VMC with impedance controllers on the legs, to compensate for the height deviation that occurs during the foot collision with the ground [Reference Liu, Wang, Zhang and Zhao26]. In the study presented by Zhang et al. [Reference Zhang, Liu, Zhao, Chen and Yan27], the combined strategy obtained a reduction of 53.0% and 54.0% of the roll and pitch angle variation when walking across irregular surfaces. Kim et al. [Reference Kim, Jun and Park28] also adopted the VMC approach and considered the hexapod Little Crabster as an inverted pendulum with spring and damper elements to control the rotation of the system’s center of pressure. Besides being limited to the force sensor accuracy, the VMC effectiveness depends on complex mathematical models for the motion estimation, which implies a higher computational accuracy. The design of the virtual elements depends on the studied terrain topology. Hence, the damping and stiffness coefficients must be constantly adjusted, to avoid a large compensation of the foot forces.
In the foothold planning scientific approach, the control posture is obtained by developing gait planning methods to adapt the foothold position according to the ground discontinuities [Reference Celaya and Porta29–Reference Chen, Guo, Wang, Sun, Zha, Shi and Li33]. The presented method can be implemented by using the data provided by a gyroscope or an Inertial Measurement Unit (IMU) as input of a kinematic-based control for the limbs’ actuation [Reference Cao, Yamashita, Kiyozumi and Tada32, Reference Copot, Ionescu and De Keyser34–Reference Coelho, Dias, Lopes, Ribeiro and Flores37]. Instead of calculating the torso orientation, the robot’s relative height can be obtained through the estimation of the plane formed by the supporting limbs [Reference Faigl and Čížek38, Reference Li, Wang, Zhang, Jiao, Wang and Zhang39]. The advantage of the main body leveling method is not resorting to external sensors to estimate the hexapod state. Xia et al. [Reference Xia, Zhang and Zhang40] proposed a body leveling method based on the detection of contact forces between the limbs. In a different approach, Chen et al. [Reference Chen, Jin and Chen41] proposed a proportional control to adjust the hexapod posture based on the relation between the feet and the torso’s linear and angular velocities. More recently, Chen et al. [Reference Chen, Jin and Chen42] also used the robot’s kinematic model to obtain a mathematical relation between the joints and the torso angular velocities and designed a nonsingular fast terminal sliding mode control to adjust the angular deviations. Along with studying the hexapod’s kinematic model for posture correction, the limbs’ kinematic configuration can be also adjusted to increase their mobility [Reference Bjelonic, Kottege and Beckerle43, Reference Cizek, Zoula and Faigl44]. Nonetheless, this solution has some limitations in terms of design complexity and energy autonomy.
The methodology of AI-enhanced posture control has received little attention in the literature. Azayev and Zimmerman [Reference Azayev and Zimmerman45] proposed a Reinforcement Learning methodology with a Recurrent Neural Network for the terrain classification to adjust the torso and gait velocities. Due to the fact that convergence studies are conducted in computational simulations, the main drawback of the presented methodology is the transferring of the designed model into the physical prototype.
Building upon the literature review, it is clear that planning the torso and feet trajectories provides a simpler control system and generates better responses to gait fluctuations. This work discusses the implementation of a kinematic-based approach for the control and online path planning of a hexapod mobile robot for the execution of scouting tasks in rescue missions. In more detail, an adaptive posture controller that regulates the torso’s height and roll and pitch orientation through the real-time planning of the feet’ coordinates is developed. The proposed methodology is implemented in the hexapod ATHENA, which aims at generating adaptive and autonomous locomotion for unstructured environments. Since the limbs’ actuation of ATHENA is periodic, the developed approach for the robot posture control estimates the terrain slope through the system’s kinematic model. With the resultant relative coordinates, the angular deviation between the torso and the ground is determined, and the foothold positions are adjusted to maintain the torso’s posture stability. The proposed method also calculates the hexapod’s adequate height regarding the ground’s slope, to ensure that the main body does not collide with obstacles during the motion performed. The control methodology is adaptable to the environment by adjusting the system’s response for the height and posture correction. This work presents contributions for the adaptive locomotion of legged robots designed for tasks in complex environments. The most relevant advantage of the proposed methodology is providing a generalized posture control approach which can be optimized in terms of torso’s height and orientation regarding the type of scenario the hexapod robot must navigate. The designed control only requires information of the existence of contact forces on the hexapod’s feet, the angular position of each joint, and the torso’s height. Subsequently, the low number of required sensors for the system’s control is another advantage in terms of energy consumption. The exclusion of exteroceptive sensors, such as vision sensors, for the ground estimation decreases the method’s volatility, since the data collected by this type of sensor depends on the environment conditions. The control method feasibility is assessed in the dynamic simulation Gazebo software, considering the multibody model of the hexapod. Furthermore, the hexapod is evaluated in two different scenarios, namely a 10-degree ramp and an irregular terrain. The objective of the two computational simulations is to determine the control response in different conditions in terms of terrain topology and slope variation. The height and posture adjustment methods are evaluated. In each case, the height and posture adjustment methods are compared against the outcomes obtained with a nonadaptive controller. The results show the improvement of the torso stability in both scenarios.
The structure of this paper is organized as follows. Section 2 provides a description of the ATHENA robot and discusses its implementation in Gazebo. Section 3 presents the equations of motion and establishes the contact strategy to evaluate the system’s dynamic behavior, as well as the used kinematic model to describe and control the robot’s locomotion. Section 4 discusses the proposed methodology for posture and height control. Section 5 presents the main outcomes from the computational simulations performed in the different scenarios. Finally, Section 6 contains the concluding remarks of this work.
2. Hexapod model description
2.1. System analysis
In this section, a description of the hexapod robot ATHENA considered in this study is presented. The physical prototype of the ATHENA robot is depicted in Fig. 1. From the mechanical point of view, the robot is composed of 25 rigid bodies, which are interconnected by 24 kinematic joints, as can be observed in the corresponding multibody model illustrated in Fig. 2. In this model, body b is the torso, being the remaining bodies axisymmetrically distributed around it. Each limb includes three revolute joints that are actuated by servo motors with a stall torque of 1.89 N·m. The revolute joints aim at connecting the torso with the coxa, femur, and tibia segments – c i , f i , and t i – which are, respectively, named Thorax-Coxa (TC), Coxa-Trochanterofemur (CTr), and Femur-Tibia (FTi). Besides that, the parameter p i represents the hexapod feet, which are linked with t i through prismatic joints. The passive connection between the two bodies aims at controlling the feet’s relative displacement caused by their interaction with the ground, using compression springs with a spring rate of 9.28 × 103 N·m. The displacement associated with the compression spring does not provide significant position deviations in the foot trajectory. These two components are combined, and the relative motion between them is considered to be null. The inertia properties of the bodies of the ATHENA robot are listed in Table I. The presented principal and secondary moments of inertia are estimated using the local reference frame of each body, which is attached to the respective center of mass.
2.2. Model design for the computational analysis
In order to have an efficient and accurate contact formulation between the feet and the ground, a simplified multibody model of the robot was developed and implemented in the Gazebo software. Bearing in mind that the goal of this work is to examine the presented posture control in inclined surfaces, the system geometry does not have a significant influence on the results, as long as the inertial properties are equivalent to the physical prototype. Therefore, the hexapod was modeled in Gazebo using simple geometries, such as spheres and planes (see Fig. 3). Most of the components were converted into prisms. On the contrary, the feet were modeled as spheres and therefore, during the collision with the ground, there is only one contact point, which is also beneficial for the computational point of view. All revolute joints were set to a maximum torque of 1.89 N·m, to simulate the selected servo motors and the connection between the tibia and the foot is assumed fixed. Table II lists the model dimensions and the respective inertial properties. The presented principal and secondary moments of inertia are estimated using the local reference frame of each body, which is attached to the respective center of mass.
3. Problem formulation
3.1. Equations of motion
This section discusses the defined equations of motion for the hexapod robot that are used to assess the control behavior. The computational simulations performed in Gazebo resort to the external library Open Dynamics Engine (ODE) to estimate the motion and forces applied to a system. The general equations of motion involving contact-impact events are expressed as [Reference Flores, Leine and Glocker46]:
in which $\mathbf{M}^{(150,150)}$ is the system’s global mass matrix, $\ddot{\mathbf{q}}^{(150)}$ denotes the vector that contains the bodies’ linear and angular accelerations, the matrices $\mathbf{N}_{\mathrm{n}}, \mathbf{N}_{\mathrm{t}}\in \mathrm{\mathbb{R}}^{150\times n}$ contain respectively the normal and tangent vectors with respect to the contact surfaces, and $\mathbf{f}_{\mathrm{n}}, \mathbf{f}_{\mathrm{t}}\in \mathrm{\mathbb{R}}^{n}$ are respectively the n-dimensional vector of the normal and tangential contact forces. It must be mentioned that the dimension of $\mathbf{f}_{\mathrm{n}}$ and $\mathbf{f}_{\mathrm{t}}$ depends on the number of contacting points. The equations of motion are calculated at the impulse level. In each time step, contact-impact events are detected and the equations of motion of the model are evaluated with respect to the bodies’ velocities. The numeric simulation’s time discretization is based on the Moreau’s time-stepping methodology [Reference Moreau47].
In turn, the contact resolution closely follows the approach proposed by Stewart-Trinkle [Reference Stewart and Trinkle48] and Anitescu-Potra [Reference Anitescu and Potra49], which is formulated as a Linear Complementarity Problem (LCP). This type of formulation can be expressed as:
where $\mathbf{A}^{(n,n)}$ and $\mathbf{b}^{(n)}$ are constants with n-dimension,and $\mathbf{x}$ and $\mathbf{y}$ denote the system’s unknowns [Reference Flores, Leine and Glocker46]. In order to obtain the quantities of x and y, the following complementary conditions must be verified [Reference Flores, Leine and Glocker46]:
This methodology is implemented for the calculation of the normal contact forces. In this strategy, the normal contact forces are modeled using Newton’s impact law, which considers the existence of compression and restitution phases during the collision between two bodies. When the compression phase takes place, there is impulse conservation. The model’s equations of motion are expressed at level velocity and impulse level can be formulated as [Reference Stewart and Trinkle48, Reference Anitescu and Potra49]:
where the superscript 0 denotes the end of the compression phase and $\dot{\mathbf{q}}^{-}$ is the pre-collision velocity. The variables $\hat{\mathbf{f}}_{\mathrm{n}}$ and $\hat{\mathbf{f}}_{\mathrm{t}}$ denote the impulses of the normal and tangential contact forces, respectively. During the restitution phase, the bodies move in opposite directions, and the equations of motion at the velocity and impulse level are expressed as:
in which $\dot{\mathbf{q}}^{+}$ is the post-collision velocity.
The vector $\hat{\mathbf{f}}_{\mathrm{r}}$ , which represents the impulsive force, can be defined as:
where $\xi \in [0,1]$ is the coefficient of restitution. In this study, $\xi$ equals 0.5. In order to solve the Newton’s impact law as an LCP, the following complementary conditions are defined [Reference Stewart and Trinkle48, Reference Anitescu and Potra49]:
These conditions evaluate both the normal relative distance between bodies and the consequent existence of a normal contact force. If $\mathbf{N}_{\mathrm{n}}\dot{\mathbf{q}}$ is null, there is a collision, and a positive normal contact force exists. On the contrary, if the $\mathbf{N}_{\mathrm{n}}\dot{\mathbf{q}}$ is positive, then the bodies are separated, and the normal contact force is null.
A similar strategy is implemented for the tangential contact analysis. In this study, the tangential contact forces are modeled using Coulomb’s friction law. In order to increase the model accuracy, the isotropic friction model is approximated to a polyhedral [Reference Chakraborty, Berard, Akella and Trinkle50]. The complementary conditions that are set to solve the friction forces as an LCP are expressed as:
where $\boldsymbol\lambda$ denotes the Lagrange multipliers, and μ is the friction coefficient, which is equal to 0.9. The presented inequalities state that if $\boldsymbol\lambda$ is greater than 0, there is sliding between the two surfaces. Otherwise, there is stick slippage between the surfaces [Reference Flores, Leine and Glocker46].
3.2. Kinematic model
This section presents the kinematic modeling process to control the robot. The implementation of the proposed method requires obtaining the relation between the joints’ angular positions and the robot’s feet coordinates. Considering the models presented in refs. [Reference Coelho, Dias, Lopes, Ribeiro and Flores37, Reference Coelho, Dias, Lopes, Ribeiro and Flores51], the torso’s center of mass is defined as the reference for all calculations. The kinematic model of one limb is depicted in Fig. 4. The angles $\theta _{2}^{\mathrm{r}}, \theta _{3}^{\mathrm{r}}$ , and $\theta _{4}^{\mathrm{r}}$ are the relative angles of the TC, CTr, and FTi joints, respectively. The hexapod motion is studied by setting the motion range of the TC joint to $\theta _{2}^{\mathrm{r}}\in [\!-\!0.612,0.612]$ rad, and the angular position of the remaining joints is constrained to $\theta _{3}^{\mathrm{r}},\theta _{4}^{\mathrm{r}}\in [\!-\!1.484,1.484]$ rad.
The locomotion control requires two different estimations from the kinematic model: (i) get the current feet coordinates based on the joints’ angular positions to verify if the desired motion is within the system’s workspace, and (ii) calculate the joints’ configuration according to the trajectory applied to the feet. In the first analysis, the Denavit–Hartenberg convention is used to obtain the relative position of the foot w.r.t. the reference frame B. Using the Denavit–Hartenberg parameters presented in Table III, the relative transformation between B and the hexapod feet can be established as:
where the vector $\mathbf{p}_{i}^{B}=\{x_{\mathrm{p}}^{B},y_{\mathrm{p}}^{B},z_{\mathrm{p}}^{B}\}^{\mathrm{T}},i\in 1,\ldots,6$ contains the feet’ relative coordinates, which are expressed as:
The limb’s inverse kinematics calculation is essential to control the driven joints’ positions. The inverse kinematics formulation uses the feet’s position to obtain the relative angular positions of the joints. For this matter, the value of $\theta _{1}^{\mathrm{r}}$ is constant and depends on the leg position as:
The calculation of $\theta _{2}^{\mathrm{r}}$ depends on the fixed reference frame Q, which is placed on the TC joint (see Fig. 5). Thus, the angular position of this driven joint is defined as:
in which $\mathbf{p}_{i}^{Q}=\{x_{\mathrm{p}}^{Q},y_{\mathrm{p}}^{Q},z_{\mathrm{p}}^{Q}\}^{\mathrm{T}}$ denotes the relative position of p i w.r.t. Q, and is expressed as:
where $\mathbf{T}_{1}^{0}$ is the transformation matrix between the reference frames B and Q. The estimation of the remaining angular positions requires knowing the position of the reference frame U, which is placed on the CTr joint. Using the Denavit–Hartenberg convention, the position of U w.r.t. Q is defined as:
Considering the vector s p between the reference frame U and the foot, the value of the CTr and the FTi joints is as follows:
where z U and z p represent, respectively, the vertical position of the reference frame U and the foot. The presented equations of motion and kinematic model of the ATHENA robot contain fundamental concepts for the design and assessment of the developed posture control strategy.
4. Control strategy for the locomotion of ATHENA across inclined surfaces
4.1. Gait generation
The locomotion of the ATHENA robot adopts the tripod gait. Among the commonly adopted gaits in hexapod robots, the tripod pattern provides the highest velocity of the main body, despite decreasing the system’s stability due to the number of supporting limbs. If the designed control for the posture adjustment provides good results for the tripod gait, then the methodology is considered assessed for other locomotion types. Considering the gait state, the limbs execute a different motion. In the swing phase, the feet reach a new foothold position by executing a cubic Bézier trajectory expressed as:
where n represents to the number of control points, tg is the trajectory’s time interval, and $\mathbf{p}_{i,j}^{B}$ denote the control points of the trajectory. The first control point corresponds to the foot’s initial position $\mathbf{p}_{i,0}^{B}$ which is defined by Eq. (12). The remaining control points are determined as:
where h is the maximum height and s denotes the stride.
In the stance phase, the feet are in contact with the ground while propelling the torso forward. Thus, the foot’s trajectory is defined as:
In both phases, the result of the foot trajectory must be converted into motor commands, using the inverse kinematics model established in Section 3.2.
4.2. Posture adjustment
The aforementioned footpath planning of the limbs considers that the hexapod robot walks across a regular and smooth surface. Thus, the displacement of the torso’s height and orientation is neglected, and consequently the system is stable. Nonetheless, the variation of the terrain topology affects the hexapod’s achievable foothold positions and corresponding torso’s posture. The terrain complexity increases the displacement of the torso’s position, which constrains the hexapod’s ability to surmount inclined surfaces. Bearing that in mind, the proposed strategy aims at adjusting the hexapod’s height and orientation by estimating the ground inclination.
The terrain perception is estimated by the relative position of the feet w.r.t. the torso, which is given by Eq. (12). For this purpose, the control evaluates the relative coordinates of the feet, which are in contact with the ground. Using the relative coordinates of the supporting feet, the terrain can be approximated to a characteristic plane expressed as:
in which a p, b p, c p, and d p are constants, and $\mathbf{x}, \mathbf{y}, \mathbf{z}\in {\mathbb{R}}^{f}$ are f-dimensional vectors that contain the coordinates of the supporting feet. With the values of a p, b p, c p, and d p, the norm vector of the plane g is obtained. The developed algorithm for the detection of the supporting limbs, and the calculation of the norm vector, is described by the following steps (see Fig. 6). In each gait cycle, the algorithm reads the normal contact forces using the force sensors placed on each foot. In a regular surface, there are exactly three legs with positive normal contact forces; hence, the ground plane equation can be estimated using Eq. (24). Nonetheless, the number of supporting limbs changes with the terrain irregularities. If the terrain topology forces the hexapod to have more than three supporting limbs, a random subset with three of the legs in contact with the ground is applied for the estimation of the ground plane. In case of having less than three legs in the stance phase, the algorithm searches among the remaining limbs which should be in contact with the ground, and their trajectory is extended until a positive normal contact force is read by the force sensors. After that, there are sufficient supporting limbs to estimate the terrain’s characteristic plane using Eq. (24). Figure 7 shows a generic configuration of the ATHENA hexapod walking across an inclined and irregular surface. Considering the torso’s local reference, and a two-dimensional representation of g in the $\eta$ $\zeta$ and $\xi$ $\zeta$ planes, the angular displacement of the pitch and roll angles is determined as:
where δ $_\alpha$ represents the pitch displacement, $\boldsymbol{n}_{\zeta}$ denotes a unitary vector, and δ β is the angular deviation in the roll orientation.
The terrain’s inclination affects the relative motion between the torso and the ground. Figure 8 shows the angular displacement performed by the ATHENA hexapod climbing a 10-degree ramp in Gazebo, without controlling the torso posture. From the analysis of this plot, it can be observed that in each gait cycle, the transition between gait phases causes an abrupt change of the roll and pitch angles due to the alternation between the supporting limbs and consequent inaccurate planning of the foothold positions. Thus, it is of paramount importance to ensure that during the gait phase transition, all limbs are in contact with the ground and their height is adjusted to the estimated surface plane. Subsequently, the results variation of the roll and pitch angles in each gait cycle assess the torso’s instability when the hexapod climbs the ramp. The posture variation is influenced by the limbs’ trajectory in the stance phase, which is responsible for adjusting the torso’s angular positions. Considering the outcome from the computational simulation with simple control, it can be concluded that the proposed control strategy is able to adjust the feet’ coordinates regarding the torso’s orientation and height. Since the swing phase is mainly influenced by the torso’s height, the final control point of the cubic Bézier trajectory is defined as:
where k z is a control parameter, and δ z denotes the height displacement, being the difference between the relative height w.r.t. the ground measured by an infrared sensor placed on the torso, and the reference height, which denotes the torso’s height considering the hexapod’s standing posture. Regarding the stance phase, the control strategy requires an adjustment using Eq. (23) according to the torso orientation in inclined surfaces. Thus, the feet’s final position in the stance phase is expressed as follows:
where t r denotes the transformation vector, that are expressed by:
where R x and R y denote the rotation matrix along the axes x and y, respectively, k $_\alpha$ and k β are the corresponding control parameters for the pitch and roll angles, and T is the transformation matrix defined as:
Bearing in mind that the transformation of $\mathbf{p}_{i,\mathrm{f}}^{O}$ , the stance phase is defined as:
5. Computational simulations
5.1. Computational setup
The proposed computational procedure to control the ATHENA robot has been implemented and evaluated in the Gazebo software. The ODE library is considered in the computational simulations with a time step equal to 50 ms to solve the equations of motion and provide data regarding the torso posture. The controller implementation in the Gazebo environment uses a ROS-based client–server infrastructure with a rate of 20 Hz to simulate real-time data acquisition. An IMU and an infrared sensor are placed on the hexapod’s torso, to assess the body’s angular velocities and height, which are estimated by the ODE library.
The computational simulations are performed for a 10-degree ramp and an irregular terrain. The two scenarios are presented in Fig. 9. The surface’s inclination defined for the ramp scenario is representative and is appropriate to assess the control methodology (see Fig. 9(a)). A similar strategy is utilized in the testbed scenario portrayed in Fig. 9(b). The second situation contains blocks with different heights between 0.04 m and 0.13 m and aims at studying the proposed control in a more demanding scenario in terms of terrain topology variation. In both computational cases, the hexapod adopts a tripod gait with tg = 1 s, and the kinetic friction coefficient is set to 0.9. For the height adjustment, the hexapod’s standing posture, which is used as reference for the infrared sensor readings, is set when $\theta _{2}^{\mathrm{r}}=0$ rad, $\theta _{3}^{\mathrm{r}}=0$ rad, and $\theta _{4}^{\mathrm{r}}=-\frac{\pi }{2}$ rad.
5.2. Discussion
In each environment, the influence of the parameters k z, k $_\alpha$ , and k β on the control system’s response is analyzed. It must be noticed that the value of the parameters can be defined by an infinite number of combinations. The main goal of this work is to assess the feasibility of the proposed control; hence, k z, k $_\alpha$ , and k β are restrained to a set of discrete values (k z, k $_\alpha$ , k β ∈ {0.0, 0.2, 0.4, 0.6, 0.8, 1.0}), which provides a general overview into the influence of the constants k z, k $_\alpha$ , and k β in the posture stability in the two defined scenarios. The hexapod’s posture is evaluated according to the torso’s height w.r.t. the ground and the angular velocities in the roll and pitch directions. In each computational simulation, the root-mean-square value of the aforementioned variables is estimated per gait cycle, and the resultant variation is examined.
5.2.1. Ramp scenario
The first computational simulations that were performed consider k $_\alpha$ = k β = 0.0 and k h ∈ {0.0, 0.2, 0.4, 0.6, 0.8, 1.0}. If k z = 0.0 takes place, the control system does not adjust the torso’s height, and when k z = 1.0, there is full implementation of the estimated δ z in the limbs’ trajectories. The obtained results for the relative height and angular velocities are presented in Fig. 10. Using the simple control as reference (k z = 0.0), it can be observed that the implementation of the height adjustment improves the hexapod robot’s stability due to the significant decrease of the height’s interquartile range when k z > 0.0 (see Fig 10(a)). In comparison to the median value for k z = 0.0, which corresponds to 0.068 m, there is, on average, an increase of 58.42% in the torso’s height when the proposed control strategy is implemented. Although the highest median value occurs when k z = 1.0, which corresponds to 0.112 m, the height variation is smaller when k z ∈ {0.6, 0.8}. The height adjustment does not affect the torso’s orientation and angular velocity. Figure 10(b) depicts the plots for the pitch velocity. The obtained results show that the pitch velocity’s median increases when k z = 1.0. Thus, it can be concluded that, for the maximum height, the variation of the torso’s pitch angle increases, and the hexapod’s posture becomes unstable. For the remaining cases, k z ∈ {0.2, 0.4, 0.6, 0.8}, the hexapod’s stability improves, since there is has an average reduction of 18.91% of the median value, and a decrease of the interquartile range. Among the obtained results for the pitch velocity, the robot achieves its stable configuration when k z = 0.8, due to the smallest interquartile range and median value, which corresponds to 0.064 rad/s. Regarding the roll angle, the implementation of k z = 1.0 increases the variation of the angular velocity, which penalizes the robot’s stability (see Fig. 10(c)). However, in the remaining cases, an improvement of the velocity variation is observed, corresponding to a decrease of 30.74% of the median value. In this case study, the smallest variation is observed when k z ∈ {0.2, 0.8}.
A similar strategy is implemented for the analysis of the computational simulations performed considering k z = k β = 0.0 and k $_\alpha$ ∈ {0.0, 0.2, 0.4, 0.6, 0.8, 1.0} (see Fig. 11). Taking the simple control (k $_\alpha$ = 0.0) as a reference, the adjustment of the torso’s pitch orientation does not have a significant influence on the height’s variation (see Fig. 11(a)). However, for the results regarding the angular velocities in the pitch and roll directions, the configuration k $_\alpha$ = 0.6 provides a good improvement in the system’s stability, both in terms of the interquartile range and the median value, which decreases 39.56% and 35.7%, respectively, in the pitch and roll velocities (see Fig. 11(b) and (c)).
Although control of the torso’s roll angle is not important for the tested environment, the computational simulations considering k z = k $_\alpha$ = 0.0 and k β ∈ {0.0, 0.2, 0.4, 0.6, 0.8, 1.0} were also performed. Figure 12 shows the outcome of the computational simulations performed. Similarly to the results presented for k $_\alpha$ , the control of the torso’s roll angle does not have a significant effect on the height variation (see Fig. 12(a)), despite the considerable decrease of the median value when k β ∈ {0.2, 0.6}. Regarding pitch velocity, the interquartile range between configurations is considered identical, which means that there is no improvement in the system’s stability (see Fig. 12(b)). Nonetheless, the minimum median value takes place when k β = 0.4 and corresponds to 0.077 rad/s. In terms of the results for the roll velocity, which is plotted in Fig. 12(c), the variable’s median improves for k β ∈ {0.4, 0.6, 1.0}, which corresponds to a decrease respectively of 14.54%, 2.32%, and 15%. Nonetheless, by analyzing the maximum values and interquartile ranges, it is not possible to conclude that the implementation of k β > 0.0 provides good results for the hexapod’s posture in the ramp environment.
5.2.2. Irregular terrain scenario
In comparison to the study presented to the previous section, a similar approach to the performance of the computational simulations is implemented in the testbed scenario. In this case, it is expected to observe a higher instability of the torso due to the terrain irregularities. The first analysis takes into account that k $_\alpha$ = k β = 0.0 and k z ∈ {0.0, 0.2, 0.4, 0.6, 0.8, 1.0}. Figure 13 depicts the outcome of the computational simulations performed. Considering the simple control (k z = 0.0) as a reference for this analysis and observing the interquartile ranges, the implementation of the torso’s height control significantly improves the hexapod robot stability (see Fig. 13(a)). The minimum variation of the results occurs when k z ∈ {0.6, 0.8, 1.0} and the maximum median value corresponds to 0.107 m, presented when k z = 0.8. Nonetheless, the variation of torso’s angular velocity increases (see Fig. 13(b) and (c)). Without considering k z = 0.2, the average increase of the pitch velocity’s median value corresponds to 66.66%. Regarding the roll velocity, the maximum torso’s instability takes place when k z ∈ {0.2, 0.8}, and the most stable configuration occurs when k z = 0.4. Thus, despite ensuring a more stable height of the torso, the correction of the feet’ relative height increases the variation of the hexapod’s orientation.
Similarly to the ramp, the influence of k $_\alpha$ on the torso posture does not provide significant enhancement in terms of height stability control (see Fig. 14(a)). Considering k $_\alpha$ = 0.0 as a reference and observing the height variation, the optimal configuration corresponds to k $_\alpha$ = 0.4. By observing the results depicted in Fig. 14(b), the control of the torso’s pitch angle decreases the hexapod’s stability. The most unstable configurations take place when k $_\alpha$ ∈ {0.8, 1.0}, which means that the torso cannot have the same inclination as the ground. Nonetheless, if k $_\alpha$ ∈ {0.4, 0.6}, the median roll velocity of the torso decreases, respectively, 8.43% and 16.00%, providing a possible improvement of the system’s stability (see Fig. 14(c)).
The influence of the roll angle control is studied by considering k z = k $_\alpha$ = 0.0 and k β ∈ {0, 0.2, 0.4, 0.6, 0.8, 1.0}. The implementation of this parameter does not have a significant effect on the height variation (see Fig. 15(a)), despite the decrease of 14.85% of the median value when k β = 0.2. The roll control provides good results in terms of the variation of the pitch velocity (see Fig. 15(b)). When k β ∈ {0.2, 0.4} is considered, the median value decreases respectively 20.39% and 38.80%. Additionally, there is a consequent decrease in the interquartile range, which shows evidence that the hexapod’s locomotion is adjusted to the terrain topology. Regarding the roll velocity, the interquartile range is improved when compared to k β = 0.0, except for k β = 0.2. Thus, in comparison to the ramp environment, it is concluded that the roll angle control plays a key role in the hexapod’s stability for more complex scenarios.
5.2.3. Enhanced posture control for the ramp and irregular terrain scenarios
Considering the results obtained in the previous sections, in that follows computational simulations for two demonstrative applications of the designed posture control. In each analysis, the values of k z, k $_\alpha$ , and k β are selected and compared against the outcome of a simple control (k z = k $_\alpha$ = k β = 0.0). For the ramp environment, the control of the torso’s height and pitch orientation has a higher impact on the system’s stability than the roll orientation control. Thus, k β is considered null. Considering the height stability, the value of k z which presents the most stable results for the height variation also has a negative influence on the torso’s angular velocities. Thus, the ideal value for k z is 0.8. Regarding the pitch orientation, k $_\alpha$ does not influence the height displacement. This parameter is selected according to its impact on the torso’s orientation. Among the collected data, k $_\alpha$ = 0.6 provides good results for both the pitch and roll velocities. Therefore, the final configuration of the control strategy for the ramp scenario is defined as k z = 0.8, k $_\alpha$ = 0.6, and k β = 0. Figure 16 presents the performed computational simulations. Overall, the torso’s posture and stability improved when compared to the locomotion with simple control. The height’s median increased by 60.77% and the interquartile range significantly reduced, which means that the hexapod had a similar height throughout the entire simulation (see Fig. 16(a)). The implementation of the proposed control strategy caused a reduction of 11.92% and 35.98%, respectively, of the median of the pitch and roll angular velocities (see Fig. 16(b) and (c)). Therefore, the angular displacement of the torso decreased, and the gait can be considered optimized.
In the irregular terrain environment, the selection of the control parameters takes into account that the hexapod robot must have a stable height to overcome the terrain. Bearing that in mind, the value of k z is selected regardless of its influence on the torso’s angular velocities. Thus, the adequate value for the height adjustment’s control parameter is 0.6. The value of k $_\alpha$ does not affect the variation of the height and pitch velocity. Nonetheless, k $_\alpha$ is set to 0.4. In opposite to the ramp scenario, roll control is relevant for ensuring the correct adaptation of the hexapod’s gait to the terrain. The variable k β is set to 0.4 due to the stability improvement for all variables. The obtained results are presented in Fig. 17. The proposed control shows a different behavior in terms of the control of the torso’s orientation due to the terrain irregularities. When compared against a simple control, the height variation drastically reduced, and the median raised from 0.03 to 0.01 m (see Fig. 17(a)). Nonetheless, the results for the angular velocities were a problem (see Fig. 17(b) and (c)). For the pitch velocity, there is an increase of 54.33% in the median value, and the roll velocity’s median is 82.16% higher. Despite the adjustments of the control strategy, the terrain irregularity causes a higher variation of the torso’s position due to the variation of the surface’s position. With the simple control, the torso collided with the ground due to an insufficient height. On the contrary, with the developed posture the torso had a collision-free navigation. Bearing that in mind, it can be concluded that with posture control, the hexapod is less prone to collide with the terrain, and thus the posture becomes stable.
Considering that the physical prototype of the hexapod robot is currently under development, and it is not possible to examine the designed control method in real-world conditions, the posture control validation follows the Zero-Moment-Point (ZMP) approach, that is commonly found in the literature [Reference Deng, Xin, Zahng and Mistry52–Reference Asif and Iqbal54]. The presented methodology evaluates the locomotion stability by measuring the distance between the ZMP projection and the edges of the support polygon in each time step. If the ZMP coordinates are close to the polygon’s center, the robot is considered stable. Since the equations of motion of the Gazebo software are modeled at the velocity level, the ZMP cannot be calculated using the linear acceleration of the torso. Thus, for the computational simulations, the ZMP is estimated using the following expression [Reference Deng, Xin, Zahng and Mistry52, Reference You, Fan and Liu53]:
where n represents the number of limbs, f n,i denotes the normal contact force of the ith limb, and $\{x_{i}^{\mathrm{p}},\mathrm{y}_{i}^{\mathrm{p}}\}$ are the relative of each foot. The stability margin is given by [Reference Deng, Xin, Zahng and Mistry52]:
where di represents the distance of the ZMP toward the edges of the support polygon and e denotes the number of edges of the support polygon. The hexapod robot stability improves when the quantity of s ZMP increases. For the posture control validation, the deviation of the ZMP and the support polygon’s center and the stability margin are compared against a simple locomotion control.
In Fig. 18(a), the variance of the displacement between the ZMP and the support polygon’s center is presented for the ramp environment. With the implementation of the enhanced posture control, there is a significant decrease in the interquartile range of the ZMP distance to the polygon’s center, which supports the stability improvement of the locomotion. In comparison to the simple control, the variation of the median quantity is considered negligible. The adjustment of the torso’s pitch and roll angles affects the final coordinates of the feet, which causes the amplitude growth observed in the posture control. In terms of stability margin, the parameter’s median improves, and the data oscillation decreases (see Fig. 18(b)). Subsequently, the ZMP is within the support polygon, and it is considered that the hexapod robot improves its stability with the developed posture control.
In the testbed environment, the terrain topology causes higher locomotion instability when compared to the ramp scenario. The distance between the ZMP and the polygon’s center in each time step is portrayed in Fig. 19(a). Despite the augmentation of torso’s instability regarding the roll orientation, the implementation of the enhanced posture control reduces drastically the variance of the distance between the ZMP and the polygon’s center. The fact that the torso’s position is adjusted to the terrain topology affects the force distribution of each foot, which supports the results observed. Similarly to the ramp environment, the posture control decreases the interquartile range of the stability margin and the median quantity increases. From the two parameters examined, there is a strong improvement in the hexapod robot’s stability.
6. Concluding remarks
This work presents a control approach for the torso’s height and posture of the hexapod ATHENA. The proposed method takes advantage of the system’s kinematic model to estimate the ground plane formed by the limbs in the stance phase. Through the evaluation of the plane’s norm vector, the relative pitch and roll slopes between the ground and the torso are determined for each gait cycle. The control strategy adjusts the torso’s orientation through the adjustment of the limbs’ trajectory in the stance phase, regarding the obtained angular displacement. Besides, the torso’s height is controlled during the swing and stance phases, in order to avoid its collision with the ground. The proposed method considers the hexapod’s standing posture as a reference to adjust the foothold positions of each limb. The method’s feasibility is assessed through several computational simulations performed in the Gazebo software, in which the normal and tangential contact forces are evaluated using Newton’s impact law and Coulomb’s friction law, respectively.
The computational simulations performed in this study are divided into three different cases. In the first studies, the control parameters for the height, pitch, and roll adjustments are studied in a 10-degree ramp and an irregular terrain, respectively. The selected inclinations of the environments are representative and aim at assessing the control strategy in scenarios with an intermediate level of difficulty in terms of the hexapod’s posture changes. For each case, the value of the control parameters is within the range {0.0, 0.2, 0.4, 0.6, 0.8, 1.0}. Since the goal is to achieve optimal locomotion in terms of the torso’s posture and stability, the main body’s relative height and angular velocities are calculated. In the ramp environment, the variation k z causes a significant reduction of the height and posture oscillations, which means that there is an improvement in terms of the torso’s posture. Although the variation of k $_\alpha$ did not have a strong influence on the height stability, when k $_\alpha$ = 0.6 takes place, the torso’s angular velocities achieve their minimum variation. Thus, the hexapod robot achieved an optimal orientation for the terrain inclination. Regarding the studies performed for k β, it can be concluded that the interquartile ranges and median values obtained similar results for all configurations. Therefore, the roll variation does not have a significant influence on the hexapod’s behavior. The same analysis was performed for the testbed environment. In this scenario, the slope variation and the ground irregularities required a more accurate adjustment of the torso’s posture to avoid collisions with the ground. By gathering the obtained results, the adjustment of k z is of paramount importance for the locomotion stability, regardless of the angular velocity displacement. Regarding the torso orientation, the adjustment of k $_\alpha$ increased the variation of the angular velocities, which can be influenced by a higher adjustment of the hexapod’s angular position with the terrain topology. Additionally, the implementation of k β = 0.4 showed a more significant role in the torso stability than in the ramp environment.
Overall, the final computational simulations performed assessed the control methodology considering the optimal values for the control parameters. In the ramp scenario, the control is set to k z = 0.8, k $_\alpha$ = 0.6, and k β = 0.0. By comparing the results against the value obtained with a simple control, both the height and the posture stability have a significant improvement, which means that the torso posture is completely adjusted for the 10-degree ramp. In the irregular terrain, the selected control corresponds to k z = 0.6, k $_\alpha$ = 0.4, and k β = 0.4. In comparison with the ramp, the portrayed results for the testbed scenario provided different responses. Despite the stability improvement in terms of height stability, the variation of the angular velocities increased when compared with a simple control. The increase in the angular velocity is caused by the fact that the estimated pitch and roll angles between the torso and ground are different in each gait cycle, and thus the hexapod’s orientation is variable. Additionally, traversed distance with a simple control was smaller because the foothold positions were not properly adjusted to the terrain topology, and the torso collided with the ground. Thus, the proposed control strategy is considered effective for both tested environments. From examination of the ZMP coordinates, the implementation of the designed control methodology has a positive influence in terms of the hexapod robot’s stability. The adjustment of the feet coordinates with the ground’s inclination improves the force distribution along the supporting limbs, which reduces the displacement between the ZMP and the support polygon’s geometric center. The results obtained for the ZMP stability margin also corroborate the conclusion mentioned above.
The presented work is part of ongoing study; hence, future stages of this research are defined. The proposed methodology will be implemented in the physical prototype of ATHENA, to compare results obtained in real-world conditions with the data gathered by computational simulations. The parametrization of the control system will be analyzed by optimization algorithms, such as Multi-Objective or the Global Optimization methodologies. Despite the problem of implementing the optimized model in real-world conditions, the usage of Reinforcement Learning for selection of the control parameters k z, k $_\alpha$ , and k β is also considered in order to obtain a generalized selection model of the control parameters. A further study concerning the ground plane estimation is also considered, for a higher accuracy of the hexapod’s performance in irregular surfaces.
Author contributions
Conceptualization: J.C., F.R., B.D., G.L., and P.F.; methodology: J.C.; formal analysis: J.C.; investigation: J.C., F.R., B.D., and G.L.; resources: J.C., B.D., and P.F.; data curation: J.C.; writing – original draft preparation: J.C.; writing – review and editing: J.C., F.R., B.D., G.L., and P.F.; visualization: J.C.; supervision: B.D., G.L., and P.F. All authors have read and agreed to the published version of the manuscript.
Financial support
The first author received funding through a doctoral scholarship from the Portuguese Foundation for Science and Technology (FCT) (Grant No. SFRH/BD/145818/2019), with funds from the Portuguese Ministry of Science, Technology and Higher Education and the European Social Fund through the Programa Operacional Regional Norte. This work has been supported by the Portuguese Foundation for Science and Technology, under the national support to RD units grant, with the reference project UIDB/04436/2020 and UIDP/04436/2020.
Competing interests
The authors declare no Competing interests exist.
Ethical approval
Not applicable.