A Robot with Decoupled Mechanical Structure and Adapted State Machine Control for Both Ground and Staircase Situations

: The rapid development of e-commerce makes the last-mile problem more and more prominent. To meet the requirements of such a scenario, this paper proposes a robot with a decoupled mechanical structure. Such a hexapod robot is divided into a chassis frame with a pair of auxiliary wheel-legs for horizontal movement, a tetrapod for vertical movement, and a slide-and-rail mechanism to connect the former two parts. Such a structure is simple and, thus, cost-e ﬃ cient; by managing the horizontal and vertical movements, such a robot can keep the balance and safety of the load in the various operation environments, such as roads, staircases, and even indoor ones. Meanwhile, a state-machine-based controller, which adapts well to the unique structure of the proposed robot, is also proposed, simplifying the sequential control of the robot. A prototype robot with 30-kg load ability was built, and the experimental results prove the validity of the design.


Introduction
With the rise of e-commerce, the last-mile problem of the express delivery industry is particularly prominent [1]. After the online order is completed, it is always expected to be delivered as soon as possible by customers [2]. For solution of the last-mile problem of the express delivery, unattended home delivery can not only reduce the failure rate of the first delivery, but also save delivery time [3]. Currently, robots are gradually replacing humans in various aspects [4]. Therefore, the application of robots to realize unattended delivery is a labor-saving and time-saving solution. Based on this, many scholars proposed a drone-based distribution method to solve the last-mile problem [5][6][7]. Although the drone-based distribution system is considered to be a very effective way, it suffers from many technical and legal problems such as endurance, load, coordination of unmanned aerial vehicles (UAVs), and air traffic control (no-fly zones). Even in densely populated high-rise residential areas, there is no suitable "front door" in high-rise housing to receive deliveries via UAV [8,9]. By contrast, for logistics robots running on the ground, the limit of endurance and load is negligible and, thus, there is no "front door" problem. Therefore, in this context, logistics robots are a more feasible solution to the last-mile problem. Stair-climbing is a key function to satisfy the requirements mentioned in Table 1. Although many scholars proposed a variety of applications of stair-climbing robots in reconnaissance [10,11], emergency [12,13], corridor cleaning [14,15], etc., these robots were designed without considering the capability of stair-climbing with goods. Hence, all of them cannot be applied to unattended delivery.
To meet the above requirements, a humanoid robot is the first option. Digit from Agility Robotics [16], Atlas from Boston Dynamics, and Asimo from Honda are all humanoid robots with excellent performance [17], but the biggest problem is the high complexity of their structure and control system, which also means high costs. Although some scholars proposed a more simplified humanoid robot structure and control strategy [18], the simplified mechanical structure increases the area of its feet, almost occupying the platform of an entire stair during stair-climbing, which impacts people passing on the stairs. Additionally, there are many bionic-legged robots, such as the four-legged [19] and six-legged [20] robots. Although these robots can climb stairs in the fastest and most flexible ways, their movement efficiency on the ground is low, which is not applicable for actual delivery.
Other researchers proposed some stair-climbing robots with new mechanical structures. Reference [21] proposed a quadruped tri-star wheeled stair-climbing robot, and these wheels enable it to move on a flat surface and climb stairs. Nevertheless, such a design also has its shortcomings. Firstly, the tri-star wheels' mobility on the flat ground is worse than that of general wheels. Secondly, the position change of the center of gravity caused by the movement of the tri-star wheels would result in inefficiency, and the goods would be bumped, which influences the safety of the goods. Finally, this kind of design is unable to deal well with stairs of different heights. Therefore, this tri-star wheel is not suitable for unattended delivery.
In addition to the above robots' mechanical structures, tracked and hybrid structures are also effective [22]. For tracked robots, the control is simple, but the edges of the stairs suffer from large stress [23] and might be damaged. Furthermore, the tracked robot's running speed on the ground is not high as that of the wheeled robot [24]. As for the hybrid robots, the wheel-legged robot is preferred. In Reference [25], a wheel-legged robot was proposed, and it was able to balance its own platform at all times during climbing. This function meets the safety requirement of cargo. Nevertheless, its driving wheels are installed at the end of the leg, and this kind of installation applies shear stress on the leg with a driving wheel when the robot is driven horizontally. In particular, when the robot is loaded and operates for a long time, the shear stress would bring unrecoverable damage.
As mentioned above, there is little research on logistics robots which can realize the entire process of express delivery, even home delivery. Therefore, the robot proposed in this paper is designed to have not only mobility on the ground but also omnidirectional mobility indoors. Furthermore, it should also realize stair-climbing and maintain the safety of the goods and the robot itself during stair-climbing. Based on these factors, the wheel-legged robot is an ideal solution. Meanwhile, to overcome the existing shortcomings of wheel-legged robots, this paper proposes a hexapod wheel-legged robot, as shown in Figure 1, whose innovations are as follows: • The hexapod structure is divided into three parts: a tetrapod with electromotive handspikes (EHs), which is used to drive the robot vertically, as well as a chassis frame with a pair of auxiliary wheel-legs and Mecanum wheels, which is used to drive the robot itself horizontally, and the slide-and-rail mechanism, which is used to connect the former two parts; • The chassis with Mecanum wheels not only enables the robot the same mobility as a car on the ground and omnidirectional mobility indoors, but it also helps to realize posture adjustment on the stairs; • Through the proposed decoupled movements and by adopting a simple timing-state-based control strategy, the robot can realize stair-climbing with loads. Moreover, in the process of climbing, the balance of the robot platform can be guaranteed.  The chassis with Mecanum wheels not only enables the robot the same mobility as a car on the ground and omnidirectional mobility indoors, but it also helps to realize posture adjustment on the stairs;  Through the proposed decoupled movements and by adopting a simple timing-state-based control strategy, the robot can realize stair-climbing with loads. Moreover, in the process of climbing, the balance of the robot platform can be guaranteed.

