#include <ArGripper.h>
Public Types | |
enum | Type { QUERYTYPE, GENIO, USERIO, GRIPPAC, NOGRIPPER } |
These are the types for the gripper. More... | |
Public Member Functions | |
ArGripper (ArRobot *robot, int gripperType=QUERYTYPE) | |
Constructor. | |
void | connectHandler (void) |
The handler for when the robot connects. | |
int | getBreakBeamState (void) const |
Returns the state of the gripper's breakbeams. | |
int | getGraspTime (void) const |
Gets the grasp time. | |
int | getGripState (void) const |
Returns the state of the gripper paddles. | |
long | getMSecSinceLastPacket (void) const |
Gets the number of mSec since the last gripper packet. | |
int | getPaddleState (void) const |
Returns the state of each gripper paddle. | |
int | getType (void) const |
Gets the type of the gripper. | |
bool | gripClose (void) |
Closes the gripper paddles. | |
bool | gripOpen (void) |
Opens the gripper paddles. | |
bool | gripperDeploy (void) |
Puts the gripper in a deployed position, ready for use. | |
bool | gripperHalt (void) |
Halts the lift and the gripper paddles. | |
bool | gripperStore (void) |
Puts the gripper in a storage position. | |
bool | gripPressure (int mSecIntervals) |
Sets the amount of pressure the gripper applies. | |
bool | gripStop (void) |
Stops the gripper paddles. | |
bool | isGripMoving (void) const |
Returns true if the gripper paddles are moving. | |
bool | isLiftMaxed (void) const |
Returns the state of the lift. | |
bool | isLiftMoving (void) const |
Returns true if the lift is moving. | |
bool | liftCarry (int mSecIntervals) |
Raises the lift by a given amount of time. | |
bool | liftDown (void) |
Lowers the lift to the bottom. | |
bool | liftStop (void) |
Stops the lift. | |
bool | liftUp (void) |
Raises the lift to the top. | |
void | logState (void) const |
logs the gripper state | |
bool | packetHandler (ArRobotPacket *packet) |
Parses the gripper packet. | |
void | setType (int type) |
Sets the type of the gripper. | |
virtual | ~ArGripper () |
Destructor. | |
Protected Attributes | |
ArFunctorC< ArGripper > | myConnectCB |
unsigned char | myGraspTime |
ArTime | myLastDataTime |
ArRetFunctor1C< bool, ArGripper, ArRobotPacket * > | myPacketHandlerCB |
ArRobot * | myRobot |
unsigned char | myState |
unsigned char | mySwitches |
int | myType |
The commands which start with grip are for the gripper paddles, the ones which start with lift are the for the lift, and the ones which start with gripper are for the entire unit.
Definition at line 80 of file ArGripper.h.
|
These are the types for the gripper.
Definition at line 136 of file ArGripper.h. |
|
Constructor.
Definition at line 36 of file ArGripper.cpp. References ArRobot::addConnectCB(), ArRobot::addPacketHandler(), ArRobot::comInt(), GRIPPAC, ArRobot::isConnected(), QUERYTYPE, and ArTime::setToNow(). |
|
Returns the state of the gripper's breakbeams.
Definition at line 338 of file ArGripper.cpp. References GENIO, ArRobot::getAnalogPortSelected(), ArRobot::getDigIn(), GRIPPAC, ArLog::log(), NOGRIPPER, QUERYTYPE, and USERIO. Referenced by logState(), and ArModeGripper::userTask(). |
|
Gets the grasp time. If you are using this as anything other than GRIPPAC and you want to find out the grasp time again, just do a setType with QUERYTYPE and it will query the robot again and get the grasp time from the robot.
Definition at line 540 of file ArGripper.cpp. |
|
Returns the state of the gripper paddles.
Definition at line 302 of file ArGripper.cpp. References GENIO, ArRobot::getAnalogPortSelected(), ArRobot::getDigIn(), GRIPPAC, ArLog::log(), NOGRIPPER, QUERYTYPE, and USERIO. Referenced by logState(), and ArModeGripper::userTask(). |
|
Gets the number of mSec since the last gripper packet.
Definition at line 528 of file ArGripper.cpp. References ArTime::mSecSince(). Referenced by logState(). |
|
Returns the state of each gripper paddle.
Definition at line 268 of file ArGripper.cpp. References GENIO, ArRobot::getAnalogPortSelected(), ArRobot::getDigIn(), GRIPPAC, ArLog::log(), NOGRIPPER, QUERYTYPE, and USERIO. Referenced by ArModeGripper::userTask(). |
|
Gets the type of the gripper.
Definition at line 510 of file ArGripper.cpp. |
|
Closes the gripper paddles.
Definition at line 77 of file ArGripper.cpp. References ArRobot::comInt(). Referenced by ArModeGripper::userTask(). |
|
Opens the gripper paddles.
Definition at line 65 of file ArGripper.cpp. References ArRobot::comInt(). Referenced by ArModeGripper::userTask(). |
|
Puts the gripper in a deployed position, ready for use.
Definition at line 149 of file ArGripper.cpp. References ArRobot::comInt(). |
|
Halts the lift and the gripper paddles.
Definition at line 161 of file ArGripper.cpp. References ArRobot::comInt(). |
|
Puts the gripper in a storage position.
Definition at line 137 of file ArGripper.cpp. References ArRobot::comInt(). |
|
Sets the amount of pressure the gripper applies.
Definition at line 173 of file ArGripper.cpp. References ArRobot::comInt(). |
|
Stops the gripper paddles.
Definition at line 89 of file ArGripper.cpp. References ArRobot::comInt(). |
|
Returns true if the gripper paddles are moving.
Definition at line 203 of file ArGripper.cpp. References GENIO, ArRobot::getAnalogPortSelected(), GRIPPAC, ArLog::log(), NOGRIPPER, QUERYTYPE, and USERIO. Referenced by logState(). |
|
Returns the state of the lift.
Definition at line 376 of file ArGripper.cpp. References GENIO, ArRobot::getAnalogPortSelected(), ArRobot::getDigIn(), GRIPPAC, ArLog::log(), NOGRIPPER, QUERYTYPE, and USERIO. Referenced by logState(), and ArModeGripper::userTask(). |
|
Returns true if the lift is moving.
Definition at line 235 of file ArGripper.cpp. References GENIO, ArRobot::getAnalogPortSelected(), GRIPPAC, ArLog::log(), NOGRIPPER, QUERYTYPE, and USERIO. Referenced by logState(). |
|
Raises the lift by a given amount of time.
Definition at line 188 of file ArGripper.cpp. References ArRobot::comInt(). |
|
Lowers the lift to the bottom.
Definition at line 113 of file ArGripper.cpp. References ArRobot::comInt(). Referenced by ArModeGripper::userTask(). |
|
Stops the lift.
Definition at line 125 of file ArGripper.cpp. References ArRobot::comInt(). |
|
Raises the lift to the top.
Definition at line 101 of file ArGripper.cpp. References ArRobot::comInt(). Referenced by ArModeGripper::userTask(). |
|
Sets the type of the gripper.
Definition at line 518 of file ArGripper.cpp. References ArRobot::comInt(), GRIPPAC, and QUERYTYPE. |