
#include <Devices/rt100.H>
Inheritance diagram for RT100:


Definition at line 50 of file rt100.H.
Public Types | |
| enum | MOTOR_STATUS { TASK_IN_PROGRESS = 0, TASK_COMPLETE = 1, ERROR_LIMIT_EXCEEDED = 2, NO_MOVEMENT = 3, MODE_ABSOLUTE_RELATIVE = 4, MODE_POSITION_FORCE = 5 } |
| enum | IP { IP0 = 0, IP1 = 1 } |
| enum | PARAM { CP_ERROR, CURRENT_POSITION, ERROR_LIMIT, NEW_POSITION, SPEED, KP, KI, KD, DEAD_BAND, OFFSET, MAX_FORCE, CURRENT_FORCE, ACCELERATION_TIME, USER_RAM, USER_IO, ACTUAL_POSITION } |
| enum | IP0MOTORS { IP0BASE1, IP0BASE2, IP0WRIST1, IP0WRIST2, IP0SENSOR } |
| enum | IP1MOTORS { IP1ELBOW, IP1SHOLDER, IP1ZED, IP1YAW, IP1GRIPPER } |
| enum | JOINTS { BASE1, BASE2, WRIST1, WRIST2, ROLL_WRIST, TILT_WRIST, SENSOR, ELBOW, SHOLDER, ZED, YAW, GRIPPER } |
| enum | MOTORS_TOGGLES { FORCE_POSITION, ABSOLUTE_RELATIVE, USER_INPUTOUTPUT } |
| enum | MOTORES_STOP { DEAD_STOP, RAMP_STOP, FREE_STOP, FREE_OFF } |
Public Member Functions | |
| RT100 (OptionManager &mgr, const std::string &descrName="UMI RT100 Robot Arm Controller", const std::string &tagName="RT100Controller", const char *defdev="/dev/ttyS0") | |
| Default constructor; see ModelComponent.H. | |
| ~RT100 () | |
| Destructor. | |
| int | init () |
| initalize the arm and set default values; | |
| int | shutdown () |
| shutdown the arm and switch off all motors | |
| int | getNumJoints () |
| get the number of joints | |
| int | setJointPosition (JOINTS joint, short int position, bool immediate=false) |
| set the joint position, if immediate is true, then initiate a move command | |
| int | getJointPosition (JOINTS joint, short int *position) |
| get the current joints position | |
| int | setJointParam (JOINTS joint, PARAM param, short int val) |
| set the joint parameter | |
| int | moveArm (bool waitUntilComplete=false) |
| move the arm to the new position | |
| bool | moveComplete () |
| return if the move arm completed | |
| int | interpolationMove (std::vector< short int > &moveVals) |
| move the arm in interpolation mode | |
| int | deferredWrite (IP ipID, unsigned int ctrl, PARAM param, short int val) |
| deferred write param to a particuler ctrl (done in 2 transactions) | |
| int | deferredRead (IP ipID, unsigned int ctrl, PARAM param, short int *val) |
| deferred read param from a particuler ctrl (done in 2 transactions) | |
| int | immediateRead (IP ipID, unsigned int ctrl, PARAM param, short int *val) |
| immediate read param from a particuler ctrl (done in 1 transactions) | |
| int | immediateWrite (IP ipID, unsigned int ctrl, PARAM param, short int val) |
| immediate write param to a particuler ctrl (done in 1 transactions) | |
| int | rawCommand (IP ip, unsigned char cmdType, unsigned char *resCode, short int *results=NULL) |
| send raw commands to the arm (one byte command) | |
| int | rawCommand (IP ipID, unsigned char cmdType, unsigned char *resCode, unsigned char *byte1, unsigned char *byte2) |
| send raw commands to the arm (one byte command) | |
| int | rawCommand (IP ip, unsigned char cmdType, unsigned char byte1, unsigned char byte2, unsigned char *resCode) |
| send raw commands to the arm (three byte command) | |
| void | initZed () |
| initalize zed to home position and reset counters | |
| void | initGripper () |
| initalize gripper to home position and reset counters | |
| void | initWrist () |
| initalize wrist to home position and reset counters | |
| void | initSholder () |
| initalize sholder to home position and reset counters | |
| void | initElbowYaw () |
| initalize elbow and yaw to home position and reset counters | |
| void | gotoHomePosition () |
| move the arm to home position | |
Static Public Attributes | |
| static const int | RT100_OK = 0 |
| static const int | RT100_FAIL = 1 |
| static const unsigned char | EMERGENCY_STOP = 0x24 |
| static const unsigned int | NUM_JOINTS = 12 |
Protected Member Functions | |
| int | switchIP (IP ipID) |
Protected Attributes | |
| nub::soft_ref< Serial > | itsPort |
| Serial port to use. | |
|
||||||||||||||||||||
|
Default constructor; see ModelComponent.H.
Definition at line 44 of file rt100.C. References ModelComponent::addSubComponent(), and itsPort. |
|
|
Destructor.
|
|
||||||||||||||||||||
|
deferred read param from a particuler ctrl (done in 2 transactions)
Definition at line 656 of file rt100.C. References itsPort, LDEBUG, LFATAL, RT100_OK, and switchIP(). |
|
||||||||||||||||||||
|
deferred write param to a particuler ctrl (done in 2 transactions)
Definition at line 696 of file rt100.C. References itsPort, LDEBUG, LFATAL, RT100_OK, and switchIP(). Referenced by gotoHomePosition(), initElbowYaw(), initGripper(), initSholder(), initWrist(), initZed(), setJointParam(), and setJointPosition(). |
|
||||||||||||
|
get the current joints position
Definition at line 188 of file rt100.C. References ASSERT, immediateRead(), LFATAL, and RT100_OK. |
|
|
get the number of joints
Definition at line 65 of file rt100.C. References NUM_JOINTS. |
|
|
move the arm to home position
Definition at line 398 of file rt100.C. References deferredWrite(), and rawCommand(). Referenced by init(). |
|
||||||||||||||||||||
|
immediate read param from a particuler ctrl (done in 1 transactions)
Definition at line 735 of file rt100.C. References itsPort, LDEBUG, LFATAL, RT100_OK, and switchIP(). Referenced by getJointPosition(). |
|
||||||||||||||||||||
|
immediate write param to a particuler ctrl (done in 1 transactions)
Definition at line 770 of file rt100.C. References itsPort, LDEBUG, LFATAL, RT100_OK, and switchIP(). Referenced by init(). |
|
|
initalize the arm and set default values;
Definition at line 352 of file rt100.C. References EMERGENCY_STOP, gotoHomePosition(), immediateWrite(), initElbowYaw(), initGripper(), initSholder(), initWrist(), initZed(), itsPort, LINFO, rawCommand(), and RT100_OK. |
|
|
initalize elbow and yaw to home position and reset counters
Definition at line 609 of file rt100.C. References deferredWrite(), EMERGENCY_STOP, i, LFATAL, and rawCommand(). Referenced by init(). |
|
|
initalize gripper to home position and reset counters
Definition at line 449 of file rt100.C. References deferredWrite(), EMERGENCY_STOP, i, LFATAL, and rawCommand(). Referenced by init(). |
|
|
initalize sholder to home position and reset counters
Definition at line 574 of file rt100.C. References deferredWrite(), EMERGENCY_STOP, i, LFATAL, and rawCommand(). Referenced by init(). |
|
|
initalize wrist to home position and reset counters
Definition at line 512 of file rt100.C. References deferredWrite(), EMERGENCY_STOP, i, LFATAL, and rawCommand(). Referenced by init(). |
|
|
initalize zed to home position and reset counters
Definition at line 418 of file rt100.C. References deferredWrite(), EMERGENCY_STOP, i, LFATAL, and rawCommand(). Referenced by init(). |
|
|
move the arm in interpolation mode
Definition at line 271 of file rt100.C. References ASSERT, LDEBUG, LFATAL, LINFO, NUM_JOINTS, rawCommand(), and RT100_OK. |
|
|
move the arm to the new position
Definition at line 235 of file rt100.C. References i, rawCommand(), and RT100_OK. |
|
|
return if the move arm completed
Definition at line 258 of file rt100.C. References rawCommand(). |
|
||||||||||||||||||||||||
|
send raw commands to the arm (three byte command)
Definition at line 889 of file rt100.C. References itsPort, LDEBUG, LFATAL, RT100_OK, and switchIP(). |
|
||||||||||||||||||||||||
|
send raw commands to the arm (one byte command)
Definition at line 857 of file rt100.C. References itsPort, LDEBUG, LFATAL, n, RT100_OK, and switchIP(). |
|
||||||||||||||||||||
|
send raw commands to the arm (one byte command)
Definition at line 831 of file rt100.C. References itsPort, LDEBUG, LFATAL, n, RT100_OK, and switchIP(). Referenced by gotoHomePosition(), init(), initElbowYaw(), initGripper(), initSholder(), initWrist(), initZed(), interpolationMove(), moveArm(), moveComplete(), and setJointPosition(). |
|
||||||||||||||||
|
set the joint parameter
Definition at line 71 of file rt100.C. References deferredWrite(), LFATAL, and RT100_OK. |
|
||||||||||||||||
|
set the joint position, if immediate is true, then initiate a move command
Definition at line 121 of file rt100.C. References deferredWrite(), LFATAL, rawCommand(), and RT100_OK. |
|
|
shutdown the arm and switch off all motors
Definition at line 650 of file rt100.C. References RT100_OK. |
|
|
Serial port to use.
Definition at line 166 of file rt100.H. Referenced by deferredRead(), deferredWrite(), immediateRead(), immediateWrite(), init(), rawCommand(), RT100(), and switchIP(). |
1.4.4