<<

Article A Hexapod with Non-Collocated Actuators

Min-Chan Hwang *, Chiou-Jye Huang ID and Feifei Liu

School of Electrical Engineering and , Jiangxi University of Science and Technology, No. 86, Hongqi Road, Ganzhou 341000, China; [email protected] (C.-J.H.); [email protected] (F.L.) * Correspondence: [email protected]; Tel.: +86-177-7075-4280

 Received: 8 April 2018; Accepted: 12 June 2018; Published: 25 June 2018 

Abstract: The primary issue in developing hexapod is generating legged motion without tumbling. However, when the hexapod is designed with collocated actuators, where each joint is directly mounted with an actuator, the number of actuators is usually high. The adverse effects of using a great number of actuators include the rise in the challenge of algorithms to control legged motion, the decline in loading capacity, and the increase in the cost of construction. In order to alleviate these problems, we propose a hexapod robot design with non-collocated actuators which is achieved through mechanisms. This hexapod robot is reliable and robust which, because of its mechanism-generated (as opposed to computer-generated) tripod gaits, is always is statically stable, even if running out of battery or due to electronic failure.

Keywords: hexapod; mechanism; non-collocated

1. Introduction Wheeled robots can efficiently move on flat surfaces, but they become ineffective as soon as they encounter rough and uneven environments, which comprise the majority of the Earth’s surface. For such terrains, legged robots simply always outperform wheeled robots. Hence, the development of a is motivated by the need to maneuver over rough terrains for outdoor activities. The challenge of developing a legged robot lies in one primary fact: how to generate the legged motion without tumbling. In 1968, McGhee and Frank [1,2] proposed the center of gravity projection (COG) method, where the legged robot is statically stable if the horizontal projection of its COG lies inside the support polygon, defined as the convex polygon formed by connecting footprints. Orin [3] proposed a generalized COG in 1976 called the COP (center of pressure) method, wherein a robot is dynamically stable if the projection of the COG along the direction of the resultant force acting on the COG lies inside the support polygon. A variety of legged robots, including quadruped, hexapod, and octopod robots commonly practice the above methods [4–6]. On the other hand, bipedal robots favor the ZMP (zero moment point) method, first defined by Vukabratovic and Juricic [7,8] in 1969, stating that a robot is stable if the moment about the COP at its supporting foot is zero. Meanwhile, two distinct methodologies evolved and were later introduced into — that is, fuzzy theories and neural networks. Fuzzy theories [9–11] address the imprecision of systems by defining the fuzzy numbers or fuzzy sets that can be expressed in linguistic terms. For instance, the technology for finding the best value of foot acceleration for a given trajectory can be achieved by using a very simple Mamdani fuzzy inference system [12]. Once the foot acceleration function has been obtained, the real-time implementation of the fuzzy reasoning process can be optimized [13,14]. Neural networks [15–17] are able to represent complex nonlinear relationships and are good at classifying patterns into preselected categories used in the training process. One important observation from neuroscience is that the CPG (central pattern generator) [18,19] located in the spinal cord is an autonomous device generating rhythmic behaviors such as locomotion, requiring neither peripheral

Appl. Syst. Innov. 2018, 1, 20; doi:10.3390/asi1030020 www.mdpi.com/journal/asi Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 2 of 15 Appl. Syst. Innov. 2018, 1, 20 2 of 15 spinal cord is an autonomous device generating rhythmic behaviors such as locomotion, requiring neither peripheral sensor feedback nor the regulation command from the brain-stem. Hybrid sensorschemes feedback using noreither the regulationfuzzy controllers command or from neur theal brain-stem.networks to Hybrid implement schemes bionic using eithercontrol fuzzy are controllersappealing, and or neural have been networks conducted to implement extensively bionic in many control articles are appealing, (e.g., [20–27]). and have been conducted extensivelyWe found in many that all articles of the (e.g., legged [20 robots–27]). under discussion are designed with collocated actuators. That Weis, each found joint that is all mounted of the legged with an robots actuator under so discussionthat the number are designed of actuators with collocatedis usually high. actuators. The Thatadverse is, effects each joint of using is mounted a great numb wither an of actuator actuators so include that the increasing number the of actuatorschallenge of is algorithms usually high. to Thecontrol adverse legged effects motions, of using degrading a great number the loading of actuators capacity, include and raising increasing the thecost challenge of construction. of algorithms This toinspired control us legged to overcome motions, these degrading weaknesses the before loading resorting capacity, to other and raisingtechniques. the costHence, of construction.we designed Thisan innovative inspired mechanism us to overcome to lessen these the weaknessesnumber of actuators. before resorting Since stable to other tripod techniques. gaits are generated Hence, weby designedmechanism an instead innovative of computer, mechanism a togreat lessen amount the number of computing of actuators. resources Since stablecan be tripod released gaits and are generateddiverted to by engineering mechanism insteadapplications. of computer, In this apape greatr, amount we will of briefly computing discuss resources some candesign be released issues, andelaborate diverted the tomechanism engineering of applications.reducing the Innumber this paper, of actuators, we will brieflyestablish discuss the mathematical some design model, issues, elaborateand introduce the mechanismthe relevant ofhardware reducing as the well number as software. of actuators, establish the mathematical model, and introduce the relevant hardware as well as software. 2. Design Issues 2. Design Issues Determining how to build a robot is somewhat mundane. Nevertheless, it is sufficiently Determining how to build a robot is somewhat mundane. Nevertheless, it is sufficiently nontrivial and in fact sophisticated that we must have a design mechanism, select materials, nontrivial and in fact sophisticated that we must have a design mechanism, select materials, determine component sizes, make engineering drawings as shown in Figure 1, machine all of the determine component sizes, make engineering drawings as shown in Figure1, machine all of parts, and assemble them into a robot as shown in Figure 2, where the size of the robot is about 712 the parts, and assemble them into a robot as shown in Figure2, where the size of the robot is about mm × 641 mm × 189 mm and the size of its main body is 382 mm × 222 mm × 134 mm when six legs 712 mm × 641 mm × 189 mm and the size of its main body is 382 mm × 222 mm × 134 mm when are detached. Figure 1 shows that there are only three motors required by this hexapod (i.e., bottom six legs are detached. Figure1 shows that there are only three motors required by this hexapod (i.e., motor, upper motor, and swivel motor). Although ball bearings are better than porous metal bottom motor, upper motor, and swivel motor). Although ball bearings are better than porous metal bearings in terms of overall performance, they require more space in their housing and more bearings in terms of overall performance, they require more space in their housing and more material material to construct. In order to achieve a light-weight design, the structure is made of lighter to construct. In order to achieve a light-weight design, the structure is made of lighter aluminum aluminum AT6061T6 and porous metal bearings. AT6061T6 and porous metal bearings.

Figure 1. Visualization of components.

Figure 2. Completed hexapod robot.

The servos used in the hobby radio control (RC) market for controlling model airplanes, cars, The servos used in the hobby radio control (RC) market for controlling model airplanes, cars, and boats are also frequently used in robots. The servos that are good for light-weight application and boats are alsoalso frequentlyfrequently usedused inin robots.robots. The servosservos thatthat areare goodgood forfor light-weightlight-weight application

