
Embedded Robotics (Thomas Braunl, 2 ed, 2006)
.pdf
Biped Robot Design
leg in the hip, in order to allow the robot to turn. Both robots have an additional dof for bending the torso sideways as a counterweight. Jack is also equipped with arms, a single dof per arm enabling it to swing its arms, either for balance or for touching any objects.
A second-generation humanoid robot is Andy Droid, developed by InroSoft (see Figure 10.3). This robot differs from the first-generation design in a number of ways [Bräunl, Sutherland, Unkelbach 2002]:
•Five dof per leg
Allowing the robot to bend the leg and also to lean sideways.
•Lightweight design
Using the minimum amount of aluminum and steel to reduce weight.
•Separate power supplies for controller and motors
To eliminate incorrect sensor readings due to high currents and voltage fluctuations during walking.
Figure 10.3: Andy Droid humanoid robot
Figure 10.3, left, shows Andy without its arms and head, but with its second generation foot design. Each foot consists of three adjustable toes, each equipped with a strain gauge. With this sensor feedback, the on-board controller can directly determine the robot’s pressure point over each foot’s support area and therefore immediately counteract to an imbalance or adjust the walking gait parameters (Figure 10.3, right, [Zimmermann 2004]).
Andy has a total of 13 dof, five per leg, one per arm, and one optional dof for the camera head. The robot’s five dof per leg comprise three servos for bending the leg at the ankle, knee, and hips joints, all in the same plane (same as for Johnny). Two additional servos per leg are used to bend each leg side-
135

10 Walking Robots
ways in the ankle and hip position, allowing the robot to lean sideways while keeping the torso level. There is no servo for turning a leg in the hip. The turning motion can still be achieved by different step lengths of left and right leg. An additional dof per arm allows swinging of the arms. Andy is 39cm tall and weighs approximately 1kg without batteries [Bräunl 2000], [Montgomery 2001], [Sutherland, Bräunl 2001], [Bräunl, Sutherland, Unkelbach 2002].
Digital servos Andy 2 from InroSoft (Figure 10.4) is the successor robot of Andy Droid. Instead of analog servos it uses digital servos that serve as both actuators and sensors. These digital servos are connected via RS232 and are daisy-chained, so a single serial port is sufficient to control all servos. Instead of pulse width modulation (PWM) signals, the digital servos receive commands as an ASCII sequence, including the individual servo number or a broadcast command. This further reduces the load on the controller and generally simplifies operation. The digital servos can act as sensors, returning position and electrical current data when being sent the appropriate command sequence.
Figure 10.4: Andy 2 humanoid robot
Figure 10.5 visualizes feedback uploaded from the digital servos, showing the robot’s joint positions and electrical currents (directly related to joint torque) during a walking gait [Harada 2006]. High current (torque) joints are color-coded, so problem areas like the robot’s right hip servo in the figure can be detected.
A sample robot motion program without using any sensor feedback is shown in Program 10.3 (main) and Program 10.4 (move subroutine). This program for the Johnny/Jack servo arrangement demonstrates the robot’s movements by letting it execute some squat exercises, continuously bending both knees and standing up straight again.
136

Biped Robot Design
Figure 10.5: Visualization of servo sensor data
The main program comprises four steps:
•Initializing all servos.
•Setting all servos to the “up” position.
•Looping between “up” and “down” until keypress.
•Releasing all servos.
Robot configurations like “up” and “down” are stored as arrays with one integer value per dof of the robot (nine in this example). They are passed as parameters to the subroutine “move”, which drives the robot servos to the desired positions by incrementally setting the servos to a number of intermediate positions.
Subroutine “move” uses local arrays for the current position (now) and the individual servo increment (diff). These values are calculated once. Then for a pre-determined constant number of steps, all servos are set to their next incremental position. An OSWait statement between loop iterations gives the servos some time to actually drive to their new positions.
137

