maintain(3)

NAME
maintain -- RCCL routine to "place" a virtual manipulator.

USAGE
mid = maintain (mnp, pos)
  MANIP *mnp;
  POS *pos;

ARGUMENTS

mnp --
    Manipulator reference structure.

pos --
    Target position to be maintained.

mid --
    Motion ID, used to control the maintain request or query its status.

RESTRICTIONS
This routine must be called from the planning level, and may be used for virtual manipulators only.

DESCRIPTION
This routine "puts" a virtual manipulator at the specified target position immediately, and keeps it there (tracking the target position) until some other motion request is made on the manipulator. maintain() does not "drive" the manipulator to the target position the way move() does.

The transition time associated with a maintain() request is normally set to 0, unless previously set with setTime().

A maintain request is a motion request like any other: the returned motion ID value can be used to obtain status information about the motion (see motionStatus(3)), or terminate it (see stopMotion(3)). A motion ID can be explicitly set ahead of time 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:

ENotDefined --
    maintain() was called on a real robot.

ENoSpace --
    The motion queue does not have enough space to store the requested motion request (NOTE: this can occur idependently of the motion queue size, which is the number of requests that can be put on the queue at any one time. That is because the size of a motion request is not fixed).

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

SEE ALSO
rcclCreate(3), makePosition(3), stop(3), setMotionFlag(3), setTime(3), waitForMotion(3), motionStatus(3), stopMotion(3), setMotionQueueSize(3), rcclSetOptions(3), setMotionHold(3), errorStack(3).