Appl. Syst. Innov. 2018, 1, 20 3 of 15 Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 3 of 15 Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 3 of 15 have threethree wires:wires: two two for for power power (red) (red) and and ground ground (black), (black), and theandthird the third for control for control (yellow), (yellow), as shown as have three wires: two for power (red) and ground (black), and the third for control (yellow), as inshown Figure in3 a.Figure The signal 3(a). isThe generally signal ais variable-width generally a pulse.variable-width The neutral pulse. position The correspondedneutral position to shown in Figure 3(a). The signal is generally a variable-width pulse. The neutral position acorresponded pulse of about to a 1.5 pulse ms, of sent about at 1.5 intervals ms, sent of at 20 inte ms.rvals The of servo 20 ms. HS-5645MG The servo HS-5645MG used in [28 used] with in size [29] corresponded to a pulse of about 1.5 ms, sent at intervals of 20 ms. The servo HS-5645MG used in [29] 40.39with size mm 40.39× 19.56 mm mm × 19.56× 37.59 mm mm × possesses37.59 mm apossesse stalled torques a stalled of 12 torque kg-cm. of In 12 order kg-cm. to improveIn order the to with size 40.39 mm × 19.56 mm × 37.59 mm possesses a stalled torque of 12 kg-cm. In order to loadingimprove capacity, the loading we replaced capacity, those we RCreplaced servos those with powerful RC servos motors, with producedpowerful bymotors, Shayang produced Ye Co. Ltd.by improve the loading capacity, we replaced those RC servos with powerful motors, produced by withShayang serial Ye number Co. Ltd. IG300264-SY2979, with serial number rated IG3002 torque64-SY2979, 110 g-cm, rated rated torque speed 110 5950 g-cm, rpm, rated each speed of them5950 Shayang Ye Co. Ltd. with serial number IG300264-SY2979, rated torque 110 g-cm, rated speed 5950 mountedrpm, each withof them a gear mounted train (reduction with a gear ratio train 1:264) (reduc andtion encoder ratio 1:264) (7 ppr). and In encoder Figure 3(7b, ppr). the motor In Figure we rpm, each of them mounted with a gear train (reduction ratio 1:264) and encoder (7 ppr). In Figure chose3(b), the with motor size we∅30 chose× 102 with mm size can generate∅30 × 102 a mm stalled can torque generate of approximately a stalled torque 29 of kg-cm, approximately obtained by29 3(b), the motor we chose with size ∅30 × 102 mm can generate a stalled torque of approximately 29 multiplyingkg-cm, obtained its rated by multiplying torque 110 its g-cm rated with torque the ratio 110 ofg-cm reduction with the gear ratio 264. of Thereduction swivel gear motor 264. was The a kg-cm, obtained by multiplying its rated torque 110 g-cm with the ratio of reduction gear 264. The J-typeswivel motormotor withwas seriala J-type number motor DME34J500B.with serial number DME34J500B. swivel motor was a J-type motor with serial number DME34J500B.

(a) (b) (a) (b) Figure 3. Two types of actuators: (a)a RC servos; (bb) DC motor with gear train and encoder. Figure 3. TwoTwo types of actuators: (a) ( ) RC servos; (b ( )) DC DC motor motor with gear train and encoder.

The closed control system of this robot was configured as shown in Figure 4, where ,, The closed control system of this robot waswas configuredconfigured asas shownshown inin FigureFigure4 4,, where where θ, ,θ ,,θ stand for the outputs of the bottom, upper, and swivel motors after reduction gears, accordingly.1 2 3 stand for the outputs of the bottom, upper, upper, and and sw swivelivel motors motors after after reduction reduction gears, gears, accordingly. accordingly. The encoders attached with motors were the feedback sensors for the inner loop. Those incremental The encoders attached with motors were the feedbackfeedback sensors for the inner loop. Those incremental encoders are vulnerable to accumulation errors and are unable to identify the initial states encoders areare vulnerable vulnerable to accumulationto accumulation errors errors and are and unable are tounable identify to the identify initial states the wheneverinitial states the whenever the system is restarted, hence proximity, LJ12A3-4-Z/BY, and microswitch sensors wheneversystem is restarted, the system hence is proximity, restarted, LJ12A3-4-Z/BY, hence proximity, and microswitchLJ12A3-4-Z/BY, sensors and assisted microswitch for initialization sensors assisted for initialization and calibration. Besides, the purpose of using microswitches was to limit assistedand calibration. for initialization Besides, theand purpose calibration. of using Besides, microswitches the purpose was of tousing limit microswitches the operation ofwas the to swivel limit the operation of the swivel motor within a safety zone. The L298 N drivers were the H-bridges in themotor operation within aof safety the swivel zone. motor The L298 within N driversa safety were zone. the The H-bridges L298 N drivers in the form were of the ICs H-bridges (integrated in the form of ICs (integrated circuits) with rated current 2 A and rated power 25 W. thecircuits) form withof ICs rated (integrated current circuits) 2 A and ratedwith rated power current 25 W. 2 A and rated power 25 W.

Figure 4. Closed control system. Figure 4. Closed control system. 3. Mechanism 3. Mechanism The robot is divided into three modules: an upper deck, a bottom deck, and a swivel to connect The robot is divided into three modules: an upper deck, a bottom deck, and a swivel to connect both Theof them robot (Figure is divided 5), intowhere three both modules: of decks an possess upper deck,the same a bottom components deck, and except a swivel their to legs connect are both of them (Figure 5), where both of decks possess the same components except their legs are bothmounted of them in opposite (Figure orientations,5), where both not of only decks saving possess one half the of same the time components in drawing except but also their benefiting legs are mounted in opposite orientations, not only saving one half of the time in drawing but also benefiting mountedmanufacture in opposite and maintenance. orientations, not only saving one half of the time in drawing but also benefiting manufacture and maintenance.

Appl. Syst. Innov. 2018, 1, 20 4 of 15 Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 4 of 15 Appl. Syst. Innov. 2018,, 2,, xx FORFOR PEERPEER REVIEWREVIEW 4 4 ofof 1515

Figure 5. Three major modules. Figure 5. ThreeThree major major modules. modules.

Since both of the upper and bottom decks share the same structure, it is sufficient to study just Since both ofof thethe upperupper and and bottom bottom decks decks share share the the same same structure, structure, it is it sufficient is sufficient to study to study just just one one of them. As shown in Figure 6, the upper deck consists of two types of mechanisms: one to oneof them. of them. As shown As shown in Figure in Figure6, the upper6, the deckupper consists deck ofconsists two types of two of mechanisms:types of mechanisms: one to distribute one to distribute the power and another to generate the legged motion. distributethe power the and power another and to another generate to the generate legged the motion. legged motion.

Figure 6. Upper deck. Figure 6. UpperUpper deck.deck.

Let us tentatively remove some parts of the uppe upperr deck to disclose the structure of the power distribution systemsystem asas shown shown in in Figure Figure7a. 7(a). Note Note that th itat is notit is necessary not necessary to put to on put the on timing the timing belts when belts whenmaking making engineering engineering drawings, drawings, but they but are they added are here added for the here sake for of the clarity. sake The of clarity. power distributionThe power distributionsystem is composed system is of composed pulleys and of timing pulleys belts and through timing belts which through one single which motor one is single able to motor dispense is able its powertoto dispensedispense to three itsits setspowerpower of shaftstoto threethree (i.e., setssets anterior ofof shaftsshafts shafts, (i.e.,(i.e.,posterior anterioranterior shafts, shafts, andposteriorposterior middle shafts,shafts, shafts). andand Additionally, middlemiddle shafts).shafts). the powerAdditionally, flows are the illustrated power flows in Figure are illustrated7b. in Figure 7(b).

(a) (b) Figure 7. Power distribution system: (a) Structure of pulleys and timing belts; (b) Power flows Figure 7. PowerPower distribution distribution system: system: (a)(a) (a) StructureStructure of of pulleys pulleys and and timing timing belts;belts; ((b)(b)b) Power Power flows flowsflows