Overview of the Robot's Design
A so-called home delivery is where the robot can deliver goods from the distribution center to the customers' door. When delivering, the road becomes the first operating environment that the robot faces, the second is the staircase, and the third is an indoor one. Therefore, the robot must be able to adapt to these three environments, which must be taken into account in mechanical design. Hence, on the one hand, the robot is based on a chassis installed with four Mecanum wheels which brings great mobility; on the other hand, the horizontal movement and the vertical movement are decoupled in the robot's design to deal with the discontinuity of stairs during stair-climbing. Based on these points, the design of the robot proposed in this paper is shown in Figure 2 and explained below.

Overview of the Robot's Design
A so-called home delivery is where the robot can deliver goods from the distribution center to the customers' door. When delivering, the road becomes the first operating environment that the robot faces, the second is the staircase, and the third is an indoor one. Therefore, the robot must be able to adapt to these three environments, which must be taken into account in mechanical design. Hence, on the one hand, the robot is based on a chassis installed with four Mecanum wheels which brings great mobility; on the other hand, the horizontal movement and the vertical movement are decoupled in the robot's design to deal with the discontinuity of stairs during stair-climbing. Based on these points, the design of the robot proposed in this paper is shown in Figure 2 and explained below. between EH A and EH B, lt, was designed to make the robot able to stand on two adjacent stairs. Meanwhile, with a specific balance algorithm mainly based on the sensor data of a gyroscope, the tetrapod can maintain the balance of the robot platform when the chassis is lifted.

The Slide-and-Rail Mechanism: Connection between the Former Parts
The slide-and-rail mechanism is regarded as a connector between the chassis frame and the tetrapod. The rails are fixed on the top of the chassis frame, while the slides are fixed on the tetrapod. Consequently, the chassis frame and the tetrapod can slide relative to each other. To provide power to the relative slide between them, an auxiliary EH, named EH D, is added (the stereo view of EH D can be seen in Figure 1, see ③ slides-and-rails). The connections A and B of the EH D are fixed on the chassis frame and the tetrapod, respectively, and, through EH D's lengthening and shortening, this relative slide can be realized. This alternating action realized by the relative slide is inspired by human stair-climbing. In view of the fact that people finish stair-climbing by alternating their legs, by alternating the chassis frame and the tetrapod, the robot performs stair-climbing actions. It is worth noting that this alternating action is a little different from a human's, which is elaborated in the next section.

