MOVE ANGLE(3)

NAME
JOINT_LEVEL_CONTROL, MOVE_ANGLE, SET_JTORQUE, SET_ANGLE, SET_JTORQUE_BIAS -- RCI CHG macros to move the robot at the joint level.

USAGE
#include <rci.h>

JOINT_LEVEL_CONTROL(rbt)
   RCI_RBT *rbt;

MOVE_ANGLE(rbt, ang, jnt)
   RCI_RBT *rbt;
   float ang;
   int jnt;

SET_JTORQUE(rbt, tor, jnt)
   RCI_RBT *rbt;
   float tor;
   int jnt;

SET_ANGLE(rbt, ang, jnt)
   RCI_RBT *rbt;
   float ang;
   int jnt;

SET_JTORQUE_BIAS(rbt, tor, jnt)
   RCI_RBT *rbt;
   float tor;
   int jnt;

ARGUMENTS

rbt --
    Pointer to RCI robot structure.

ang --
    Joint value (radians or millimeters).

jnt --
    Robot joint number.

tor --
    Joint force value (Newton-meters or Newtons).

DESCRIPTION
This is a set of CHG macros that post joint-level commands to the robot interface. Joint-level refers to joint operation at the level after the gear train. Joint control directly at the actuator level is achieved using the motor-level commands described in move_encoder(3).

These macros may be called from any part of an RCI program. The RCI interface must first be placed into joint-level mode, using the JOINT_LEVEL_CONTROL() macro, before the other macros will be accepted.

JOINT_LEVEL_CONTROL() puts the robot interface into joint-level mode, requiring that only joint-level motion commands be issued to the robot during the same and subsequent control cycles. The controlLevel field of the HOW structure is set to JOINT_LEVEL.

MOVE_ANGLE() instructs the robot to move the joint specified by jnt to the value specified by ang during the next control cycle. The requested value is written into the angSet field of the HOW structure.

SET_JTORQUE() instructs the robot to put the joint specified by jnt into torque mode with a force specified by tor. The requested value is written into the jtorqueSet field of the HOW structure. The joints which are currently in torque mode are indicated by a bitmask in the torqueMode field of the HOW structure.

SET_ANGLE() instructs the robot to explicitly set the value for the joint specified by jnt to the value ang; this is mainly of interest when calibrating the robot. It is not supported on the PUMA robot. The set value is written into the angSet field of the HOW structure.

SET_JTORQUE_BIAS() instructs the robot to add a feedforward bias current to the control output for the joint indicated by jnt. The set value is written into the jtorqueBias field of the HOW structure. This bias current will normally not have any effect when the joint is in torque mode.

Each motion command will override all previous motion commands given to the same joint during the same cycle.

DIAGNOSTICS
Errors will result in an abort condition. Defined error conditions include:

EBadCmd --
    One of the above commands was requested with the interface not in joint-level mode, or a command was requested that is not currently supported.

EReqPos --
    The requested angle value was out of range.

EReqVel --
    The velocity resulting from the request would exceed limits.

EReqTor --
    The requested torque exceeds limits.

The limit and range checking can be switched on or off with the SET_CHECKING() macro.

SEE ALSO
CHG(3), HOW(3), MOVE_ENCODER(3), SET_CHECKING(3).