Katana 6M - CoSy project report

Marek Kopicki

14 Jan 2006


Hardware

Katana 6M is a lightweight portable robotic arm with 6 degrees of freedom (DOF), including one degree for a gripper. Katana 6M is driven by 6 DC motors which display an easily controlled linear speed-torque dependency. Each motor is controlled by a separate microcontroller (MCU) which communicates with the Katana Master Controller using Katabus - a fast internal serial bus. In turn, the Master Controller uses standard RS-232 serial protocol to communicate with PC. Position of each motor is measured by integrated encoders (proprioceptive sensing).

The gripper can be mounted in two configurations - in the direction of the forearm or with angle 90 degrees (Katana 6M 90), and can be optionally protected by crash protector. The gripper consists of two fingers which are equipped with 15 sensors including infra-red (IR), force and contact sensors. Furthermore, there can be two sensor configurations which basically differ in the way the force sensors are mounted and respond to applied force, i.e. either on spot or through whole inner surface of fingers.

Most important limitations:

Firmware

Each motor is controlled separately (distributed control) by PID control algorithm (close-loop control). Without delving into details, basing on a current motor position and velocity {xcur, vcur}, PID algorithm calculates a control signal {s} necessary to achieve the destination position and velocity {xdest, vdest} called set-point:

sInew = sIold + KI(xdest –  xcur)Δt

s = sInew + KP(xdest –  xcur) + KD(vdest –  vcur)

For suitably chosen parameters { KI, KP, KD}, PID algorithm called repeatedly in short time intervals Δt guarantees convergence to the set-point, but it does not allow for a movement along trajectories with a specified velocity profile. Fortunately, Katana firmware provides another way of control where set-points themselves can move along trajectory, as an approximation of a motor movement on so specified trajectory. Hence, firmware provides two methods of controlling of a single motor:

  1. By specifying a single static set-point. Firmware provides commands for sending set-points for each motor separately or in a group via one command.
  2. By specifying a trajectory (of set-points). A whole trajectory is defined as a set of four third degree polynomials and has to be sent individually for each motor. This command does not apply to the gripper (the sixth MCU/motor).

Furthermore, Katana firmware provides the following commands:

Most important limitations and problems (assuming existing hardware):

User interface

Katana Native Interface (KNI) is a C++ written user interface (UI), which hides communication mediums (RS-232, USB, Can Bus), protocol details, and gives relatively straightforward access to most of the commands implemented in the firmware through single function calls. KNI also implements inverse kinematics.

KNI assumes that all arm movements can be reduced to point-to-point movements, with velocities at all begin and end points equal zero. KNI provides two methods of controlling the arm movement between two points, which directly correspond to the two methods implemented on the firmware. In both cases the end point of a movement is specified in Cartesian coordinates:

  1. In the first method the arm trajectory is a result of simultaneous movement of all joints/motors to the set-points obtained from inverse transform. Naturally, user has no direct control on the trajectory shape/profile. In consequence, it is difficult to predict a motion direction of the arm (for distant set-points in particular), as well as there is no direct control on a velocity profile (velocity and acceleration can get any values within pre-defined limits).
  2. The arm trajectory is a pre-defined straight line in Cartesian coordinates with a trapezoid velocity profile. The whole trajectory is split into 4 parts or equivalently into 5 boundary points. In turn, the boundary points are transformed to the points in a joint space, and then into a set of 4 polynomials (one set for one joint/motor). The method offers an explicit control of both position and velocity.

Furthermore, KNI provides calibration routines for all motor encoders, i.e. finds encoders’ limits.

Most important limitations and problems:

New perspective

“Reactive” control paradigm

As was pointed out earlier, the main problem of the current Katana firmware/UI is not only its limited capacity to handle trajectories with various shapes and velocity profiles, but also the lack of ability to generate/alter movements in online fashion. Such a “reactive” control of the arm is essential in cognitive robotics, e.g. during manipulation, tracking, obstacle avoidance, etc. To be more precise, the firmware/UI provides a possibility to halt a movement or to rapidly change its direction (using the first control method), however these methods do not allow for a simultaneous and “transparent” control of the trajectory shape/profile.

Fortunately, the removal of just the first two limitations pointed out in the first section enables the firmware to handle (almost) arbitrarily long and complex trajectories in a new “reactive” way. The user interface (KNI), however, had to be redesigned to a much larger extent.

The new interface entirely hides Katana hardware and firmware, greatly simplifying the control of the arm. Each trajectory is generated by sending a sequence of state vectors. Each state vector is a point of a 10 dimensional phase space (5 for position of all joints + 5 for their velocity) uniquely determining the state of the arm. State vectors can be queued up creating a plan of a whole trajectory in advance. Then, the queue can be cleared at any moment and filled up with a new sequence of vectors, realising in this way the reactive control paradigm.

Optimisation and learning

The abovementioned interface addresses several “low level” problems of the arm control at the joint level, and is thought to be the most basic abstraction layer of the arm. The most important problems which still need to be tackled are:

Naturally, the above formulation does not address issues related to embodiment (see the last two limitations of the hardware) and to the sensory input (vision in particular) – it presents a more “classical” standpoint. Accepting these remarks, the following observations outline an approach which can help solving most of the mentioned “high level” control problems:

  1. There is no need to use inverse kinematics directly (e.g. in the Jacobian form), it is enough to know forward kinematics. Because the arm motion is obviously continuous, assuming that a given trajectory in the task space is feasible (it does not have to be – see the next observation), and the current joint configuration is known, one can easily calculate the next step using simple numerical methods (inverse transform will be smooth for neighbouring points).
  2. There is no need to (always) search for exact or optimal solutions of the inverse transform problem, in particular when number of DOF is smaller than 6 (e.g. on a trajectory before attaining a goal configuration; when trying to manipulate objects with “suboptimal” grasp). The problem can be turned into an optimisation problem of a function/set of functions defined on the forward transform or even directly on joints. On the other hand the optimisation approach can help finding an optimal and unique solution when not all DOF are required to complete a task (e.g. when pushing objects; in pointing task).
  3. The set of functions in the optimisation approach can be hard-coded, learnt or both. Moreover, the set of functions can be task/context dependent, as well as being dependent on one another in a complex way (e.g. orientation related to an object; distance to a goal). In addition, these functions can be parameterised by for instance sensory input (e.g. from torque sensors).

The set of functions expresses a “structure” which encodes the very basic manipulation skills. One of the most important advantages of this approach is that it does not have to rely on universal learners like NN, and allows for simple mixing learners with hard-coded functions. For instance, the number of DOF limitation of Katana 6M can be easily handled by expressing position and orientation of the gripper in different coordinate systems (a “disentanglement” their mutual dependency) and rotating the second one together with the arm. Furthermore, the optimisation approach allows incorporating in a natural way important parameters/dimensions for a specific task by specifying e.g. weights for each of them. For instance, in hand writing task the position and pressure of the gripper related to the table is more important than its orientation (which itself can be subject to any other criteria or just “hard constraints” of the arm).

The proposed approach is still under development.