Decomposition and Design of Basic Actions
Based on the mechanical structure of the robot, basic actions can be designed. When the robot is running in different operation environments, by performing an action set combined with some of these basic actions, the robot can handle all challenges from the environment.  When moving on the ground, the robot is driven by a chassis installed with four Mecanum wheels, which are powered by independent motors. At the rear of the chassis frame, a pair of retractable EHs are mirror-symmetrically installed, and two directional wheels are installed at the foot of EH C. This combination of EH C and the wheels is regarded as a pair of auxiliary wheel-legs. When the robot chassis goes across multiple steps on the stairs during the stair-climbing process, the step height difference can be compensated for automatically by the expansion of wheel-legs, which balances the robot platform. It is important to note that the wheel-legs fixed on the chassis frame are auxiliary structures for stair-climbing actions, and they do not power the stair-climbing.

The Tetrapod: Design for Vertical Movement
The tetrapod is the only part used for the vertical movement. In contrast with the wheel-legs fixed on the chassis frame, the legs of the tetrapod are mainly used for stair-climbing. The four legs are EHs (classified as EH A and EH B), and, through a stretching motion, the robot can lift the loaded goods and itself vertically. To ensure that the robot does not fall down on the stairs, the distance between EH A and EH B, l t , was designed to make the robot able to stand on two adjacent stairs. Meanwhile, with a specific balance algorithm mainly based on the sensor data of a gyroscope, the tetrapod can maintain the balance of the robot platform when the chassis is lifted.

The Slide-and-Rail Mechanism: Connection between the Former Parts
The slide-and-rail mechanism is regarded as a connector between the chassis frame and the tetrapod. The rails are fixed on the top of the chassis frame, while the slides are fixed on the tetrapod. Consequently, the chassis frame and the tetrapod can slide relative to each other. To provide power to the relative slide between them, an auxiliary EH, named EH D, is added (the stereo view of EH D can be seen in Figure 1, see 3 slides-and-rails). The connections A and B of the EH D are fixed on the chassis frame and the tetrapod, respectively, and, through EH D's lengthening and shortening, this relative slide can be realized. This alternating action realized by the relative slide is inspired by human stair-climbing. In view of the fact that people finish stair-climbing by alternating their legs, by alternating the chassis frame and the tetrapod, the robot performs stair-climbing actions. It is worth noting that this alternating action is a little different from a human's, which is elaborated in the next section.

Decomposition and Design of Basic Actions
Based on the mechanical structure of the robot, basic actions can be designed. When the robot is running in different operation environments, by performing an action set combined with some of these basic actions, the robot can handle all challenges from the environment.

The Chassis Frame Moving on the Ground
When the robot is running on the ground, two different scenes can be found. Firstly, on the road, the robot is supposed to have the ability to steer flexibly like a car; secondly, for the indoor environment, the robot is required to move omnidirectionally in a narrow space. Therefore, it is necessary to establish an inverse kinematic model of the robot with Mecanum wheels. As shown in Figure 3, these four wheels are denoted as W 1 , W 2 , W 3 , and W 4 , respectively, and, at the center of the chassis, the robot's velocity can be decomposed into the velocities in the horizontal plane, v x and v y , and the speed of rotation, ω. According to Reference [26], the inverse kinematic model of the chassis is as follows: where L is the wheelbase, d is the track, and v ωn (n = 1, 2, 3, 4) is the rotation velocity of the corresponding wheel W n .