Each set of shafts is attached with a four-bar linkage [28] which is the femur of the leg, as Each setset ofof shafts shafts is is attached attached with with a four-bar a four-bar linkage linkage [29] [28] which which is the is femur the femur of the of leg, the as shownleg, as shown in Figure 8(a) to generate the legged motion. To put all the parts together, all six of the legs shownin Figure in8 Figurea to generate 8(a) to generate the legged the motion. legged Tomotion. put all To the put parts all the together, parts together, all six of all the six legs of the can legs be can be casted into two sets, each of which consists ofof threethree legs,legs, asas shownshown inin FigureFigure 8(b)8(b) wherewhere thethe labelslabels 11 andand 22 standstand forfor thethe specificspecific deckdeck toto whichwhich theythey belongbelong (i.e.,(i.e., bottombottom deckdeck andand upperupper deck,deck,

Appl. Syst. Innov. 2018, 1, 20 5 of 15

Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 5 of 15 castedAppl. Syst. into Innov. two 2018 sets,, 2, x each FOR ofPEER which REVIEW consists of three legs, as shown in Figure8b where the labels 1 5and of 15 respectively).2 stand for the Hence, specific this deck robot to whichwith a theyminimal belong number (i.e., bottomof non-collocated deck and upperactuators deck, can respectively). implement theHence,respectively). stable this tripod robot Hence, withgaits this a minimalusing robot mechanisms. with number a minimal of non-collocated Compared number ofto actuators non-collocatedother hexapod can implement actuators robots thewith can stable implementcollocated tripod actuators,gaitsthe stable using each tripod mechanisms. joint gaits is directly using Compared mounted mechanisms. to with other anCompared hexapod actuator, robots whereto other with the hexapod number collocated ofrobots actuators actuators, with could collocated each be joint as highisactuators, directly as eighteen. each mounted joint This is with directlyinnovative an actuator, mounted mechanism where with an theuses actuator, number only three where of actuators actuators the number could to achieve of be actuators as highlocomotion, ascould eighteen. be and as significantlyThishigh innovativeas eighteen. reduces mechanism This the innovative cost uses of the only mechanism robot. three actuators uses only to achieve three actuators locomotion, to achieve and significantly locomotion, reduces and thesignificantly cost of the reduces robot. the cost of the robot.

(a) (b) (a) (b)

Figure 8. (a) Structure of one leg; (b) Two sets of tripod legs. Figure 8. (a) Structure of one leg; (b) Two sets of tripod legs. Figure 8. (a) Structure of one leg; (b) Two sets of tripod legs. 4. Tripod Gaits 4. Tripod Gaits 4. Tripod Gaits The six legs of this robot can be divided into two sets, each of which consists of three legs (i.e., The six legs of this robot can be divided into two sets, each of which consists of three legs the anteriorThe six andlegs posteriorof this robot legs can with be thedivided contralateral into two middlesets, each leg, of to which form consistsa triangular of three support). legs (i.e., In (i.e., the anterior and posterior legs with the contralateral middle leg, to form a triangular support). thethe following,anterior and the posterior labels 1 andlegs 2with refer the to thecontralateral bottom deck middle and leg,upper to formdeck, arespectively. triangular support). The tripod In In the following, the labels 1 and 2 refer to the bottom deck and upper deck, respectively. The tripod gaitsthe following, of the robot the labelscan be 1 generatedand 2 refer by to alternating the bottom twodeck sets and of upper tripod deck, legs, respectively. as shown in The Figure tripod 9 gaits of the robot can be generated by alternating two sets of tripod legs, as shown in Figure9 where wheregaits of the the legs robot with can encirclement be generated represent by alternating that they two are setson the of groundtripod legs, while as the shown others in are Figure off of 9 the legs with encirclement represent that they are on the ground while the others are off of the ground. thewhere ground. the legs As withcan be encirclement seen in Figure represent 9, the hethatxapod they robotare on can the move ground without while tumbling the others because are off itsof As can be seen in Figure9, the hexapod robot can move without tumbling because its COG is always COGthe ground. is always As insidecan be the seen triangular in Figure supports. 9, the he Notexapod that robot the can static move stabilit withouty is guaranteed tumbling because by means its inside the triangular supports. Note that the static stability is guaranteed by means of mechanism ofCOG mechanism is always instead inside ofthe requiring triangular a sophisticated supports. Note algorithm. that the Hence,static stabilit a greaty isamount guaranteed of computation by means instead of requiring a sophisticated algorithm. Hence, a great amount of computation time can be timeof mechanism can be released instead for of other requiring uses. a sophisticated algorithm. Hence, a great amount of computation released for other uses. time can be released for other uses.

FigureFigure 9. 9. AA sequence sequence of of motions motions moving moving in in a a forward forward direction. Figure 9. A sequence of motions moving in a forward direction. This robot robot changes changes its its course course by by delicately delicately coordinating coordinating the the motions motions of ofits itsswivel swivel and and legs, legs, as shownas shownThis in robotFigure in Figure changes 10 10where where its therecourse there are areby five delicately five stages stages arcoordinating arrangedranged clockwise clockwise the motions from from the theof itsupper upper swivel right right and corner corner legs, to toas thetheshown upper in leftFigure corner.corner. 10 where AtAt stagestage there 1,1, the theare robot robotfive rests.stages rests. At Atar stageranged stage 2, 2, clockwise the the upper upper deckfrom deck takesthe takes upper off off its itsright legs legs labeledcorner labeled asto as2the and2 upperand makes makes left a corner. swing a swing counterclockwiseAt counterclockwise stage 1, the robot while whilerests. the theAt legs stagelegs of the of2, thethe bottom bottomupper deck deck deck labeled takes labeled asoff 1 asits remain 1legs remain labeled on theon theas 2 ground. and makes At stage a swing 3, the counterclockwise bottom deck takes while off itsthe legs legs and of the makes bottom a swing deck counterclockwise labeled as 1 remain while on thethe legsground. of the At upper stage 3,deck the stepbottom on thedeck ground. takes off By its repeating legs and thesemakes motions, a swing thecounterclockwise robot can manage while a turnthe legs around of the its uppercenter deckwith stepany arbitraryon the ground. degree. By repeating these motions, the robot can manage a turn around its center with any arbitrary degree.

Appl. Syst. Innov. 2018, 1, 20 6 of 15 ground. At stage 3, the bottom deck takes off its legs and makes a swing counterclockwise while the legs of the upper deck step on the ground. By repeating these motions, the robot can manage a turn Appl.around Syst. itsInnov. center 2018,with 2, x FOR any PEER arbitrary REVIEW degree. 6 of 15

FigureFigure 10. 10. SequenceSequence of of motions motions to to change change course. course.

