Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages | Examples

ArGripper Class Reference

#include <ArGripper.h>

List of all members.


Detailed Description

Provides an interface to the Pioneer gripper device.
Examples:

gripperExample.cpp.

Definition at line 74 of file 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< ArGrippermyConnectCB
unsigned char myGraspTime
ArTime myLastDataTime
ArRetFunctor1C< bool, ArGripper,
ArRobotPacket * > 
myPacketHandlerCB
ArRobotmyRobot
unsigned char myState
unsigned char mySwitches
int myType


Member Enumeration Documentation

enum ArGripper::Type
 

These are the types for the gripper.

Enumeration values:
QUERYTYPE  Finds out what type from the robot, default.
GENIO  Uses general IO.
USERIO  Uses the user IO.
GRIPPAC  Uses a packet requested from the robot.
NOGRIPPER  There isn't a gripper.

Definition at line 130 of file ArGripper.h.


Constructor & Destructor Documentation

ArGripper::ArGripper ArRobot robot,
int  gripperType = QUERYTYPE
 

Constructor.

Parameters:
robot The robot this gripper is attached to
gripperType How to communicate with the gripper: see ArGripper::Type. The default, QUERYTYPE, will work with most robot configurations with a recent firmware version.

Definition at line 37 of file ArGripper.cpp.


Member Function Documentation

int ArGripper::getBreakBeamState void   )  const
 

Returns the state of the gripper's breakbeams.

Returns:
0 if no breakbeams broken, 1 if inner breakbeam broken, 2 if outter breakbeam broken, 3 if both breakbeams broken

Definition at line 339 of file ArGripper.cpp.

int ArGripper::getGraspTime void   )  const
 

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.

Returns:
the number of 20 MSec intervals the gripper will continue grasping for after both paddles are triggered

Definition at line 541 of file ArGripper.cpp.

int ArGripper::getGripState void   )  const
 

Returns the state of the gripper paddles.

Returns:
0 if gripper paddles between open and closed, 1 if gripper paddles are open, 2 if gripper paddles are closed

Definition at line 303 of file ArGripper.cpp.

long ArGripper::getMSecSinceLastPacket void   )  const
 

Gets the number of mSec since the last gripper packet.

Returns:
the number of milliseconds since the last packet

Definition at line 529 of file ArGripper.cpp.

int ArGripper::getPaddleState void   )  const
 

Returns the state of each gripper paddle.

Returns:
0 if no gripper paddles are triggered, 1 if the left paddle is triggered, 2 if the right paddle is triggered, 3 if both are triggered

Definition at line 269 of file ArGripper.cpp.

int ArGripper::getType void   )  const
 

Gets the type of the gripper.

Returns:
the gripper type
See also:
Type

Definition at line 511 of file ArGripper.cpp.

bool ArGripper::gripClose void   ) 
 

Closes the gripper paddles.

Returns:
whether the command was sent to the robot or not

Definition at line 78 of file ArGripper.cpp.

bool ArGripper::gripOpen void   ) 
 

Opens the gripper paddles.

Returns:
whether the command was sent to the robot or not

Definition at line 66 of file ArGripper.cpp.

bool ArGripper::gripperDeploy void   ) 
 

Puts the gripper in a deployed position, ready for use.

Returns:
whether the command was sent to the robot or not

Definition at line 150 of file ArGripper.cpp.

bool ArGripper::gripperHalt void   ) 
 

Halts the lift and the gripper paddles.

Returns:
whether the command was sent to the robot or not

Definition at line 162 of file ArGripper.cpp.

bool ArGripper::gripperStore void   ) 
 

Puts the gripper in a storage position.

Returns:
whether the command was sent to the robot or not

Definition at line 138 of file ArGripper.cpp.

bool ArGripper::gripPressure int  mSecIntervals  ) 
 

Sets the amount of pressure the gripper applies.

Returns:
whether the command was sent to the robot or not

Definition at line 174 of file ArGripper.cpp.

bool ArGripper::gripStop void   ) 
 

Stops the gripper paddles.

Returns:
whether the command was sent to the robot or not

Definition at line 90 of file ArGripper.cpp.

bool ArGripper::isGripMoving void   )  const
 

Returns true if the gripper paddles are moving.

Returns:
true if the gripper paddles are moving

Definition at line 204 of file ArGripper.cpp.

bool ArGripper::isLiftMaxed void   )  const
 

Returns the state of the lift.

Returns:
false if lift is between up and down, true is either all the way up or down

Definition at line 377 of file ArGripper.cpp.

bool ArGripper::isLiftMoving void   )  const
 

Returns true if the lift is moving.

Returns:
true if the lift is moving

Definition at line 236 of file ArGripper.cpp.

bool ArGripper::liftCarry int  mSecIntervals  ) 
 

Raises the lift by a given amount of time.

Returns:
whether the command was sent to the robot or not

Definition at line 189 of file ArGripper.cpp.

bool ArGripper::liftDown void   ) 
 

Lowers the lift to the bottom.

Returns:
whether the command was sent to the robot or not

Definition at line 114 of file ArGripper.cpp.

bool ArGripper::liftStop void   ) 
 

Stops the lift.

Returns:
whether the command was sent to the robot or not

Definition at line 126 of file ArGripper.cpp.

bool ArGripper::liftUp void   ) 
 

Raises the lift to the top.

Returns:
whether the command was sent to the robot or not

Definition at line 102 of file ArGripper.cpp.

void ArGripper::setType int  type  ) 
 

Sets the type of the gripper.

Parameters:
type the type of gripper to set it to

Definition at line 519 of file ArGripper.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Feb 20 10:51:43 2007 for Aria by  doxygen 1.4.0