Katana 6M - CoSy project report
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:
- The end-effector of Katana 6M has only 5 DOF,
thus in general the configuration of the end-effector will not correspond
to an arbitrary frame of reference of a rigid object (6 DOF). This means
that there is no qualitative correspondence between movement of the
end-effector and an object.
- Slow RS-232 serial communication with PC
does not allow for a direct control of the torque of DC motors (brushless
DC motors would be better in this case), but only for position control
through PID control algorithm. Therefore, a collective of control all
motors is not feasible in practice, e.g. using computed torque control law
which incorporates dynamical properties of the arm body.
- Katana 6M robotic arm is stiff,
which, in
conjunction with position control, makes manipulation very constrained,
unnatural and dangerous to environment and the arm itself.
- The end-effector has no torque sensors
which are necessary to learn dynamical properties of manipulated objects.
In any case, without elastic actuators torque sensors can be hard to use
because of too constrained/stiff motion of the arm (though, it might be
still possible to use an elastic finger in experiments which do not
involve grasping).
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:
- 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.
- 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:
- To synchronously start or halt all motors
(the first method), or motors 1-5 (the second method).
- To set basic parameters of PID algorithm,
as well as limit values of position, velocity and acceleration for each
motor separately.
- To read current position and velocity of
each motor, also during active movement.
- To read values of IR, force and contact
sensors.
Most important limitations and problems
(assuming existing hardware):
- MCU needs some pre-processing to begin the
movement along a trajectory. This means that any trial of stacking
together two or more trajectories with boundary velocities larger than
zero will result in a (very) jerky movement
that can easily damage the
arm.
- It is not possible to send more
“lightweight” trajectories, e.g. defined as a single, third
degree polynomial. Because of a significant communication speed up with
the arm, such facility would enable introducing a completely new
reactive-control paradigm (see the next sections).
- The trajectory based method of control
does not apply to the gripper.
- Very poor resolution of velocity and
acceleration readings.
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:
- 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).
- 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:
- The point-to-point movement paradigm
seriously limits applications of Katana, especially in research. Almost
all movements generated by humans use sensory feedback to change their
shape/profile as needed. KNI does not provide this facility in a reliable
(and elegant) manner, apart from the ability to entirely halt a movement.
- Very limited trajectory shapes/profiles
(just one, though 4 polynomials would not allow for much more). A
universal interface for generation trajectories of various shapes/profiles
is needed, e.g. to generate trajectories from arbitrary sets of points,
differential equations, geometric primitives, etc.
- Movements on trajectories are unreliable.
There is not
any path/trajectory search, which would help finding feasible
trajectories given the destination point.
- Poor accuracy of movements along
trajectories, since only boundary points
lie on a line in Cartesian
coordinates (third degree polynomials allow for much more).
- Calibration routines can potentially
damage the arm, since they do not take into account an initial
configuration of all joints.
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:
- Inverse transformation to be able to
plan, learn and make predictions in the task space rather than in the
joint space.
- The problem of manipulability or an effective
number of DOF in different regions of the workspace. To make the matter
worse, Katana 6M has only 5 DOF, i.e. there are no regions where a (infinitesimal)
motion of the end-effector corresponds to a rigid body motion. This may seriously
hamper learning which
is based
on understanding object behaviour/manipulation
through the link between the end-effector and an object. Still any mobile
platform can be used to displace the whole arm, as e.g. birds can change the
pose of a whole body; however this would require introducing much more
complex abstraction level involving a mobile platform and certainly many
other elements. Katana 6M 90 enables
“hiding” of one “rotational
dimension” of the end-effector (a thin, long object)
which may be an
interesting option for experiments which do not involve grasping.
- All trajectories can be also constrained more
globally, not only in terms of manipulability at the end-points, i.e. they
should be planned globally to avoid collisions or just infeasibility.
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:
- 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).
- 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).
- 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.