Emergent Behavior based Limb Control using the Repulsive Root Technique

The goal of this work was to create a method of controlling multiple joint arms that is adaptable to varying conditions over time. The method uses a combination of techniques; initially it uses emergent behavior, each segment acting independently, from which the functionality of the arm emerges. In order to reach targets at all points within the reach of the limb a "repulsive root" technique was employed. This paper details algebraic forms of solving for the limb segment angles for 2 and 3 degree of freedom arms, references the Jacobian Inverse technique, and then introduces the repulsive root technique. The system was tested in simulation using C/C++ and OpenGL; results are discussed. This method is not meant to be the final solution to the problem, but instead an exploration technique that provides data to an opportunistic learning

INTRODUCTION Robotic limbs are common in both mobile robots and in assembly robots in manufacturing plants. To find the position of the end effector of the arm, forward kinematics [1] is used. To determine the joint angles needed to put the end effector in some desired position, inverse kinematics [2] is used. For limbs with 2 or 3 degrees of freedom, there are algebraic/trigonometric solutions that are fairly straight forward. For arms with more than 3 degrees the inverse jacobian [3] is used along often in combination with a stepwise numerical solution.
One of the problems that occurs with these solution methods is that as the number of joints increases, the solution gets more and more complex. Part of this is because that each new joint introduces the possibility of having alternate solutions to the problem. Fig. 1 below illustrates the problem. As can be seen, the end effector can be placed at position P3 two different ways. For each new degree of freedom added to the limb this problem is compounded.
The following section briefly details the algebra of a 2degree of freedom (DOF) solution. The location of P1 will be assumed to be (0,0), and the lengths of the segments, and the angles between the segments are known. Using these values, the locations of the ends of the segments, P2 and P3 can be calculated using forward kinematics as is shown below. P2x = L1cos θ1 P2y = L1sin θ1 P3x = L1cos θ1 + L1cos (θ1 + θ2) P3y = L1sin θ1 + L1sin (θ1 + θ2) The following definitions and equations describe the locations of the relevant parts of the 2 DOF arm in a inverse kinematics situation. This situation is very important because it tells what θ1 and θ2 need to be for a desired end effector's position (P3). Two important formulas that will be used to algebraically solve these equations will be the Law of Sins and Law of Cosines. They are stated below: Law of Sins:  Algebraic solutions for the forward and inverse kinematics of a 3 DOF arm are somewhat similar to those described in the previous paragraphs. The difference is that the algebra gets more complex. In this section we show a numeric example for the 3 DOF arm, but do not show all of the details of the solution [4][5]. Looking to Fig. 3, it can be seen that the end effector is located at P4 at position (1,2). Since the end effector is pointing straight up, φ = 90. In this example, we will use the given angles and segment lengths to find the position of the end effector using forward kinematics. Then we will use the position of the end effector, the angle of the end effector and the lengths of the segments to find angles between the segments, inverse kinematics.
Select 90 based on the diagram in Fig. 3.
or 270 Looking at the diagram in Fig. 3, either solution will work, we select 270. θ3 = φ -(θ1 + θ2) θ3 = 90 -(90 + 270) θ3 = 90 -360 θ3 = 90 -0 θ3 = 90 The above discussion has shown how to find the solution to problems in which the limb/robotic arm has 2 or 3 degrees of freedom. The forward solutions to limbs with more degrees of freedom is straight forward, as follows: ......... Lncos(θ1 + θ2 + θn-1 + θn) y = L1sinθ1 + L2sin (θ1 + θ2) + L3sin (θ1 + θ2 + θ3) ......... Lnsin(θ1 + θ2 + θn-1 + θn) But, when more degrees of freedom are used in the inverse solution, a method relying on the Inverse Jacobian matrix is used [6]. While it allows for more flexibility in the numbers of degrees of freedom that it offers, it is a more complex procedure. As stated before the complexity of the matrix, and its solution grows with each added segment and joint in the limb.
The next section describes a simple emergent behavior based algorithm that iteratively find a solution to the problem [7]. It is relatively low in computational costs, and is effective.

II. APPROACH
When high numbers of segments are used in limbs, traditional control methods relying upon algebraic/Jacoby Inverse become complex and CPU intense operations. The method described here takes its inspiration from biology; the thinking is that animals with multi-segmented or highly flexible limbs, whether vertebrate or invertebrate, do not somehow do formal inverse kinematics in their brains in order to control their limbs.
Instead, it is proposed that they use a combination of memory and exploration. The thrust of this work is in exploration. Put another way, in order to effectively control a multi-jointed limb, a memory bank of positions is built using exploration. This memory bank can then be used as a basis for controlling the limb without having to do the exploration. For example, if the limb must be moved to a point that has been previously visited, the memory can be accessed based on the location, and the needed joint angles can be accessed and delivered to the limbs actuator controllers. If the point has not been visited, several approaches can be taken, including the following: • Nearest neighbor. The limb can be moved directly to the nearest previously explored point, and then the exploration routine can be started from there. • The memory bank can be used by a concurrently running learning system that learns by generating a function based on the contents of the memory. Neural networks are a strong candidate for this method. The algorithm developed for this work is emergent behavior based, meaning that during exploration each limb segment acts on its own to reach the target position. Initially, stage 1 of the exploration, we let each joint act independently in order to reach the target. Each joint independently seeks out the target position using a pair of left and right proximity sensors, see Fig. 4. To move towards the target, the segment adjusts its angle towards the sensor which detects the highest target strength. The effect is that the arm will smoothly move towards the target, if, and only if the target is not close to the base of the arm.
Target positions that are close to the base of the arm require the arm to contort itself into positions that require some joints to head away from the object and some to head towards the object. In order to solve this aspect of the problem we introduce the idea of the "repulsive root". This idea is for when the target is within the perimeter of the total length of the segments. Once the stage one emergent behavior converges, starting at the lowest segment (it's base or "root"), segments are switched to moving away from the target, instead of to it. Using this strategy, a bend in the arm can be formed, and the bend will be smooth because the lowest segments will be repulsed one by one until the target is reached. Remember that while the lower segments are moving away from the target, the upper segments will be moving towards it. III. IMPLEMENTATION AND TESTING To test the algorithm, a program was written in C/C++ and OpenGL graphics. The arms are instantiated as objects in which the number of segments is an input parameter. The control techniques tested were algebraic (using the previously discussed methods), a table based learning technique in which a two jointed arm goes through a learning stage that populates a lookup table based on location, stage1 of the emergent behavior exploration technique, and finally the emergent behavior technique paired with the repulsive root. Fig. 5 below shows a 30-link arm touching its target (the red dot).   During the simulation, the target is controlled by the mouse.
The simulation is set up so the mouse controls the targets location, leading to the limbs chasing the target about the screen.

IV. RESULTS AND CONCLUSIONS
The simulation results are promising. The arm or arms find their way to the target reliably. Because this technique is iterative, vs. the analytical techniques discussed in the background section, the computation costs are low. While there are multitudes of ways that a 30 joint arm can touch a given target location, the repulsive root technique does not consider them, it only knows if it has reached the target, or if it needs to keep iterating towards it. Because of this, the algorithmic complexity is reduced when compared to a more traditional technique such as the Jacobian Inverse.
Although it was not an expressed goal of the work, the algorithm produces an almost life like movement of the limbs in the simulation. With more polish, this system may be useful in animation work.
Finally, this work is not meant to be the final algorithm of the control system. Instead it is meant to be a flexible exploration algorithm that feeds data to the learning system, which in turn develops the control function/algorithm.