setConf(3)

NAME
setConf -- RCCL routine to set the robot configuration.

USAGE
setConf (mnp, conf);
  MANIP *mnp;
  const char *conf;

ARGUMENTS

mnp --
    Manipulator reference structure.

conf --
    String specifying the arm configuration.

RESTRICTIONS
This routine must be called from the planning level.

DESCRIPTION
setConf() specifies a change in the configuration of the manipulator, which will take effect with the next requested motion. Any motion in which a configuration change takes place must be done in joint-interpolated mode, since this involves moving through a robot singularity.

The string conf contains characters describing the new configuration. In the case of the PUMA robot, the characters are defined as follows:
     'r' or 'l' -- "right handed" or "left handed"
     'u' or 'd' -- "elbow up" or "elbow down"
     'f' or 'n' -- "flip wrist" or "no flip wrist"

For example, to set the robot into a right handed, elbow down, wrist flipped configuration, we could issue the command sequence
        setMod (mnp, 'j');
        setConf (mnp, "rdf");
        move (mnp, mnp->last);

We ensure that we are operating in joint interpolated mode, set the new desired configuration, and then issue a motion to the current location using the manipulator's built-in last position.

The configuration code characters for other classes of robots can be determined by examining the definitions in the file h/<class>_kynvar.h, where <class> is the robot class name.

It is not necessary to specify all the characters in the configuration string. Unspecified components of the configuration will remain unchanged.

setConf() returns an integer description of the complete configuration. Mapping between integer and string representations for configurations can be done by the routines configToStr() and strToConfig().

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:

ESyntax --
    Syntax error in specification string.

ENotDefined --
    The routine was called for a virtual manipulator.

Performing a configuration change in Cartesian mode is illegal. Doing this will cause the trajectory generator to issue an RCI abort with the code EBadMove.

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

BUGS
We need to be able to set the configuration using only the integer code. We haven't done this yet because the concept of the "configuration code" is up for review.

We also don't have a routine to read back the configuration setting because this is so volatile (configurations can be partically specified, and can be changed implicitly through commands such as movej(), or the joint bias mechanism). The command getActiveConf() will read back the robot's current configuration setting.

SEE ALSO
getActiveConf(3), MANIP(3), move(3), movej(3), configToStr(3), rcclSetOptions(3), errorStack(3).