Note that the swing is a result of changing the cross-angle between two decks driven by the Note that the swing is a result of changing the cross-angle between two decks driven by the swivel motor. The swivel motor is installed at the bottom deck, and its output shaft is connected to swivel motor. The swivel motor is installed at the bottom deck, and its output shaft is connected to the the upper deck. During the procedure of changing orientation, both decks turn counterclockwise upper deck. During the procedure of changing orientation, both decks turn counterclockwise but the but the swivel motor does not. If the bottom deck keeps still, the output shaft of the swivel motor swivel motor does not. If the bottom deck keeps still, the output shaft of the swivel motor turns in turns in the same direction as the upper deck, since the upper deck is driven by the shaft. the same direction as the upper deck, since the upper deck is driven by the shaft. Nevertheless, if the Nevertheless, if the upper deck keeps still, the output shaft of the swivel motor must turn in the upper deck keeps still, the output shaft of the swivel motor must turn in the opposite direction to the opposite direction to the bottom deck, because the bottom deck is driven by the body of the motor bottom deck, because the bottom deck is driven by the body of the motor instead of its shaft. Hence, instead of its shaft. Hence, the swivel motor must alternate its direction according to which deck the swivel motor must alternate its direction according to which deck keeps still. Taking a close look keeps still. Taking a close look at Figure 10, the robot turns 30° in total, where stages 3 and 5 at Figure 10, the robot turns 30◦ in total, where stages 3 and 5 contribute 20◦ and 10◦, respectively. contribute 20° and 10°, respectively. 5. Modeling and Analysis 5. Modeling and Analysis A simplified model is proposed here to analyze the motion of this hexapod. As a result of A simplified model is proposed here to analyze the motion of this hexapod. As a result of tripod gaits, each set of tripod legs can be grouped together and regarded as a single leg, and hence tripod gaits, each set of tripod legs can be grouped together and regarded as a single leg, and hence the hexapod can be reduced to a biped model with absolute stability whose initial posture is shown the hexapod can be reduced to a biped model with absolute stability whose initial posture is shown in Figure 11, where G represents the center of mass of the robot; O0,{i0, j0, k0} stand for the origin and in Figure 11, where G represents the center of mass of the robot; O, {i,j,k} stand for the origin base vectors of the inertial frame; L, H, D are length, height, and distance; P1, P2 denote the points at and base vectors of the inertial frame; L, H, D are length, height, and distance; P ,P denote the the feet corresponding to the bottom deck and upper deck, respectively. points at the feet corresponding to the bottom deck and upper deck, respectively.

Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 6 of 15

Figure 10. Sequence of motions to change course.

Note that the swing is a result of changing the cross-angle between two decks driven by the swivel motor. The swivel motor is installed at the bottom deck, and its output shaft is connected to the upper deck. During the procedure of changing orientation, both decks turn counterclockwise but the swivel motor does not. If the bottom deck keeps still, the output shaft of the swivel motor turns in the same direction as the upper deck, since the upper deck is driven by the shaft. Nevertheless, if the upper deck keeps still, the output shaft of the swivel motor must turn in the opposite direction to the bottom deck, because the bottom deck is driven by the body of the motor instead of its shaft. Hence, the swivel motor must alternate its direction according to which deck keeps still. Taking a close look at Figure 10, the robot turns 30° in total, where stages 3 and 5 contribute 20° and 10°, respectively.

5. Modeling and Analysis A simplified model is proposed here to analyze the motion of this hexapod. As a result of tripod gaits, each set of tripod legs can be grouped together and regarded as a single leg, and hence the hexapod can be reduced to a biped model with absolute stability whose initial posture is shown in Figure 11, where G represents the center of mass of the robot; O, {i,j,k} stand for the origin and base vectors of the inertial frame; L, H, D are length, height, and distance; P,P denote the Appl.points Syst. at Innov.the feet2018 corresponding, 1, 20 to the bottom deck and upper deck, respectively. 7 of 15

Figure 11. Biped model.

Except for the indicial convention adapted to this particular configuration, a series of reference frames is launched according to the Denavit–Hartenberg convention as shown in Figure 12. The center of mass G is initially aligned with the origin O0 of inertial frame-0, and there is a bifurcation after frame-3 so that indexes 4b and 5b stand for the frames attached to G and P2. θ1 and θ2 stand for the outputs of the bottom deck and upper deck motors, respectively. ∅1, ∅2, and ∅3 are cross-angles between adjacent frames according to their geometrical configuration. Hence, the homogeneous transformation from frame-0 to frame-3 is defined in Equation (1):

0  ◦   ◦  T3 = Rot(z, ∅3)Trans(L, 0, 0)Rot x, 90 Rot z, 90 Trans(H, 0, 0)Rot(z, ∅1)Trans(L, 0, 0). (1)

3 3 Likewise, the transformations T4a and T5b are defined in Equations (2) and (3), respectively:

3  ◦  T4a = Rot z, θ1 + 90 Trans(D, 0, 0), (2)

3 o T5b = Rot(z, ∅2)Trans(L, 0, 0)Rot(z, θ2 + 90 )Trans(H, 0, 0). (3) 4a 5b The compound transformations of T0 and T0 can be obtained as follows:   0 cos∅3 sin∅3 Lcos∅3(1 − cos θ1)  − −  0 0 3  0 sin∅3 cos∅3 Lsin∅3(1 cos θ1)  T4a = T3 T4a =  , (4)  −1 0 0 H − D + Lsinθ1  0 0 0 1

  0 cos∅3 sin∅3 Lcos∅3(1 − cos θ1 − cos θ2)  0 sin −cos Lsin (1 − cos θ − cos θ )  0 = 0 3 =  ∅3 ∅3 ∅3 1 2  T5b T3 T5b  , (5)  −1 0 0 L(sinθ1 + sinθ2)  0 0 0 1

Hence, the coordinates of G and P2 can be defined in Equations (6) and (7), respectively:     xG Lcos∅3(1 − cos θ1)     G =  yG  =  Lsin∅3(1 − cos θ1) , (6) zG H − D + Lsinθ1     xP2 Lcos∅3(1 − cos θ1 − cos θ2)     P2 =  yP2  =  Lsin∅3(1 − cos θ1 − cos θ2) . (7) zP2 L(sinθ1 + sinθ2) Appl. Syst. Innov. 2018, 1, 20 8 of 15 Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 8 of 15

(a) (b)

Figure 12. D-HD-H configuration: configuration: ( (aa)) Frames Frames in in isometric isometric view; view; ( (b)) Frames Frames in lateral view.

