Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File 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.


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.


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.


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

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

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

long ArGripper::getMSecSinceLastPacket void   )  const
 

Gets the number of mSec since the last gripper packet.

Returns:
the number of milliseconds since the last packet

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

int ArGripper::getType void   )  const
 

Gets the type of the gripper.

Returns:
the gripper type
See also:
Type

bool ArGripper::gripClose void   ) 
 

Closes the gripper paddles.

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

bool ArGripper::gripOpen void   ) 
 

Opens the gripper paddles.

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

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

bool ArGripper::gripperHalt void   ) 
 

Halts the lift and the gripper paddles.

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

bool ArGripper::gripperStore void   ) 
 

Puts the gripper in a storage position.

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

bool ArGripper::gripPressure int  mSecIntervals  ) 
 

Sets the amount of pressure the gripper applies.

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

bool ArGripper::gripStop void   ) 
 

Stops the gripper paddles.

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

bool ArGripper::isGripMoving void   )  const
 

Returns true if the gripper paddles are moving.

Returns:
true if the gripper paddles are moving

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

bool ArGripper::isLiftMoving void   )  const
 

Returns true if the lift is moving.

Returns:
true if the lift is moving

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

bool ArGripper::liftDown void   ) 
 

Lowers the lift to the bottom.

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

bool ArGripper::liftStop void   ) 
 

Stops the lift.

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

bool ArGripper::liftUp void   ) 
 

Raises the lift to the top.

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

void ArGripper::setType int  type  ) 
 

Sets the type of the gripper.

Parameters:
type the type of gripper to set it to


The documentation for this class was generated from the following files:
Generated on Thu Jan 7 10:34:41 2010 for Aria by  doxygen 1.4.2