Main Page   Class Hierarchy   Compound List   Compound Members  

ArGripper Class Reference

A class of convenience functions for using the gripper. More...

#include <ArGripper.h>

List of all members.

Public Types

enum  Type {
  QUERYTYPE, GENIO, USERIO, GRIPPAC,
  NOGRIPPER
}
 These are the types for the gripper. More...


Public Methods

 ArGripper (ArRobot *robot, int gripperType=QUERYTYPE)
 Constructor. More...

virtual ~ArGripper (void)
 Destructor.

bool gripOpen (void)
 Opens the gripper paddles. More...

bool gripClose (void)
 Closes the gripper paddles. More...

bool gripStop (void)
 Stops the gripper paddles. More...

bool liftUp (void)
 Raises the lift to the top. More...

bool liftDown (void)
 Lowers the lift to the bottom. More...

bool liftStop (void)
 Stops the lift. More...

bool gripperStore (void)
 Puts the gripper in a storage position. More...

bool gripperDeploy (void)
 Puts the gripper in a deployed position, ready for use. More...

bool gripperHalt (void)
 Halts the lift and the gripper paddles. More...

bool gripPressure (int mSecIntervals)
 Sets the amount of pressure the gripper applies. More...

bool liftCarry (int mSecIntervals)
 Raises the lift by a given amount of time. More...

bool isGripMoving (void)
 Returns true if the gripper paddles are moving. More...

bool isLiftMoving (void)
 Returns true if the lift is moving. More...

int getGripState (void)
 Returns the state of the gripper paddles. More...

int getPaddleState (void)
 Returns the state of each gripper paddle. More...

int getBreakBeamState (void)
 Returns the state of the gripper's breakbeams. More...

bool isLiftMaxed (void)
 Returns the state of the lift. More...

int getType (void)
 Gets the type of the gripper. More...

void setType (int type)
 Sets the type of the gripper. More...

long getMSecSinceLastPacket (void)
 Gets the number of mSec since the last gripper packet. More...

int getGraspTime (void)
 Gets the grasp time. More...

void printState (void)
 logs the gripper state.

bool packetHandler (ArRobotPacket *packet)
 Parses the gripper packet.

void connectHandler (void)
 The handler for when the robot connects.


Detailed Description

A class of convenience functions for using the gripper.

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.


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
useGenIO  Whether the gripper on this robot is using GenIO or not


Member Function Documentation

int ArGripper::getBreakBeamState void   
 

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   
 

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   
 

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   
 

Gets the number of mSec since the last gripper packet.

Returns:
the number of milliseconds since the last packet

int ArGripper::getPaddleState void   
 

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   
 

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   
 

Returns true if the gripper paddles are moving.

Returns:
true if the gripper paddles are moving

bool ArGripper::isLiftMaxed void   
 

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   
 

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 Tue Nov 12 17:43:56 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001