fwdJacobVar(3)

NAME
fwdJacobVar, invJacobVar, fwdJacobTVar, invJacobTVar -- RCI routines to do Jacobian computations using the robot VAR structure.

USAGE
#include <robot_kynvar.h>

fwdJacobVar(dc, dj, var, kyn)
   DIFF *dc;
   float *dj;
   void *var;
   KYN *kyn;

fwdJacobTVar(t, f, var, kyn)
   float *t;
   FORCE *f;
   void *var;
   KYN *kyn;

invJacobVar(dj, dc, var, kyn, epsilon)
   float *dj;
   DIFF *dc;
   void *var;
   KYN *kyn;
   float epsilon;

invJacobTVar(f, t, var, kyn, epsilon)
   FORCE *f;
   float *t;
   void *var;
   KYN *kyn;
   float epsilon;

ARGUMENTS

dc --
    Differential coordinate changes in Cartesian space.

dj --
    Differential coordinate changes in joint space.

t --
    (Nominally) forces in joint space.

f --
    (Nominally) forces in Cartesian space.

kyn --
    Robot's KYN structure.

var --
    Robot's VAR structure (see below).

espilon --
    Specifies, in radians, how close inverse computations are allowed to get to a singularity before the result is "fudged".

DESCRIPTION
These routines perform the same Jacobian computations as fwdJacob(), fwdJacobT(), invJacob(), and invJacobT(). They differ from the latter routines only in that they take a pointer to the robot's VAR structure in place of a set of joint values.

A VAR structure is used to store certain kinematic terms that are functions of the joint position, such as the sines and cosines of the joint angles, or some Jacobian terms. Storing these quantities in a separate structure allows them to be reused by different routines without having to be recomputed.

For more details on the VAR structure and how to create and update it, see the manual page VAR(3).

Before being called with any of these functions, the VAR structure must be updated for the current robot position, and it must be reupdated for every new robot position. Below is a complete example of allocating a VAR structure and using it to call fwdJacobVar() and fwdJacobTVar(), for a 6 DOF robot named "Zeus":
        float ang[6];      /* robot joint positions */
        DIFF dc;           /* Cartesian displacement */
        FORCE f;           /* Cartesian force */
        float t[6], dj[6]; /* joint torque and displacement */
        void *var;
        KYN *kyn;

        /* ... update ang, dj, and f ... */

        kyn = getKyn("Zeus", (int*)0);
        var = malloc(getVarSize("Zeus"));

        updateVar (kyn, ang, kyn);   /* update VAR structure */
        fwdJacob (&dc, dj, var, kyn);
        fwdJacobT (t, &f, var, kyn);

NOTE: To make this example work at the RCI control level, the call to malloc() should be replaced with rciMalloc(), and the call to getKyn() should be replaced with rciGetKyn().

DIAGNOSTICS
Same as for the functions fwdJacob(), etc.

SEE ALSO
fwdJacob(3), KYN(3), VAR(3), getKyn(3), updateVar(3).