Observing the whole periodic motions (i.e., forward and backward as shown in Figures 13 and Observing the whole periodic motions (i.e., forward and backward as shown in Figures 13 and 14), 14), the robot performs linear motion at the time events , ,,, while it is either resting or the robot performs linear motion at the time events t−3, t−1, t1, t3, while it is either resting or managing managing a turn at the time events , ,,,. The central pattern G described in Equation (6) a turn at the time events t−4, t−2, t0, t2, t4. The central pattern G described in Equation (6) in fact in fact belongs to the time event . According to Figures 13 and 14, the complete description of the belongs to the time event t . According to Figures 13 and 14, the complete description of the central central pattern must be defined1 piecewise as follows: pattern must be defined piecewise as follows: G  =  xG G =  yG   −2∅ () −∅()(1 + cos ) z o o G−2∅() −∅()(1 + cos ) , ∈ [−360 , −180 ),    − Lcos (t −+) − Lcos (t )( + θ )  2 ∅3 0 ∅3 −2 1 cos 1   −∅ ( )(1 − cos )   ◦ ◦   −2Lsin∅3(t0) − Lsin ∅3(t−2)(1 + cos θ1) f or θ1, θ2 ∈ −360 , −180 ,    o  −∅H − D(+)(1Lsin − cos ) , ∈ [−180 ,0 ),  θ1 (8)   −−  = −Lcos∅3(t0)(1 − cos θ2)   ◦ ◦    −∅Lsin ((t))((11 − coscos θ)  f or θ , θ ∈ −180 , 0 , (8)   ∅3 0 2  1 2 o o  ∅()(1 − cos ) , ∈ [0 , 180 ],  H − D − Lsinθ2 =  −+   Lcos∅3(t0)(1 − cos θ1)  2∅ ( ) +∅ ( )(1 + cos ) ◦ ◦   ( )( − )  ∈     Lsin∅3 t0 1 cos θ1  f or θ1, θ2 0 , 180 o o  2∅() +∅()(1 + cos ) , ∈ (180 , 360 ],  H − D + Lsinθ1   −−   2Lcos (t ) + Lcos (t )(1 + cos θ )  ∅3 0 ∅3 2 2    ◦ ◦   2Lsin∅3(t0) + Lsin∅3(t2)(1 + cos θ2) f or θ1, θ2 ∈ 180 , 360 , where parameters  H, D, and L are dimensions as shown in Figure 11; θ, θ stand for outputs of  H − D − Lsinθ bottom and upper motors; ∅(t), ∅(t) are2 the cross-angles between frame-0 and frame-1 as shown in Figure 12(a) at time events t,t . Note that ∅ is related to θ as described by Section 4 where parameters H, D, and L are dimensions as shown in Figure 11; θ1, θ2 stand for outputs of bottom (i.e., alternating the swivel motor so that ∅ = θ when is pivoted and ∅ = −θ when is and upper motors; (t ), (t ) are the cross-angles between frame-0 and frame-1 as shown in pivoted). ∅3 0 ∅3 2 Figure 12a at time events t0, t1 . Note that ∅3 is related to θ3 as described by Section4 (i.e., alternating the swivel motor so that ∅3 = θ3 when P1 is pivoted and ∅3 = −θ3 when P2 is pivoted).

Figure 13. Events when moving forward.

Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 8 of 15

(a) (b)

Figure 12. D-H configuration: (a) Frames in isometric view; (b) Frames in lateral view.

Observing the whole periodic motions (i.e., forward and backward as shown in Figures 13 and

14), the robot performs linear motion at the time events , ,,, while it is either resting or managing a turn at the time events , ,,,. The central pattern G described in Equation (6) in fact belongs to the time event . According to Figures 13 and 14, the complete description of the central pattern must be defined piecewise as follows:

G = −2∅() −∅()(1 + cos ) o o −2∅() −∅()(1 + cos ) , ∈ [−360 , −180 ), −+ −∅()(1 − cos ) o −∅()(1 − cos ) , ∈ [−180 ,0 ), (8) −− = ∅()(1 − cos ) o o ∅()(1 − cos ) , ∈ [0 , 180 ], −+ 2∅() +∅()(1 + cos ) o o 2∅() +∅()(1 + cos ) , ∈ (180 , 360 ], −− where parameters H, D, and L are dimensions as shown in Figure 11; θ, θ stand for outputs of bottom and upper motors; ∅(t), ∅(t) are the cross-angles between frame-0 and frame-1 as shown in Figure 12(a) at time events t,t . Note that ∅ is related to θ as described by Section 4 (i.e., alternating the swivel motor so that ∅ = θ when is pivoted and ∅ = −θ when is Appl. Syst. Innov. 2018, 1, 20 9 of 15 pivoted).

Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEWFigure 13. Events when moving forward. 9 of 15

Figure 14. Events when moving backward.

6. Hardware Configuration Configuration The controller is as important to a robot as the brain is to a human. Considering cost, we prefer to select the controllers which makemake useuse ofof freefree software.software. One great achievement in the software community was the GPL (General Public License) pr proposedoposed by Richard Stallman in 1989. It caused Linux to evolve and flourish. flourish. Consequently, many resourcesresources based on Linux can be accessed with no or with minimum charge. There ar aree at least two candidates, both of which use the Linux operating system: the ARM embedded system and Raspberry Pi. We We need an operating system to perform the multitasking of applications with fast reaction to time-criticaltime-critical events. Linux was created by Linus Torvalds when he waswas aa studentstudent atat thethe UniversityUniversity ofof HelsinkiHelsinki inin 1991.1991. It is able to simplify system hardware design and programming, as well as the debugging of complex applications. Moreover, Moreover, the spirit of GNU has created a wide variety of forumsforums across the Internet, making it possible to collaborate with hobbyists or experts from around thethe world.world. ARM embeddedembedded systemssystems are are primarily primarily used used to developto develop customized customized products, products, and requiresand requires more moreknowledge knowledge and expertise. and expertise. If an ARM If an embeddedARM embedd systemed system is used is without used without development development tools such tools as ADS,such IAR,as ADS, and RealViewIAR, and MDKRealView etc., it MDK not only etc., has it tonot establish only has the cross-compilingto establish the environment cross-compiling on a personalenvironment computer, on a personal but must computer, also frequently but must download also frequently programs download to the target programs board for to debugging. the target Theboard other for debugging. option is the The Raspberry other option Pi, which is the wasRaspberry originally Pi, which developed was originally in the United developed Kingdom in the by Unitedthe Raspberry Kingdom Pi by Foundation the Raspberry to promote Pi Foundation the teaching to promote of basic the computer teaching of science basic incomputer schools science and in indeveloping schools and countries. in developing It can edit, countries. compile, debug,It can andedit, test compile, programs debug, directly and on-board. test programs Comparatively, directly on-board.the Raspberry Comparatively, Pi is easier than the ARMRaspberry embedded Pi is systems easier forthan use AR inM developing embedded a prototype.systems for use in developingAfter years a prototype. of evolution, Linux operating systems have been diversified, resulting in variance amongAfter them. years For of Raspberry evolution, Pi Linux Linux, operating the command systems evoking have configurationbeen diversified, is “sudo resulting raspi-config” in variance as amongshown inthem. Figure For 15 Raspberry, but it is “setup”Pi Linux, for the Red command Hat Linux. evoking configuration is “sudo raspi-config” as shown in Figure 15, but it is “setup” for Red Hat Linux.

Figure 15. Configuration menu.

In order to access the Raspberry Pi on a crossing platform, you have to enable either the SSH server or serial login shell on the interfacing options of configuration menus. After completing configuration, it is ready for you to develop application programs with C, C++, Python, etc.

Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 9 of 15

Figure 14. Events when moving backward.

6. Hardware Configuration The controller is as important to a robot as the brain is to a human. Considering cost, we prefer to select the controllers which make use of free software. One great achievement in the software community was the GPL (General Public License) proposed by Richard Stallman in 1989. It caused Linux to evolve and flourish. Consequently, many resources based on Linux can be accessed with no or with minimum charge. There are at least two candidates, both of which use the Linux operating system: the ARM embedded system and Raspberry Pi. We need an operating system to perform the multitasking of applications with fast reaction to time-critical events. Linux was created by Linus Torvalds when he was a student at the University of Helsinki in 1991. It is able to simplify system hardware design and programming, as well as the debugging of complex applications. Moreover, the spirit of GNU has created a wide variety of forums across the Internet, making it possible to collaborate with hobbyists or experts from around the world. ARM embedded systems are primarily used to develop customized products, and requires more knowledge and expertise. If an ARM embedded system is used without development tools such as ADS, IAR, and RealView MDK etc., it not only has to establish the cross-compiling environment on a personal computer, but must also frequently download programs to the target board for debugging. The other option is the Raspberry Pi, which was originally developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and in developing countries. It can edit, compile, debug, and test programs directly on-board. Comparatively, the Raspberry Pi is easier than ARM embedded systems for use in developing a prototype. After years of evolution, Linux operating systems have been diversified, resulting in variance among them. For Raspberry Pi Linux, the command evoking configuration is “sudo raspi-config” as Appl. Syst. Innov. 2018, 1, 20 10 of 15 shown in Figure 15, but it is “setup” for Red Hat Linux.

Figure 15. ConfigurationConfiguration menu.

In order to access the Raspberry Pi on a crossing platform, you have to enable either the SSH Appl. Syst.In order Innov. to 2018 access, 2, x FOR the RaspberryPEER REVIEW Pi on a crossing platform, you have to enable either the SSH server 10 of 15 orserver serial or login serial shell login on theshell interfacing on the interfacing options of configurationoptions of configuration menus. After menus. completing After configuration, completing itconfiguration,7. isSoftware ready for Development you it is toready develop for you application to develop programs application with programs C, C++, Python, with C, etc. C++, Python, etc.

7. SoftwareFigure Development16 illustrates that the infrastructure of wireless remote control consists of a WLAN (wireless local area network) and a WAN (wide area network). The WLAN is based on Wi-Fi which is theFigure IEEE 802.1116 illustrates standard that for the wireless infrastructure local area of wireless networking remote with control devices. consists It has of a a range WLAN of (wirelessabout 20 localm indoors area network) and a greater and a range WAN outdoor (wide areas. A network). configuration The WLANof the Raspberry is based on Pi Wi-Fi must which be done is thein order IEEE 802.11to access standard the robot for wireless through local WLAN. area networkingThat is, adding with devices.the following It has aparagraphs range of about to the 20 mfile indoors called and“interfaces” a greater located range outdoors. at/etc/network: A configuration of the Raspberry Pi must be done in order to access the robotiface through eth0 WLAN. auto wlan0 That is, adding the following paragraphs to the file called “interfaces” located at/etc/network: inet dhcp iface eth0 auto wlan0 inetwpa-ssid dhcp “User’s Identification” wpa-pskwpa-ssid “User’s “User’s Password” Identification” wpa-pskThen, you “User’s have to Password” restart the networking service and login through SSH to ensure the connectionThen, you by the have following to restart commands. the networking service and login through SSH to ensure the connection by#sudo/etc/init.d/networking the following commands. restart (or #sudo service networking restart) #sudo/etc/init.d/networking#ssh xx.xx.xx.xx –p 22 –l pi restart (or #sudo service networking restart) #ssh xx.xx.xx.xx -p 22 -l pi

Figure 16. Infrastructure of wireless remote control. WAN: wide area network; WLAN: wireless local Figure 16. Infrastructure of wireless remote control. WAN: wide area network; WLAN: wireless area network. local area network.

TheThe communication on on a a network network must must adopt adopt prot protocolsocols like like human human langua languages,ges, having having a set a set of ofwritten written rules rules that that must must be followed be followed for communicati for communicationon to be tosuccessful. be successful. Protocols Protocols determine determine packet packetsize, information size, information in the headers, in the headers,and how anddata howis stored data in is the stored packet. in theBoth packet. sides of Both the conversation sides of the conversationmust understand must these understand rules for thesea successful rules fortran asmission. successful Therefore, transmission. a common Therefore, language a common must be languageagreed upon must between be agreed communicating upon between devices. communicating If neither devices.device has If neithera common device protocol has a commoninstalled, they cannot communicate. Hence, the programs to implement remote control are based upon those principles to establish the server–client networking connection, as shown in Figure 17.

Figure 17. TCP/IP connection.

Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 10 of 15

7. Software Development Figure 16 illustrates that the infrastructure of wireless remote control consists of a WLAN (wireless local area network) and a WAN (wide area network). The WLAN is based on Wi-Fi which is the IEEE 802.11 standard for wireless local area networking with devices. It has a range of about 20 m indoors and a greater range outdoors. A configuration of the Raspberry Pi must be done in order to access the robot through WLAN. That is, adding the following paragraphs to the file called “interfaces” located at/etc/network: iface eth0 auto wlan0 inet dhcp wpa-ssid “User’s Identification” wpa-psk “User’s Password” Then, you have to restart the networking service and login through SSH to ensure the connection by the following commands. #sudo/etc/init.d/networking restart (or #sudo service networking restart) #ssh xx.xx.xx.xx –p 22 –l pi

Figure 16. Infrastructure of wireless remote control. WAN: wide area network; WLAN: wireless local area network.

The communication on a network must adopt protocols like human languages, having a set of written rules that must be followed for communication to be successful. Protocols determine packet size, information in the headers, and how data is stored in the packet. Both sides of the conversation Appl. Syst. Innov. 2018, 1, 20 11 of 15 must understand these rules for a successful transmission. Therefore, a common language must be agreed upon between communicating devices. If neither device has a common protocol installed, theyprotocol cannot installed, communicate. they cannot Hence, communicate. the programs Hence, to implement the programs remote to implementcontrol are remotebased upon control those are principlesbased upon to those establish principles the server–client to establish thenetw server–clientorking connection, networking as shown connection, in Figure as shown 17. in Figure 17.

Figure 17.17. TCP/IP connection. connection.

Table1 illustrates the program paradigms for a server and client where the server has to specify the type of protocol and await a connection request from a client and meanwhile the client simply designates the port and address pointing to the remote server.

Table 1. Paradigms of a server socket and client socket.

Server Socket Client Socket int Sock0, Sock1, n; struct_sockaddr_in Addr; int Sock0, n; Socket0 = socket(AF_INET,SOCK_STREAM,0); struct_sockaddr_in Addr; Addr.sin_family = AF_INET; Socket0 = socket (AF_INET,SOCK_STREAM,0); Addr.sin_addr.s_addr = INADDR_ANY; Addr.sin_family = AF_INET; Addr.sin_port = htons (49152); Addr.sin_addr.s_addr = inet_addr (argv [1]); n = sizeof (Addr); Addr.sin_port = htons (49152); bind (Socket0, (struct sockaddr *) & Addr, n); n = sizeof (Addr); listen (Socket0,3); connect (Socket0, (struct sockaddr *) & Addr, n); Socket1 = accept (Socket0, (struct sockaddr *)& Addr, & sizeof (struct sockaddr_in));

Most protocols actually consist of several protocols grouped together in a suite. One protocol usually only covers one aspect of communications between devices. Since the TCP/IP suite has multiple protocols, the port is created and assigned with a number to identify the specific network service. The port numbers are divided into three categories: well-known ports 0–1023, registered ports 1024–49,151, and dynamic ports 49,152–65,535. For instance, the port numbers 21, 5, and 110, stand for FTP, SMTP, POP3 (i.e., file transfer, sending and receiving e-mail), respectively. The robot creates a server socket listening to the local computer, and the local computer plays the role as an agent who has to create two sockets (i.e., a client socket to link with the robot through WLAN and a server socket to accept the connection from the remote computer across WAN). The information transaction shown in Figure 18 is initiated by the remote computer from which the robot must respond promptly for every request. Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 11 of 15

Table 1 illustrates the program paradigms for a server and client where the server has to specify the type of protocol and await a connection request from a client and meanwhile the client simply designates the port and address pointing to the remote server.

Table 1. Paradigms of a server socket and client socket.

Server Socket Client Socket int Sock0, Sock1, n; struct_sockaddr_in Addr; int Sock0, n; Socket0 = socket(AF_INET,SOCK_STREAM,0); struct_sockaddr_in Addr; Addr.sin_family = AF_INET; Socket0 = socket (AF_INET,SOCK_STREAM,0); Addr.sin_addr.s_addr = INADDR_ANY; Addr.sin_family = AF_INET; Addr.sin_port = htons (49152); Addr.sin_addr.s_addr = inet_addr (argv [1]); n = sizeof (Addr); Addr.sin_port = htons (49152); bind (Socket0, (struct sockaddr *) & Addr, n); n = sizeof (Addr); listen (Socket0,3); connect (Socket0, (struct sockaddr *) & Addr, Socket1 = accept (Socket0, (struct sockaddr *) & n); Addr, & sizeof (struct sockaddr_in));

Most protocols actually consist of several protocols grouped together in a suite. One protocol usually only covers one aspect of communications between devices. Since the TCP/IP suite has multiple protocols, the port is created and assigned with a number to identify the specific network service. The port numbers are divided into three categories: well-known ports 0–1023, registered ports 1024–49,151, and dynamic ports 49,152–65,535. For instance, the port numbers 21, 5, and 110, stand for FTP, SMTP, POP3 (i.e., file transfer, sending and receiving e-mail), respectively. The robot creates a server socket listening to the local computer, and the local computer plays the role as an agent who has to create two sockets (i.e., a client socket to link with the robot through WLAN and a server socket to accept the connection from the remote computer across WAN). The

Appl.information Syst. Innov. transaction2018, 1, 20 shown in Figure 18 is initiated by the remote computer from which12 ofthe 15 robot must respond promptly for every request.

Figure 18. Information transaction.

We are now surrounded by many kinds of digital devices such as desktop computers, notebook We are now surrounded by many kinds of digital devices such as desktop computers, computers, smart phones, etc., all of which have been furnished with a GUI (graphical user interface) notebook computers, smart phones, etc., all of which have been furnished with a GUI (graphical that we take for granted. The importance of a GUI is that it provides the sensation of a user-friendly user interface) that we take for granted. The importance of a GUI is that it provides the sensation interface to give an efficient interaction between the human and the machine. It is sufficient to use of a user-friendly interface to give an efficient interaction between the human and the machine. It is GCC (GNU Compiler Collection) to develop the application programs for the robot and the local sufficient to use GCC (GNU Compiler Collection) to develop the application programs for the robot computer. However, the remote computer which is a terminal for users must take the user interface and the local computer. However, the remote computer which is a terminal for users must take the user into account. It is recommended to use Qt because Qt provides a cross-platform with an IDE interface into account. It is recommended to use Qt because Qt provides a cross-platform with an IDE (integrated development environment) that is used for developing application programs and GUIs. (integrated development environment) that is used for developing application programs and GUIs. ItAppl. simplifies Syst. Innov. the 2018 construction, 2, x FOR PEER REVIEWof a GUI, and has a class browser, an object browser, and a 12 class of 15 It simplifies the construction of a GUI, and has a class browser, an object browser, and a class hierarchy hierarchydiagram for diagram use in for object-oriented use in object-oriented software development.software development. The picture The as picture shown as in shown Figure in 19 Figure is the 19GUI is createdthe GUI by created Qt for by this Qt project. for this project.

Figure 19. Graphical user interface.

8. Simulation and Testing A plannedplanned routeroute for for the the robot robot to moveto move as shown as shown in Figure in Figure 20 is illustrated20 is illustrated to justify to the justify formula the formulaestablished established by the previous by the previous section. section. Suppose Suppose that the that robot the initially robot initially rests at point-arests at andpoint-a starts and a 45o startssequence a sequence of forward of motions. forward That motions. is, striding That three is, striding steps toward three point-b; steps toward turning point-b;45o counterclockwise; turning 45° counterclockwise;striding three steps striding toward three point-c; steps turning toward45◦ point-c;counterclockwise; turning striding counterclockwise; three steps toward striding point-d. three 135o Then,steps toward it manages point-d. a turn Then, with 135it manageso clockwise a turn and with initiates a sequenceclockwise of and backward initiates motions. a sequence That of is, 45o backwardstriding three motions. steps towardThat is, point-e; striding turning three45 stepso counterclockwise; toward point-e; striding turning three steps counterclockwise; toward point-f; 90o stridingturning 90threeo counterclockwise; steps toward point-f; striding turning three steps toward counterclockwise; point-a; turning striding 135o clockwise.three steps toward point-a; turning 135o clockwise.

Figure 20. A planned route for the robot.

Based on Equation (8) with parameters H = 133 mm, L = 40 mm, D = 45 mm, the simulation showed satisfactory results. The top view of the central pattern as shown in Figure 21 agreed with the planned route. The isometric view of the central pattern as shown in Figure 22 reveals the nature of the motion performed by this robot, where each ripple corresponds to a step. The center of mass fluctuated between 88 mm (=H − D) and 128 mm (=H – D + L) for every step within step size equal to 80 mm (=2 × L).

Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 12 of 15

hierarchy diagram for use in object-oriented software development. The picture as shown in Figure 19 is the GUI created by Qt for this project.

Figure 19. Graphical user interface.

8. Simulation and Testing A planned route for the robot to move as shown in Figure 20 is illustrated to justify the formula established by the previous section. Suppose that the robot initially rests at point-a and starts a sequence of forward motions. That is, striding three steps toward point-b; turning 45o counterclockwise; striding three steps toward point-c; turning 45° counterclockwise; striding three steps toward point-d. Then, it manages a turn with 135o clockwise and initiates a sequence of backward motions. That is, striding three steps toward point-e; turning 45o counterclockwise; striding three steps toward point-f; turning 90o counterclockwise; striding three steps toward Appl.point-a; Syst. turning Innov. 2018 135, 1, 20o clockwise. 13 of 15

Figure 20. A planned route for the robot. Figure 20. A planned route for the robot.

Based on EquationEquation (8)(8) withwith parametersparameters HH == 133 mm,mm, LL == 40 mm,mm, DD == 4545 mm,mm, thethe simulationsimulation showed satisfactory results. The top view of the centralcentral pattern as shown in Figure 21 agreedagreed withwith thethe plannedplanned route.route. The The isometric isometric view view of theof the central central pattern pattern as shown as shown in Figure in Figure 22 reveals 22 reveals the nature the ofnature the motion of the motion performed performed by this robot,by this where robot, each where ripple each corresponds ripple corresponds to a step. to The a step. center The of center mass fluctuatedof mass fluctuated between 88between mm (=H 88− mmD) and(=H 128− D) mm and (=H 128 – mm D + L)(=H for –every D + L) step for within every stepstepsize within equal step to Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 13 of 15 Appl.80size mm Syst.equal (=2 Innov. to× 80 L).2018 mm, 2, x(=2 FOR × PEERL). REVIEW 13 of 15

Figure 21. TopTop view view of of the the central central pattern. pattern.

Figure 22. Isometric view of the central pattern. Figure 22. IsometricIsometric viewview ofof thethe centralcentral pattern.pattern.

Figure 2323 shows shows some some snapshots snapshots of theof the hexapod hexapo robotd robot as tested as tested on site. on There site. were There no concernswere no concernsof tumbling of tumbling even upon even running upon outrunning of battery out of or batte duery to or electronic due to electronic failure since failure the since tripod the gaits tripod are gaitsgenerated are generated by mechanism by mechanism instead of instead computer. of comput Hence,er. this Hence, robot this is reliable robot is and reliable robust. and robust.

Figure 23. SnapshotsSnapshots ofof thethe hexapodhexapod inin motion.motion.

9. Conclusions When a hexapod is designed with collocated actuators, where each joint is directly mounted with an actuator, it leads to use a great number of actuators. Hence, we proposed a hexapod robot with a non-collocated actuators design which is achieved by means of mechanisms. There are several benefits brought by this improvement, including alleviating the challenge of algorithms to control legged motions, upgrading the loading capacity, and reducing the cost of construction.

Appl. Syst. Innov. 2018, 2, x FOR PEER REVIEW 13 of 15

Figure 21. Top view of the central pattern.

Figure 22. Isometric view of the central pattern.

Figure 23 shows some snapshots of the hexapod robot as tested on site. There were no Appl. Syst.concerns Innov. of2018 tumbling, 1, 20 even upon running out of battery or due to electronic failure since the tripod14 of 15 gaits are generated by mechanism instead of computer. Hence, this robot is reliable and robust.

FigureFigure 23. 23.Snapshots Snapshots of the the hexapod hexapod in in motion. motion.

9. Conclusions 9. Conclusions When a hexapod is designed with collocated actuators, where each joint is directly mounted Whenwith an aactuator, hexapod it leads is designed to use a withgreat collocatednumber of actuators. actuators, Hence, where we each proposed joint a is hexapod directly robot mounted withwith an actuator, a non-collocated it leads toactuators use a greatdesign number which ofis actuators.achieved by Hence, means weof proposedmechanisms. a hexapodThere are robot withseveral a non-collocated benefits brought actuators by this design improvement, which is achievedincluding byalleviating means ofthe mechanisms. challenge of algorithms There are severalto benefitscontrol brought legged by motions, this improvement, upgrading the including loading ca alleviatingpacity, and the reducing challenge the ofcost algorithms of construction. to control legged motions, upgrading the loading capacity, and reducing the cost of construction. Moreover, most hexapod robots rely on their servos to generate periodic gaits, such that their servos must frequently reverse and easily suffer from overheating. Nevertheless, the periodic gaits of this robot are generated by mechanism, i.e., four-bar linkage, which prevents motors from frequently reversing. Since its tripod gaits are generated by mechanism instead of computer, it is always statically stable, even if it runs out of battery or experiences electronic failure. Hence, this hexapod robot is reliable and robust. Additionally, server–client networking programs based on TCP/IP connection across WLAN and WAN were adopted to implement the wireless control from a remote site. Due to the rapid growth of GPL communities, the trend of free software has become so overwhelming that there are abundant free resources based on Linux available for programmers. We chose the Raspberry Pi as the controller for this project because of its built-in Linux akin to abundant free resources so that we were able to leverage GCC and Qt to develop our application programs. The robotic project is interdisciplinary in its nature, and we successfully integrated the mechanisms, electronic hardware, and computer software to complete this project.

Author Contributions: M.-C.H. planned this study and designed the mechanism of the robot. C.-J.H. designed software and wrote programs for the robot. M.-C.H., C.-J.H. and F.L. contributed to realization and revision of the manuscript. Funding: This work was supported by the Jiangxi University of Science and Technology, People's Republic of China, under Grants jxxjbs18018. Conflicts of Interest: The authors declare no conflict of interest.

References

1. McGhee, R.B. Some finite state aspect of legged locomotion. Math. Biosci. 1968, 2, 67–84. [CrossRef] 2. McGhee, R.B.; Frank, A.A. On the stability properties of quadruped creeping gaits. Math. Biosci. 1968, 3, 331–351. [CrossRef] 3. Orin, D. Interactive Control of a Six-Legged Vehicle with Optimization of Both Stability and Energy. Ph.D Thesis, Ohio State University, Columbus, OH, USA, 1976. 4. Kar, D.C. Design of statically stable walking robot: A review. J. Robot. Syst. 2003, 20, 617–686. [CrossRef] Appl. Syst. Innov. 2018, 1, 20 15 of 15

5. Moosavian, S.A.A.; Dabiri, A. Dynamics and planning for stable motion of a hexapod robot. In Proceedings of the 2010 IEEE/ASME International Conference on Advanced Intelligent Mechatronics, Montreal, QC, Canada, 6–9 July 2010; pp. 818–823. 6. Lee, T.T.; Liao, C.M.; Chen, T.K. On the stability properties of hexapod tripod gait. IEEE J. Robot. Autom. 1988, 4, 427–434. [CrossRef] 7. Vukobratovic, M.; Juricic, D. Contribution to the synthesis of biped gait. IEEE Trans. Biomed. Eng. 1969, BME-16, 1–6. [CrossRef] 8. Vukobratovi´c, M.; Borovac, B. Zero-moment point—Thirty five years of its life. Int. J. Hum. Robot. 2004, 1, 157–173. [CrossRef] 9. Zadeh, L.A. Fuzzy Sets. Inf. Control 1965, 8, 338–353. [CrossRef] 10. Mamdani, E.H. Application of Fuzzy Algorithm for Control of Simple Dynamic Plants. Proc. IEEE 1974, 121, 1585–1588. [CrossRef] 11. Kaufmann, A.; Gupta, M.M. Introduction to Fuzzy Arithmetic Theory and Applications; Van Nostrand Reinhold: New York, NY, USA, 1991. 12. Mamdani, E. Fuzzy Reasoning and Its Applications; Academic Press: Cambridge, MA, USA, 1981. 13. Matia, F.; Jimenez, A.; Galan, R.; Sanz, R. Fuzzy Controllers: Lifting the linear-nonlinear frontier. Fuzzy Sets Syst. 1992, 52, 113–128. [CrossRef] 14. Matia, F.; Jimenez, A. On Optimal Implementation of Fuzzy Controllers. Int. J. Intell. Control Syst. 1996, 1, 407–415. [CrossRef] 15. Hecht-Nielsen, R. Neurocomputing; Addison-Wesley: Reading, NY, USA, 1989. 16. Wasserman, P.D. Neural Computing, Theory and Practice; Van Nostrand Reinhold: New York, NY, USA, 1989. 17. Shalev-Shwartz, S.; Ben-David, S. Understanding Machine Learning: From Theory to Algorithm; Cambridge University Press: Cambridge, UK, 2014. 18. Matsuoka, K. Mechanisms of frequency and pattern control in the neural rhythm generators. Biol. Cybern. 1987, 56, 345–353. [CrossRef][PubMed] 19. Haojun, Z.; Xiuli, Z. Biologically-Inspired Motion Control Theory and Its Application for a Legged-Robot; University Press: Beijing, China, 2004. 20. Xu, Y.; Gao, F.; Pan, Y.; Chai, X. Hexapod adaptive gait inspired by human behavior for six-legged robot without force sensor. J. Intell. Robot. Syst. 2017, 88, 19–35. [CrossRef] 21. Yu, H.; Gao, H.; Ding, L.; Li, M.; Deng, Z.; Liu, G. Gait generation with smooth transition using CPG-based locomotion control for hexapod waking robot. IEEE Trans. Ind. Electron. 2016, 63, 5488–5500. [CrossRef] 22. Juang, C.F.; Jhan, Y.H.; Chen, Y.M.; Hsu, C.M. Evolutionary wall-following hexapod robot using advanced multi-objective continuous ant colony optimized fuzzy controller. IEEE Trans. Cognit. Dev. Syst. 2017. [CrossRef] 23. Wang, W.J.; Chou, H.G.; Chen, Y.J.; Lu, R.C. Fuzzy control strategy for a hexapod robot walking on an incline. Int. J. Fuzzy Syst. 2017, 19, 1703–1717. [CrossRef] 24. Collins, J.J.; Richmond, S.A. Hard–wired central pattern generators for quadrupedal locomotion. Biol. Cybern. 1994, 71, 375–385. [CrossRef] 25. Lewis, A.; Fagg, A.H.; Bekey, G.A. Genetic algorithms for gait synthesis in a hexapod robot in recent trends in mobile robots. World Sci. 1994, 11, 317–331. 26. Nagashino, H.; Nomura, Y.; Kinouchi, Y. A neural network model for quadruped gait generation and transitions. Neurocomputing 2001, 38, 1469–1475. [CrossRef] 27. Ijspeert, A.J. Central pattern generators for locomotion control in animals and robots: A review. Neural Netw. 2008, 21, 642–653. [CrossRef][PubMed] 28. Zak, M.; Rozman, J. Design, Construction and Control of Hexapod Walking Robots. In Proceedings of the IEEE 13th International Scientific Conference on Informatics—Informatics, Poprad, Slovakia, 18–20 November 2015; pp. 302–307. 29. Erdman, A.G.; Sandor, G.N. Mechanism Design: Analysis and Synthesis; Prentice-Hall: London, UK, 1984.

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).