Pioneer Module Mobile Manual page 18

Gripper & experimenter's module mobile robot manual
Table of Contents

Advertisement

Gripper Operation and Programming
Table 3-2. Gripper functions
/*************************************************************
* Gripper functions --- For setting and retrieving gripper states
* States are sfGRIPUP, sfGRIPDOWN, sfGRIPMIDDLE, sfGRIPOFF,
*
and sfGRIPMOVING
*
sfGRIPMOVING occurs only during transitions between states
*
sfGRIPOFF can be set by the user, which means no state control
*
sfGRIPOFF is set by the robot to indicate a timeout (6
*
seconds) if a state is not achieved
*
**************************************************************/
/* states */
#define sfGRIPOFF
#define sfGRIPUP
#define sfGRIPMOVING 2
#define sfGRIPMIDDLE 4
#define sfGRIPDOWN 5
#define sfCOMGRIPPER 33
/* gripper control bits (DIGOUTPUT) */
#define sfGRIPSTATEMASK 0x05
#define sfGRIPMOTORBIT 0x02
#define sfGRIPDIRBIT 0x01
#define sfSPEAKERBIT 0x04
#define sfRIGHTLEDBIT 0x08
#define sfLEFTLEDBIT 0x10
/* gripper sense bits (DIGINPUT) */
#define sfGRIPTOPBIT
#define sfGRIPMIDBIT
#define sfGRIPBOTBIT
#define sfGRIPINIRBIT 0x08
#define sfGRIPOUTIRBIT 0x10
#define sfGRIPBUMPBIT 0x20
#define sfGRIPMOMBIT
#define sfGRIPSPSTBIT 0x80
14
0
1
/* picks out state bits in DIGOUTPUT */
/* motor bit, 0 is off, 1 is on */
/* direction bit, 0 is down, 1 is up */
/* 0 is off, 1 is on */
0x01
/* top limit switch, 0 if hit */
0x02
/* carry switch, 0 if hit */
0x04
/*open limit switch, 0 if hit */
/* inner break beam, 1 is beam break */
/* outer break beam, 1 is beam break */
/* gripper bumpers, 0 is bump */
0x40
/* momentary switch, 0 is pressed */
/* SPST switch, 0 is up */

Advertisement

Table of Contents
loading

Table of Contents