The apparent gravity force acting on the endeffector of a haptic device
depends on its position inside the workspace through a nonlinear relationship,
and it is not necessarily aligned with the actual direction of gravity. Setting up an exact gravity
compensation algorithm for a given device requires to know the actual direction of gravity
force, the kinematical and dynamical models, and finally it must be formulated in the jointspace.
Libralis works for all existing 3DoF haptic devices, for which the problem can be formalized
directly in the 3D task space instead of the joint space. It implements an estimationbased
piecewise linear approximation of the nonlinear relationship between the
apparent gravity and the endeffector position, thus removing all dependencies on the mechanical models
and on the real direction of the gravity force.
Libralis Tuner allows to perform an
offline recursive algorithm to automatically estimate the required
gravity compensation terms to be applied to the endeffector at a
given set of positions, corresponding to the vertices of a cubic grid
contained into the device workspace.
First, the Tuner creates a cubic grid forming a parallelepipedon contained
inside the device workspace. Then a recursive procedure is applied to estimate
the gravity compensation term which is required at each vertex of the grid.
The required gravity compensation term is estimated using a proportionalderivative
(PD) position controller, whose parameters depend on the mass estimated at the previous step.
The same PD controller is also used to actively move the endeffector to each vertex of the grid,
so that the precedure can be automatically run.
Finally, the Tuner stores the acquired gravity data in a userdefined file.
The online gravity compensation is performed by recovering the data from the offline saved files.
Libralis SDK provides developers with the methods to select and load the desired file, to recover
the stored data and to apply gravity compensation directly in the haptic servoloop.
Reffering to the figure (a), the compensation term at each position X inside the cubic grid
is computed online using the trilinear interpolation between the gravity values Gi estimated at the
vertices of the cube containing X. At each position X falling outside the grid, its projection on the nearest
cube face is computed, and the compensation term is approximated by interpolating the required force for the
projected point, as shown in figure (b).
Experiments shown that the effects of gravity can be compensated almost homogeneously with respect
to endeffector position in the workspace, independently from the device kinematics
and from the particular orientation in which the haptic device has been displaced.

