David C. Brogan
University of Virginia Charlottesville, Virginia
3. BICYCLE SIMULATION LOCOMOTION CONTROLLER
The bicyclists in these groups consist of three components: physical simulation, locomotion controller, and navigation controller (figure 3). The physical simulation is defined by equations of motion that represent a hierarchy of rigid body parts and the rotary and telescoping joints that connect them. The equations of motion for the bicyclist were formulated using a commercially available package.12 A character's locomotion controller computes how to actuate its joints in order to move at a specified desired velocity. Due to kinematic and dynamic constraints, the locomotion controllers cannot instantaneously eliminate errors between a character's desired velocity and its actual velocity. These limitations to a character's maneuverability, or mobility constraints, are realistic and intuitive to the user, but they make it more difficult for navigation controllers to compute a desired velocity for each character that accomplishes group behaviors, obstacle avoidance, and path following.
For these experiments, we developed two similar characters, a human and an alien bicycle rider. The human bicycle rider13 is modeled by a 15-segment rigid-body model connected by rotary joints with 22 controlled degrees of freedom. Some joints, like the knee, are modeled as a single-axis pin joint; others, like the wrist and shoulder, are modeled by two- and three-axis gimbal joints. The volume, mass, center of mass, moments of inertia, and distance between the joints are calculated from a polygonal representation of the human body (figure 4 and appendix table 2). The algorithm used to calculate the properties of the polygonal model integrates over the set of tetrahedra formed by the triangular faces of the model and the origin.14 Density data obtained from the anatomical literature were used in calculating the dynamic properties of the body segments15 (appendix table 3). The degrees of freedom of the bicycle model are shown in figure 4 and the parameters of the model are given in appendix table 2. The alien bicycle rider16 has slightly different body masses and limb lengths (figure 5). Due to the similarities between the two types of bicyclists, the locomotion controller required only slight adjustments to work well for both and we will discuss the shared controller in this paper.
Figure 3. The simulation system used to animate physically simulated characters. The locomotion controller obtains a desired velocity from the navigation controller and computes the joint positions that will achieve it. The desired joint positions are passed to the joint controller, where joint torques are computed to eliminate errors in joint position. The joint torques are used by the numerical integrator to compute new positions for all the character's body parts.
Figure 4. The controlled degrees of freedom of the bicycle and human models. The human model has fourteen joints; the degrees of freedom at each joint are shown in the diagram as are the four degrees of freedom of the bicycle model. The human rider is attached to the bicycle by a pivot joint between the seat and the pelvis. The polygonal models were purchased from Viewpoint Datalabs.
The navigation controller eliminates errors in the bicyclist's velocity by adjusting the facing direction and speed of the bicycle. The simulated human rider controls the facing direction and speed of the bicycle by applying forces to the handlebars with the hands and to the pedals with the feet. Spring and damper systems connect the hands to the handlebars, the feet to the pedals, and the crank to the rear wheel. The connecting springs are two-sided, and the bicyclist is able to pull up on the pedals as if the bicycle were equipped with toe-clips and a fixed gear.
The locomotion control system adjusts the speed of the bicycle by moving the bicyclist's legs to produce a torque at the crank. The desired torque at the crank is c = k(v - vd ), where k is a gain, v is the magnitude of the velocity, and vd is the desired velocity (specified by the navigation controller). The force that can be applied by each leg depends on the angle of the crank because we assume that the legs are most effective when pushing downwards. When the crank is horizontal, the front leg can generate a positive torque and the rear leg can generate a negative torque. To compensate for the crank position, the desired forces for the legs are scaled by a weighting function between zero and one that depends on the crank position, c :
w= sin(c ) + 1 . 2 (1)
If c > 0, the force on the pedal that the left leg should produce is
wc fl = l (2)
Figure 5. The DOFs of the bicycle and alien models. The alien model has fourteen joints; the DOFs at each joint are shown in the diagram as are the four DOFs of the bicycle model. The alien rider is attached to the bicycle by a pivot joint between the seat and the pelvis.
where l is the length of the crank arms. The desired pedal force for the right leg is
fr = (1 - w)c l (3) If c is less than zero, the equations for the left and right leg are switched. A kinematic model of the legs is used to compute hip and knee torques that will produce the desired pedal forces.
To steer the bicycle, the locomotion control system computes a desired angle for the fork based on the errors in roll and yaw:
f = -k ( - d ) - k + k ( - d ) + k (4)
where , d , and are the roll angle, desired roll angle, and roll velocity, respectively, and , d , and are the yaw angle, desired yaw angle (specified by the navigation controller), and yaw velocity. k , k , k , and k are gains. Inverse kinematics is used to compute the shoulder and elbow angles that would position the hands on the handlebars with a fork angle of f ; proportional-derivative servos move the shoulder and elbow joints toward those angles.
These locomotion control laws leave the motion of several joints of the bicyclist unspecified. The wrists and the waist are held at a constant angle with proportional-derivative controllers. The ankle joints are controlled to match data recorded from humans.