The Chassis Frame Moving on the Ground
When the robot is running on the ground, two different scenes can be found. Firstly, on the road, the robot is supposed to have the ability to steer flexibly like a car; secondly, for the indoor environment, the robot is required to move omnidirectionally in a narrow space. Therefore, it is necessary to establish an inverse kinematic model of the robot with Mecanum wheels. As shown in Figure 3, these four wheels are denoted as W1, W2, W3, and W4, respectively, and, at the center of the chassis, the robot's velocity can be decomposed into the velocities in the horizontal plane, vx and vy, and the speed of rotation, ω. According to Reference [26], the inverse kinematic model of the chassis is as follows: where L is the wheelbase, d is the track, and vωn (n = 1, 2, 3, 4) is the rotation velocity of the corresponding wheel Wn. As shown in Table 2, according to the specific movement requirements in different scenes, vωn can be obtained by substituting vx, vy, and ω into Equation (1). ωsteering is the steering speed of the robot, and v is the longitudinal velocity of the robot.  As shown in Table 2, according to the specific movement requirements in different scenes, v ωn can be obtained by substituting v x , v y , and ω into Equation (1). ω steering is the steering speed of the robot, and v is the longitudinal velocity of the robot. Table 2. Moving models in different scenes.

Description of Scenes Velocities
On the road: Car-like movement with longitudinal velocity and steering speed v x = 0, v y = v, ω ∝ ω steering Indoors: Omnidirectional movement No limit Spot steering: Rotation around the center of the robot's chassis until it is perpendicular to the stairs v x = 0, v y = 0, ω ∝ ω steering

Basic Actions on Stairs
As mentioned before, the stair-climbing motion is inspired by humans' alternating action. However, the alternating action is a combination of a series of basic actions. To realize stair-climbing, four cases of moving upstairs are illustrated in detail as examples, shown in Figure 4, and they are explained below. For the stairs, the width and the height of the step are indicated as w and h, respectively.
Appl. Sci. 2019, 9, x FOR PEER REVIEW 6 of 17 explained below. For the stairs, the width and the height of the step are indicated as w and h, respectively. Case I: The two front Mecanum wheels are close to the step, and the robot cannot go forward (see Case I(a)). Therefore, to continue the stair-climbing process, as shown in Case I(b), EH A and EH B on the tetrapod start stretching (action 1), lifting the robot up until the button of the front wheels and the wheel-legs is higher than the upper step. Then, the chassis frame slides forward until the front Mecanum wheels and the wheel-legs reach their new step (action 2). As shown in Case I(c), EH A and EH B start shortening (action 3), leaving the wheel-legs to keep the balance of the chassis frame (action 4).
Case II: In this case, both front Mecanum wheels and/or the wheel-legs are close to the step. The actions are almost the same as those in Case I, except some preconditions are different. These preconditions are further discussed in the next section.  Case III: The front Mecanum wheels still have space to move forward until they are close to the step (action 1). However, EH A cannot touch the upper step; thus, the tetrapod slides forward along the rails (action 2). Finally, EH A and EH B on the tetrapod start stretching (action 3).
Case IV: In this case, only the wheel-legs are close to the step. Therefore, the wheel-legs (also EH C) are shortened by h. If there is still a step in front of the wheel-legs, the robot needs to firstly deal with it as described for Case II. Then, after the tetrapod is ready, the wheel-legs start shortening (action I), and the chassis frame slides forward (action 2). Finally, EH A and EH B are shortened so that the four Mecanum wheels land.
The process of moving downstairs is basically the inverse process of moving upstairs. In other words, the execution sequence of each case above starts from (c) and ends with (a), and the movement direction is also inversed. However, to avoid the risk of falling down, the detection of being "close to the step" when going upstairs is changed to the detection of being "close to the edge of the step". Every time the robot's front and rear ends are close to the edge of the step, the robot must stop moving using the wheels immediately. Then, the tetrapod helps the chassis frame to land on the lower step safely. In a similar manner, the basic actions of moving downstairs can also be established, which can be denoted as Case I', Case II', Case III', and Case IV'.
By combining the aforementioned cases according to the different preconditions, the stairs with different steps can be dealt with. The preconditions and the combinations are discussed in the next section.