10 Walking Robots
Program 10.3: Robot gymnastics – main
1int main()
2{ int i, delay=2;
3typedef enum{rHipT,rHipB,rKnee,rAnkle, torso,
4 |
int |
up [9] |
= |
lAnkle,lKnee,lHipB,lHipT} |
link; |
5 |
{127,127,127,127,127,127,127,127,127}; |
||||
6 |
int |
down[9] |
= |
{127, 80,200, 80,127,200, 80,200,127}; |
|
7 |
|
|
|
|
|
8/* init servos */
9serv[0]=SERVOInit(RHipT); serv[1]=SERVOInit(RHipB);
10serv[2]=SERVOInit(RKnee); serv[3]=SERVOInit(RAnkle);
11serv[4]=SERVOInit(Torso);
12serv[5]=SERVOInit(LAnkle); serv[6]=SERVOInit(LKnee);
13serv[7]=SERVOInit(LHipB); serv[8]=SERVOInit(LHipT);
14/* put servos in up position */
15LCDPutString("Servos up-pos..\n");
16for(i=0;i<9;i++) SERVOSet(serv[i],up[i]);
17LCDMenu(""," "," ","END");
18 |
while (KEYRead() != KEY4) |
/* exercise until key press */ |
|
19 |
|||
20 |
{ move(up,down, delay); |
/* move legs in bent pos.*/ |
|
21 |
move(down,up, delay); |
/* move legs straight |
*/ |
22 |
} |
|
|
23 |
|
|
|
24/* release servo handles */
25SERVORelease(RHipT); SERVORelease(RHipB);
26SERVORelease(RKnee); SERVORelease(RAnkle);
27SERVORelease(Torso);
28SERVORelease(LAnkle); SERVORelease(LKnee);
29SERVORelease(LHipB); SERVORelease(LHipT);
30return 0;
31}
Program 10.4: Robot gymnastics – move
1void move(int old[], int new[], int delay)
2{ int i,j; /* using int constant STEPS */
3float now[9], diff[9];
4
5for (j=0; j<9; j++) /* update all servo positions */
6{ now[j] = (float) old[j];
7diff[j] = (float) (new[j]-old[j]) / (float) STEPS;
8}
9for (i=0; i<STEPS; i++) /* move servos to new pos.*/
10{ for (j=0; j<9; j++)
11{ now[j] += diff[j];
12SERVOSet(serv[j], (int) now[j]);
13}
14OSWait(delay);
15}
16}
138

Sensors for Walking Robots
10.3 Sensors for Walking Robots
Sensor feedback is the foundation of dynamic balance and biped walking in general. This is why we put quite some emphasis on the selection of suitable sensors and their use in controlling a robot. On the other hand, there are a number of biped robot developments made elsewhere, which do not use any sensors at all and rely solely on a stable mechanical design with a large support area for balancing and walking.
Our humanoid robot design, Andy, uses the following sensors for balancing:
•Infrared proximity sensors in feet
Using two sensors per foot, these give feedback on whether the heel or the toe has contact with the ground.
•Strain gauges in feet
Each foot comprises three toes of variable length with exactly one contact point. This allows experimenting with different foot sizes. One strain gauge per toe allows calculation of foot torques including the “zero moment point” (see Section 10.5).
•Acceleration sensors
Using acceleration sensors in two axes to measure dynamic forces on the robot, in order to balance it.
•Piezo gyroscopes
Two gyroscopes are used as an alternative to acceleration sensors, which are subject to high-frequency servo noise. Since gyroscopes only return the change in acceleration, their values have to be integrated to maintain the overall orientation.
•Inclinometer
Two inclinometers are used to support the gyroscopes. Although inclinometers cannot be used alone because of their time lag, they can be used to eliminate sensor drift and integration errors of the gyroscopes.
In addition, Andy uses the following sensors for navigation:
•Infrared PSDs
With these sensors placed on the robot’s hips in the directions forward, left, and right, the robot can sense surrounding obstacles.
•Digital camera
The camera in the robot’s head can be used in two ways, either to support balancing (see “artificial horizon” approach in Section 10.5) or for detecting objects, walking paths, etc.
Acceleration sensors for two axes are the main sensors for balancing and walking. These sensors return values depending on the current acceleration in one of two axes, depending on the mounting angle. When a robot is moving only slowly, the sensor readings correspond to the robot’s relative attitude, i.e. leaning forward/backward or left/right. Sensor input from the infrared sensors
139

