movej(3)

NAME
movej -- RCCL joint level motion request primitive.

USAGE
#include <rccl.h>

mid = movej (mnp, jnts)
  MANIP *mnp;
  JNTS *jnts;

ARGUMENTS

mnp --
    Manipulator reference structure.

jnts --
    Joint values for the manipulator to move to.

mid --
    Motion ID. This is a non-negative number either assigned automatically by the system or specified explicitly using setMotionFlag() before the call to movej().

RESTRICTIONS
This routine must be called from the planning level, and does not work for virtual manipulators.

DESCRIPTION
The movej() primitive queues a request to move the indicated manipulator to the location specified by the joint values jnts.

Parameters controlling various aspects of the motion (e.g., velocity or acceleration) are set prior to the call using various set primitives. The requested motion will take place in joint mode, regardless of whatever interpolation mode has been established by setMod(). Motion target offsets specified by distance() or setDistance() are ignored and cancelled. movej() also performs an implicit setConf(), since the joint values completely define the robot's configuration. In other respects, movej() behaves identically with the move() primitive.

The returned motion ID value can be used to obtain status information about the motion request (see motionStatus(3)), cancel it (see stopMotion(3)), or wait for it to either begin executing or finish (see waitForStop(3)). Motion IDs assigned by the system are automatically invalidated and reused after NUM_SYSMFLAGS subsequent motion requests (on all manipulators). If this is undesirable, a motion ID can be explicitly set by the program with the primitive setMotionFlag().

DIAGNOSTICS
This routine returns -1 in the event of an error. It 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.). The following error codes may be set:

ENoSpace --
    The motion queue does not have enough space to store the requested motion request packet.

ELimit --
    One or more of the requested joint values was out of range.

ENotDefined --
    An attempt was made apply movej() on a virtual manipulator.

EBadArg --
    The pointer jnts is NULL.

The routine will abort the program if called from the control level.

SEE ALSO
rcclCreate(3), move(3), waitForMotion(3), motionStatus(3), stopMotion(3), setMotionHold(3), distance(3), setConf(3), rcclSetOptions(3), errorStack(3).