The end effector positioning is done using an pseudoinverse kinematic algorithm after Whitney [5]. A goal position is defined by dragging a coordinate axis frame using the mouse. The inverse kinematic algorithm transforms the Cartesian coordinates of the goal into a set of joint angles for the chain. If the joint angles of the chain are represented as T and the Cartesian coordinate goal as X, then the goal can be defined as a function of the joint angles.
X = (T) (1)
The animator program provides a mapping from Cartesian space to joint angle space so that we can find the joint angles given the Cartesian position of the end effector.
T = inv(X) (2)
For an articulated figure with many redundant degrees of freedom, the function gets very difficult to calculate because it is highly nonlinear. Whitney's approach is to linearize the relationship by taking the derivative of with respect to time and getting
dX/dt = X^ = J(T)T^ (3)
where J(T) is the Jacobian of with respect to T and the elements of J are
[J]ij = dxi/dTj , 1 <= i <= n, 1 <= j <= m (4)
where n is the dimension of X and m is the dimension of T. The Jacobian is the matrix of partial derivatives of with respect to the various components of the joint rotation matrix. The Jacobian varies over time as the articulation is moved.
To get the joint angles from equation 3, we have to divide both sides by time and invert the Jacobian.
dT = J-1(T)dX (5)
When m > n as in the case of the figure's arms, J is not invertable. This necessitates the use of a pseudo inverse of the Jacobian. The animator program uses a Moore Penrose pseudoinverse which is computed iteratively. [23]
The program uses the relation
dT = J+(T)dX (6)
where J+ is the Moore Penrose pseudoinverse of the Jacobian.
When the chain's end effector goal is dragged in 3D space, the current position of the end effector is subtracted from the goal to yield dX. The Jacobian of the current chain configuration is then calculated and inverted. The inverted Jacobian is inserted with dX into equation 6 and the new joint rotation velocities are produced. These velocities are then applied to the links in the chain.
To reduce tracking error in the movement, the algorithm checks the new end effector goal distance. If the new end effector position is within a specified limit of the goal position, the figure is redrawn using the new link positions. If the difference between end effector and goal is too large, a new dX is created that is half the length of the original dX and the process is repeated. These iterations continue until the end effector is within some epsilon of the goal.
Table of Contents | The Structure of the Figure | Problems with the Implementation> |