Posture Adjustment for Stair-Climbing
Due to the accumulated error from the motion and sensors during climbing, the robot's orientation would be not perpendicular to the stairs, especially when the staircase has a large number of steps. A posture adjustment is, thus, required [15,27,28]. As shown in Figure 5, two cases can be found, which are analyzed below. Case 1: As shown in Figure 5a, before the robot starts to climb, the robot's four Mecanum wheels are on the ground; thus, the control model is no different from the model in Section 3.1. In other words, the rotating velocity of each wheel vωn can be obtained by substituting vx = vy = 0 and ω = ωad1 into Equation (1), where ωad1 is the rotation velocity of the robot when adjusting pose. Then, the robot rotates around the center of the robot's chassis with a radius of R1 until it is perpendicular to the stairs.
Case 2: As shown in Figure 5b, the robot is on the stair; thus, the rear two Mecanum wheels float, and the front two Mecanum wheels and EH C support the robot platform. In order to use a similar Equation (1), where ω ad1 is the rotation velocity of the robot when adjusting pose. Then, the robot rotates around the center of the robot's chassis with a radius of R 1 until it is perpendicular to the stairs.
Case 2: As shown in Figure 5b, the robot is on the stair; thus, the rear two Mecanum wheels float, and the front two Mecanum wheels and EH C support the robot platform. In order to use a similar control model to Equation (1) to simplify the control, an elegant method is adopted. That is, the wheelbase L is replaced by L , the distance between the center of the two front Mecanum wheels and the center of the two wheel-legs. Then, the inverse kinematic model of the chassis would be the same as that in Equation (1), where only the former two equations are reserved.
where L is twice the distance between the center of the front wheel and the new rotation center in Figure 5b in the y-direction, and ω ad2 is the rotation velocity of the robot when adjusting pose in this case. According to Equation (2), by substituting v x = v y = 0, the rotation speed of the front two Mecanum wheels can be obtained. In other words, the front two Mecanum wheels are driven by treating the rear two directional wheels as central with a radius R 2 .

State Machine for the Robot
Based on the basic actions designed in Section 3, a state machine is further proposed to manage the robot's movement in this section. Each state in the state machine can be defined as a class with a property (the data of the corresponding sensors) and method (basic actions), which can be easily realized with an object-oriented language.

The Sensors for State Machine
Before analyzing the states of the state machine, the "properties" of the states should be obtained by the sensors installed on the robot. These "properties" are used to determine which "method" should be executed. All the sensors installed in our robot and their details are summarized in Table 3, and the sensors' detailed descriptions are listed below (note that "L" in variable subscript of Table 3 indicates left, while the "R" indicates right). Four encoders of the Mecanum wheels: For the mode on the ground, the precise rotational speed of every Mecanum wheel and displacement of the robot are controlled and measured; thus, an encoder is installed on each Mecanum wheel to measure the rotation in a small fixed interval.

•
Encoders embedded in the EHs: When climbing a staircase, the robot's chassis frame not only needs to move a specific distance forward, but all the EHs (including the EHs on the tetrapod, the chassis frame, and the slide-and-rail mechanism) also need to shorten and lengthen by a specific length. Therefore, in the same way as the encoders of the Mecanum wheels, an encoder is embedded for each EH to measure the absolute length; • Laser ranging sensors: On the one hand, for the stair-climbing action, laser ranging sensors are required to detect how close the front two Mecanum wheels are to the upper step, and their data are used as the trigger conditions for the stair-climbing actions; the same sensors are also required for the wheel-legs. On the other hand, for the action of moving downstairs, laser ranging sensors are required to detect if the two ends of the robot are close to the edge of the step; thus, they are installed on the two ends of the robot, and their directions are both downward.

State Machine Design
The overall state machine is given in Figure 6. To allow the states in the state machine to be transferred as desired, the switch conditions (SCs) should be designed based on the feedback of the sensors, and the details of such SCs are given in Table 4.

