initJnts(3)

NAME
initJntsByName, initJntsByManip -- RCCL routines for initializing JNTS types.

USAGE
#include <rccl.h>

JNTS *initJntsByName (jr, name)
   JNTS *jr;
   const char *name;

JNTS *initJntsByManip (jr, mnp)
   JNTS *jr;
   MANIP *mnp;

ARGUMENTS

jr --
    Result JNTS structure.

name --
    Name of a robot for which a JNTS type should be initialized.

mnp --
    Manipulator reference structure for which a JNTS type should be initialized.

RESTRICTIONS
initJntsByName() must be called from the planning level.

DESCRIPTION
The RCCL JNTS type describes the joint values for any manipulator. In addition to the value field v, it contains the fields num (the number of joints) and type (the type of each joint), which are specific to a particular manipulator. To automatically instantiate these fields with the values appropriate to a particular robot, RCCL provides the following routines:

initJntsByName() sets the num and type fields to values appropriate for the robot with the given name.

initJntsByManip() sets the num and type fields to values appropriate for the robot specified by the given MANIP structure. A MANIP structure is returned by rcclCreate().

Both routines return a pointer to their jr argument.

DIAGNOSTICS
These routines return NULL in the event of an error. They will automatically abort the program if the option RCCL_ERROR_EXIT is set (see rcclSetOptions(3)). Error codes and messages are placed on the errorStack (q.v.).

initJntsByName() may set the following error codes:

ENotDefined --
    The named robot is not defined in the system tables.

EInternal --
    System internal error.

EMemory --
    System out of memory.

initJntsByManip() may set the following error codes:

ENotDefined --
    The MANIP structure references a virtual manipulator.

initJntsByName() will abort the program if called from the control level.

SEE ALSO
addJnts(3), rcclCreate(3), rcclSetOptions(3), errorStack(3).