control system principles
the following principles were developed for the control system in order to achieve lifelike movement whilst keeping the software simple:
an inner loop in the control module implements simultaneous movement of servos and speed restrictions on servos using the following logic which is written here as pseudo-code:
Find Distance to be moved by each
servo
Find Maximum Distance to be moved by any servo
For each servo
Timedelay = Timedelay for this servo * Distance / Maximum
Distance
Timedelay to use is the maximum of these Timedelays
For Step = 1 to Maximum Distance step Granularity
Move each servo to current position plus Step * Distance
/ Maximum Distance
Wait for Timedelay
Move each servo to final position
a single time-delay
parameter for each servo was found to be insufficient as different speeds are required for
different movements
for example a fright movement needs to move the neck quickly whilst a
relaxation movement needs to move it slowly
as a solution to this two sets of delays were implemented, one for fast
movement and one for slow movement the command module chooses between the two speeds
depending upon the vector being processed and passes the speed to the control module as a
parameter