State Machine Design
The overall state machine is given in Figure 6. To allow the states in the state machine to be transferred as desired, the switch conditions (SCs) should be designed based on the feedback of the sensors, and the details of such SCs are given in Table 4.  In Table 4, Δdad and Δdup are the distance constraints that are set up according to the experiments. Based on the SCs, the robot can be switched between different modes defined in Section 3 by using the state machine shown in Figure 6, and the operations of such a state machine are briefly described as follows:  When the robot gets the start signal, it firstly operates in the ground mode, unless SC2 is met. In ground mode, the function of path planning and obstacle avoidance is enabled, and, since these issues are not the topic of this paper, they are not discussed;  In Table 4, ∆d ad and ∆d up are the distance constraints that are set up according to the experiments. Based on the SCs, the robot can be switched between different modes defined in Section 3 by using the state machine shown in Figure 6, and the operations of such a state machine are briefly described as follows: • When the robot gets the start signal, it firstly operates in the ground mode, unless SC2 is met. In ground mode, the function of path planning and obstacle avoidance is enabled, and, since these issues are not the topic of this paper, they are not discussed; • When the SC2 is met, the state machine goes to Case 1; thus, the robot adjusts its pose. After finishing the posture adjustment, the robot's front wheels are close to the stairs, allowing the tetrapod to land on the ground to prepare for the chassis frame stepping up on the upper stair; then, SC7 is triggered; • Once SC7 is triggered, the state machine goes to Case III and begins to climb the stair. Then, the robot switches to one case of Case 1, Case 2, or Case 4 according to the SCs; • Specifically, after Case I is finished, SC3 is used to check the posture of the robot. Once SC3 is trigged, the state machine goes to Case 2; thus, the robot undergoes posture adjustment on the stair. It is worth mentioning that the posture adjustment is executed only when the error of the motion is accumulated to a certain value; • If the state marching is in Case IV, this implies that the robot is almost on the ground again. Once SC1 is triggered, the state machine turns to ground mode. In our design, the robot is allowed to be turned off only when the robot is in ground mode to avoid the risk of staying on the stair.
Based on the state machine, the robot can finish climbing any number of steps. The state machine of moving downstairs can also be established using Case 1 , Case 2 , Case I , Case II , Case III , and Case IV , as shown in Figure 7. The state flow can be analyzed in a similar manner; thus, the details are not repeated here.
Appl. Sci. 2019, 9, x FOR PEER REVIEW 10 of 17  When the SC2 is met, the state machine goes to Case 1; thus, the robot adjusts its pose. After finishing the posture adjustment, the robot's front wheels are close to the stairs, allowing the tetrapod to land on the ground to prepare for the chassis frame stepping up on the upper stair; then, SC7 is triggered;  Once SC7 is triggered, the state machine goes to Case III and begins to climb the stair. Then, the robot switches to one case of Case 1, Case 2, or Case 4 according to the SCs;  Specifically, after Case I is finished, SC3 is used to check the posture of the robot. Once SC3 is trigged, the state machine goes to Case 2; thus, the robot undergoes posture adjustment on the stair. It is worth mentioning that the posture adjustment is executed only when the error of the motion is accumulated to a certain value;  If the state marching is in Case IV, this implies that the robot is almost on the ground again. Once SC1 is triggered, the state machine turns to ground mode. In our design, the robot is allowed to be turned off only when the robot is in ground mode to avoid the risk of staying on the stair.
Based on the state machine, the robot can finish climbing any number of steps. The state machine of moving downstairs can also be established using Case 1′, Case 2′, Case I′, Case II′, Case III′, and Case IV′, as shown in Figure 7. The state flow can be analyzed in a similar manner; thus, the details are not repeated here.

Time Cost for Stair-Climbing
The motion during stair-climbing can be illustrated as shown in Figure 8. Since the stairs have distances in two directions, namely, the horizontal direction y and the vertical direction z, the side view of the stairs can be depicted as shown in Figure 8a. The contact point between the front wheel and the ground is the origin of the coordinate, and the stairs are assumed to be of uniform width w and height h. To better express the process of climbing stairs, the position-time plots in the horizontal and vertical directions are given, as shown in Figures 8b,c, respectively. Furthermore, the z(t)-axis of graph (b) is aligned with the z-axis of graph (a), and the y(t)-axis of graph (c) is aligned with the yaxis of graph (a) to show a clear positional relationship. Hence, with a t-axis, the change of the robot's position on the stairs can be shown directly. Thus, the robot's horizontal velocity vy and vertical velocity vz are constant values, as shown in Figure 8d. Then, the time to climb one stair is calculated as follows:

