Table of Contents

Joint Command Limiter

The main purpose of the Joint Command Limiter is to avoid the robot hitting its joint limits and to avoid the hand hitting its own arm. Basically, once position, velocity and acceleration ranges are specified for any joint, the idea is to keep the robot within these ranges all the time. Imagine for example, that certain joint is going with a high speed against its mechanical limit, then the limiter's job is to know how far the joint can continue with this speed and when to start breaking so that neither the acceleration limit nor the position limit (mechanical limit) are violated.

On the other side, the limiter should interfere as least as possible with the main controller acting only when the ranges are actually going to be trespassed.

As the previous image shows, ideally the joint limiter should allow a joint to move at its maximum velocity until a certain position d is reached where the joint should start braking with the maximum allowed deceleration. That way, the joint velocity should be zero by the time it reaches the joint limit.

Ranges

A range is an interval. It has a min and a max value (or as in RobotCheck.hh a start and end). Each joint has 3 ranges which describe allowed (good) regions in terms of acceleration, velocity and position. That is, each joint has

RangeAcc: [acc_min, acc_max]
RangeVel: [vel_min, vel_max]
RangePos: [pos_min, pos_max]

within it should stay. pos_min and pos_max are the mechanical joint limits.

Hand Limits

For the last two joints (5 and 6 starting from 0) the Joint Limiter not only checks that the individual joint ranges are respected. Since the hand (attached to the 6th joint) could collide with its own arm before the normal joint limits are reached (such a collision depends also on the position of joint 5), the Joint Limiter needs to take care about this as well.

The previous image helps us to visualize this problem. It represents positions of joint 6 vs. positions of joint 5. Keeping the positions of these joints within the region delimited by the blue line will prevent self collisions. Note, that not only the positions of these joints should be kept inside ranges, but also the velocities and accelerations. The next figure illustrates the idea.

Given a certain position in the j5-j6 plane and assuming certain velocities, an intersection point of the current trajectory and the border can be calculated. This point then determines new position limits for j6 and j5. These limits will change as the velocity vector in the j5-j6 plane changes.

Finally the idea is to transform acceleration and velocity ranges to future positions and check for range intersections and to determine strategies in order to limit the velocity commands. As an example, questions like “What to do if there's no range intersection?”, “In which cases could that happen?”, “What does mean that there is no intersection?”, etc. arise when analyzing this problem.

Intersection of allowed Joint Ranges

Based on the current joint state, the four ranges position (pos), velocity (vel), acceleration (acc) and braking-velocity (brk) are converted into the position (-increment) domain. Thus, the range vel depends on the current joint position, acc depends on the current joint position and -velocity and brk depends on the current joint position (and sampling rate).

The range vel is symmetric around the current position, acc is symmetric around the current position plus the current velocity. The computed range brk should always contain the current position.

After these conversions, the ranges are intersected. This may lead to the case, that one of these intersections is empty. The following cases might occur:

pos vel acc brk
pos - 1 2 3
vel - 4 5
acc - 6
brk -

Remedies

None of the above situations should happen 'if we did everything right', but we can't afford this limiter to crash then. We need to complete this specification and give one of each ranges priority.

We have two suggestions:

  1. Reduce the position limits slightly, so that we have room for small numerical errors. Half a degree should be enough. This means, that we must distinguish between the real (hard) limits and the slightly smaller soft limits.
  2. Modify the intersection operation to give priority to one of the ranges (either the first or the second).

The goals are:

  1. Keep the robot safe. Avoid crashing into its hard limits. Let it use it's brakes if it must!
  2. Keep the controllers happy by not violating the limits.
  3. Still only interfere as much as we must.

Evaluation of conflicts

Our priorities

These results lead to the following priorities:

  1. pos_hard
  2. vel
  3. acc
  4. brk
  5. pos_soft

The braking velocity is computed using the soft limits.

TODO