10 Walking Robots
and acceleration sensors is used as feedback for the control algorithm for balancing and walking.
10.4 Static Balance
There are two types of walking, using:
•Static balance
The robot’s center of mass is at all times within the support area of its foot on the ground – or the combined support area of its two feet (convex hull), if both feet are on the ground.
•Dynamic balance
The robot’s center of mass may be outside the support area of its feet during a phase of its gait.
In this section we will concentrate on static balance, while dynamic balance is the topic of the following section.
Our approach is to start with a semi-stable pre-programmed, but parameterized gait for a humanoid robot. Gait parameters are:
1.Step length
2.Height of leg lift
3.Walking speed
4.Leaning angle of torso in forward direction (constant)
5.Maximal leaning angle of torso sideways (variable, in sync with gait)
We will then update the gait parameters in real time depending on the robot’s sensors. Current sensor readings are compared with desired sensor readings at each time point in the gait. Differences between current and desired sensor readings will result in immediate parameter adaptations to the gait pattern. In order to get the right model parameters, we are conducting experiments with the BallyBot balancing robot as a testbed for acceleration, inclination, and gyro sensors (see Chapter 9).
We constructed a gait generation tool [Nicholls 1998], which is being used to generate gait sequences off-line, that can subsequently be downloaded to the robot. This tool allows the independent setting of each dof for each time step and graphically displays the robot’s attitude in three orthogonal views from the major axes (Figure 10.6). The gait generation tool also allows the playback of an entered gait sequence. However, it does not perform any analysis of the mechanics for the viability of a gait.
The first step toward walking is to achieve static balance. For this, we have the robot standing still, but use the acceleration sensors as a feedback with a software PI controller to the two hip joints. The robot is now actively standing straight. If pushed back, it will bend forward to counterbalance, and vice versa. Solving this isolated problem is similar to the inverted pendulum problem.
140

Static Balance
Figure 10.6: Gait generation tool
Unfortunately, typical sensor data is not as clean as one would like. Figure 10.7 shows typical sensor readings from an inclinometer and foot switches for a walking experiment [Unkelbach 2002]:
•The top curve shows the inclinometer data for the torso’s side swing. The measured data is the absolute angle and does not require integration like the gyroscope.
•The two curves on the bottom show the foot switches for the right and left foot. First both feet are on the ground, then the left foot is lifted up and down, then the right foot is lifted up and down, and so on.
Program 10.5 demonstrates the use of sensor feedback for balancing a standing biped robot. In this example we control only a single axis (here forward/backward); however, the program could easily be extended to balance left/right as well as forward/backward by including a second sensor with another PID controller in the control loop.
The program’s endless while-loop starts with the reading of a new acceleration sensor value in the forward/backward direction. For a robot at rest, this value should be zero. Therefore, we can treat this value directly as an error value for our PID controller. The PID controller used is the simplest possible. For the integral component, a number (e.g. 10) of previous error values should be added. In the example we only use two: the last plus the current error value. The derivative part uses the difference between the previous and current error value. All PID parameter values have to be determined experimentally.
141

10 Walking Robots
right foot |
|
|
|
|
left foot |
|
|
|
|
0.0 |
1.0 |
2.0 |
3.0 |
4.0 |
time [s]
Figure 10.7: Inclinometer side swing and left/right foot switch data
Program 10.5: Balancing a biped robot
1void balance( void ) /* balance forward/backward */
2{ int posture[9]= {127,127,127,127,127,127,127,127,127};
3float err, lastErr =0.0, adjustment;
4/* PID controller constants */
5float kP = 0.1, kI = 0.10, kD = 0.05, time = 0.1;
6int i, delay = 1;
7
8while (1) /* endless loop */
9{ /* read derivative. sensor signal = error */
10err = GetAccFB();
11/* adjust hip angles using PID */
12adjustment = kP*(err)
13 |
+ |
kI*(lastErr |
+ |
err)*time |
14 |
+ |
kD*(lastErr |
- |
err); |
15posture[lHipB] += adjustment;
16posture[rHipB] += adjustment;
17SetPosture(posture);
18lastErr = err;
19OSWait(delay);
20}
21}
142