Time Cost for Stair-Climbing
The motion during stair-climbing can be illustrated as shown in Figure 8. Since the stairs have distances in two directions, namely, the horizontal direction y and the vertical direction z, the side view of the stairs can be depicted as shown in Figure 8a. The contact point between the front wheel and the ground is the origin of the coordinate, and the stairs are assumed to be of uniform width w and height h. To better express the process of climbing stairs, the position-time plots in the horizontal and vertical directions are given, as shown in Figure 8b,c, respectively. Furthermore, the z(t)-axis of graph (b) is aligned with the z-axis of graph (a), and the y(t)-axis of graph (c) is aligned with the y-axis of graph (a) to show a clear positional relationship. Hence, with a t-axis, the change of the robot's position on the stairs can be shown directly. Thus, the robot's horizontal velocity v y and vertical velocity v z are constant values, as shown in Figure 8d. Then, the time to climb one stair is calculated as follows: where Appl. Sci. 2019, 9, x FOR PEER REVIEW 11 of 17 where / y y For a stair with n steps, the distances in y and z are described as follows:

nT nv T nT t nT T n N y nv T nT T t n T n N
For Equations (4) and (5), on the one hand, they are established without considering the time spent for the posture adjustment; on the other hand, in the practical design, both vy and vz depend on the EH power, and the power should be determined from the trade-off between the speed and the stability of stair-climbing. According to Equations (4) and (5), the relationship between n steps and the number of stair-climbing action cycles can be obtained, as shown in Table 5. Table 5. The relationship between n steps and the number of stair-climbing action cycles.

Stair Steps
Number of Stair-Climbing Action Cycles 1 step 2 2 steps 4 3 steps 5 4 steps 6 n steps n + 2 For a stair with n steps, the distances in y and z are described as follows:

Prototype Design
For Equations (4) and (5), on the one hand, they are established without considering the time spent for the posture adjustment; on the other hand, in the practical design, both v y and v z depend on the EH power, and the power should be determined from the trade-off between the speed and the stability of stair-climbing. According to Equations (4) and (5), the relationship between n steps and the number of stair-climbing action cycles can be obtained, as shown in Table 5. Table 5. The relationship between n steps and the number of stair-climbing action cycles.

Prototype Design
In order to verify the validity of the design, a prototype with 30-kg load ability was built, as shown in Figure 9. To apply our robot for delivery, the robot had functions of object recognition, automatic navigation, and so on, which enabled it to be operated in the right way. However, these functions are not the focus of this paper; thus, they are not discussed here. For the design of the robot, there were three key points, described below.
Appl. Sci. 2019, 9, x FOR PEER REVIEW 12 of 17 In order to verify the validity of the design, a prototype with 30-kg load ability was built, as shown in Figure 9. To apply our robot for delivery, the robot had functions of object recognition, automatic navigation, and so on, which enabled it to be operated in the right way. However, these functions are not thedesign of the robot, there were three key points, described below.
(a) (b) Figure 9. The prototype of the robot: (a) without a shell; (b) with a shell.

The Size of the Mecanum Wheels
For the chassis of the robot, on the one hand, the Mecanum wheels should have enough load capacity to carry goods; on the other hand, these wheels should not only be able to overcome speed bumps, but also adapt to the narrow space on the stair surface. Therefore, the diameter of the Mecanum wheels, dwheel, should meet the condition 2hmax < dwheel < wmin, where hmax is the maximal height of the speed bumps, and wmin is the minimal width of the stairs. According to the Chinese standard [29,30], the diameter of our robot's Mecanum wheels was finally chosen as 12.5 cm.

The Elongation of the EHs
According to the basic action in Section 3, during stair-climbing, the maximal elongation of each EH should be a little bigger than 2h. According to Reference [30], h < 200 mm should be satisfied; thus, the designed elongation Δlmax was chosen as 400 mm.

The Elongation of the EHs
Similarly, according to Reference [30], to allow the robot to adapt to more staircases with different width, as shown in Figure 10, the robot was designed to adapt to staircases with widths between 280 mm and 340 mm. According to the analysis in Section 3, the robot's capability of climbing the stairs with different widths depends on the two extreme cases shown in Table 6, where Δlslide is the distance of the relative slide, and it is determined to ensure the robot's success in climbing to the upper step under the premise of the stability of the center of gravity of the robot.

The Size of the Mecanum Wheels
For the chassis of the robot, on the one hand, the Mecanum wheels should have enough load capacity to carry goods; on the other hand, these wheels should not only be able to overcome speed bumps, but also adapt to the narrow space on the stair surface. Therefore, the diameter of the Mecanum wheels, d wheel , should meet the condition 2h max < d wheel < w min , where h max is the maximal height of the speed bumps, and w min is the minimal width of the stairs. According to the Chinese standard [29,30], the diameter of our robot's Mecanum wheels was finally chosen as 12.5 cm.

The Elongation of the EHs
According to the basic action in Section 3, during stair-climbing, the maximal elongation of each EH should be a little bigger than 2h. According to Reference [30], h < 200 mm should be satisfied; thus, the designed elongation ∆l max was chosen as 400 mm.

The Elongation of the EHs
Similarly, according to Reference [30], to allow the robot to adapt to more staircases with different width, as shown in Figure 10, the robot was designed to adapt to staircases with widths between 280 mm and 340 mm. According to the analysis in Section 3, the robot's capability of climbing the stairs with different widths depends on the two extreme cases shown in Table 6, where ∆l slide is the distance of the relative slide, and it is determined to ensure the robot's success in climbing to the upper step under the premise of the stability of the center of gravity of the robot.

Experimental Results
To implement the stair-climbing experiment for our robot, an outdoor staircase was chosen. Its width was 33 cm, and its height was 14 cm. The results are listed in Table 7, and the process is recorded in Figure 11. It can be seen that the robot could implement all the designed actions. It could adjust its posture if necessary (see the subfigures in which C-1 and C-2 are highlighted, where "C" denotes the abbreviation of "Case"), and it could climb up a four-step staircase successfully by choosing the four states (see the subfigures in which C-I, C-II, C-III, and C-IV are highlighted).

Experimental Results
To implement the stair-climbing experiment for our robot, an outdoor staircase was chosen. Its width was 33 cm, and its height was 14 cm. The results are listed in Table 7, and the process is recorded in Figure 11. It can be seen that the robot could implement all the designed actions. It could adjust its posture if necessary (see the subfigures in which C-1 and C-2 are highlighted, where "C" denotes the abbreviation of "Case"), and it could climb up a four-step staircase successfully by choosing the four states (see the subfigures in which C-I, C-II, C-III, and C-IV are highlighted). denotes the abbreviation of "Case"), and it could climb up a four-step staircase successfully by choosing the four states (see the subfigures in which C-I, C-II, C-III, and C-IV are highlighted).  Figure 11. The process of stair-climbing. Ground Mode: the mode that robot operates on the ground; Case 1: posture adjustment before climbing; Case 2: posture adjustment on stairs; Case I: the actions Figure 11. The process of stair-climbing. Ground Mode: the mode that robot operates on the ground; Case 1: posture adjustment before climbing; Case 2: posture adjustment on stairs; Case I: the actions when the front wheels are close to the step; Case II: the actions when the front wheels and/or the wheel-legs are close to the step; Case III: the actions when the EH A cannot touch the upper step; Case IV: the actions when only the wheel-legs are close to the step.

Conclusions
According to the results of the experiment, the proposed robot can realize stair-climbing stably. Meanwhile, the figure of the climbing process shows the decoupled structure and actions. Combined with the novel design of the mechanical structure, the proposed state machine allows simple control of the robot, even for complicated tasks, such as stair-climbing or omnidirectional movement indoors. Furthermore, during stair-climbing, the robot can maintain the balance of its platform, which meets the requirements of safe delivery mentioned in Section 1. Hence, it can realize real unmanned delivery, even home delivery. Furthermore, it can also be applied for emergencies and wheelchairs; however, the speed of stair-climbing would be a key requirement. Therefore, improving the speed of stair-climbing under the premise of the robot's safety will be addressed in our future work.

Patents
The design was patented and published by the Chinese State Patent Office (publication numbers ZL201822109903X and CN109515546A).