Dynamic Balance
10.5 Dynamic Balance
Walking gait patterns relying on static balance are not very efficient. They require large foot areas and only relatively slow gaits are possible, in order to keep dynamic forces low. Walking mechanisms with dynamic balance, on the other hand, allow the construction of robots with smaller feet, even feet that only have a single contact point, and can be used for much faster walking gaits or even running.
As has been defined in the previous section, dynamic balance means that at least during some phases of a robot’s gait, its center of mass is not supported by its foot area. Ignoring any dynamic forces and moments, this means that the robot would fall over if no counteraction is taken in real time. There are a number of different approaches to dynamic walking, which are discussed in the following.
10.5.1 Dynamic Walking Methods
In this section, we will discuss a number of different techniques for dynamic walking together with their sensor requirements.
1.Zero moment point (ZMP)
[Fujimoto, Kawamura 1998], [Goddard, Zheng, Hemami 1992], [Kajita, Yamaura, Kobayashi 1992], [Takanishi et al. 1985]
This is one of the standard methods for dynamic balance and is published in a number of articles. The implementation of this method requires the knowledge of all dynamic forces on the robot’s body plus all torques between the robot’s foot and ankle. This data can be determined by using accelerometers or gyroscopes on the robot’s body plus pressure sensors in the robot’s feet or torque sensors in the robot’s ankles.
With all contact forces and all dynamic forces on the robot known, it is possible to calculate the “zero moment point” (ZMP), which is the dynamic equivalent to the static center of mass. If the ZMP lies within the support area of the robot’s foot (or both feet) on the ground, then the robot is in dynamic balance. Otherwise, corrective action has to be taken by changing the robot’s body posture to avoid it falling over.
2.Inverted pendulum
[Caux, Mateo, Zapata 1998], [Park, Kim 1998], [Sutherland, Bräunl 2001] A biped walking robot can be modeled as an inverted pendulum (see also the balancing robot in Chapter 9). Dynamic balance can be achieved by constantly monitoring the robot’s acceleration and adapting the corresponding leg movements.
3.Neural networks
[Miller 1994], [Doerschuk, Nguyen, Li 1995], [Kun, Miller 1996]
As for a number of other control problems, neural networks can be used to
143

10 Walking Robots
achieve dynamic balance. Of course, this approach still needs all the sensor feedback as in the other approaches.
4.Genetic algorithms
[Boeing, Bräunl 2002], [Boeing, Bräunl 2003]
A population of virtual robots is generated with initially random control settings. The best performing robots are reproduced using genetic algorithms for the next generation.
This approach in practice requires a mechanics simulation system to evaluate each individual robot’s performance and even then requires several CPU-days to evolve a good walking performance. The major issue here is the transferability of the simulation results back to the physical robot.
5.PID control
[Bräunl 2000], [Bräunl, Sutherland, Unkelbach 2002]
Classic PID control is used to control the robot’s leaning front/back and left/right, similar to the case of static balance. However, here we do not intend to make the robot stand up straight. Instead, in a teaching stage, we record the desired front and side lean of the robot’s body during all phases of its gait. Later, when controlling the walking gait, we try to achieve this offset of front and side lean by using a PID controller. The following parameters can be set in a standard walking gate to achieve this leaning:
•Step length
•Height of leg lift
•Walking speed
•Amount of forward lean of torso
•Maximal amount of side swing
6.Fuzzy control
[Unpublished]
We are working on an adaptation of the PID control, replacing the classic PID control by fuzzy logic for dynamic balance.
7.Artificial horizon
[Wicke 2001]
This innovative approach does not use any of the kinetics sensors of the other approaches, but a monocular grayscale camera. In the simple version, a black line on white ground (an “artificial horizon”) is placed in the visual field of the robot. We can then measure the robot’s orientation by changes of the line’s position and orientation in the image. For example, the line will move to the top if the robot is falling forward, it will be slanted at an angle if the robot is leaning left, and so on (Figure 10.8).
With a more powerful controller for image processing, the same principle can be applied even without the need for an artificial horizon. As long as there is enough texture in the background, general optical flow can be used to determine the robot’s movements.
144