Pioneer Module Mobile manual Gripper functions

Page 18

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 0 #define sfGRIPUP 1 #define sfGRIPMOVING 2 #define sfGRIPMIDDLE 4 #define sfGRIPDOWN 5 #define sfCOMGRIPPER 33

/* gripper control bits (DIGOUTPUT) */

#define sfGRIPSTATEMASK 0x05 /* picks out state bits in DIGOUTPUT */ #define sfGRIPMOTORBIT 0x02 /* motor bit, 0 is off, 1 is on */

#define sfGRIPDIRBIT 0x01

/* direction bit, 0 is down, 1 is up */

#define sfSPEAKERBIT

 

0x04

 

#define sfRIGHTLEDBIT

 

0x08

/* 0 is off, 1 is on */

#define sfLEFTLEDBIT

0x10

 

/* gripper sense bits (DIGINPUT) */

#define sfGRIPTOPBIT

 

0x01

/* top limit switch, 0 if hit */

#define sfGRIPMIDBIT

0x02

/* carry switch, 0 if hit */

#define sfGRIPBOTBIT

 

0x04

/*open limit switch, 0 if hit */

#define sfGRIPINIRBIT

0x08

/* inner break beam, 1 is beam break */

#define sfGRIPOUTIRBIT

0x10

/* outer break beam, 1 is beam break */

#define sfGRIPBUMPBIT

0x20

/* gripper bumpers, 0 is bump */

#define sfGRIPMOMBIT

 

0x40

/* momentary switch, 0 is pressed */

#define sfGRIPSPSTBIT

 

0x80

/* SPST switch, 0 is up */

14

Image 18
Contents Gripper Experimenter’s Module Manual Gripper & Experimenter’s Module Contents Maintenance & Repair Package Components IntroductionGripper and Experimenter’s Package User Supplied ComponentsBasic Pioneer Platform Gripper & Experimenter’s ModuleGripper Description Pioneer Gripper side view Experimenter’s Module Description Pioneer 1 Experimenter’s ModuleAdditional Resources Pioneer Web Software ArchivePioneer and Saphira Newsgroups Support Pioneer-support@rwii.comInstallation Remove the ConsoleRemove Microcontroller from Console Installation ReplaceConnect Cables Reattach Microcontroller to ConsoleRemove Nose Attach Gripper/Experimenter’s Module to PioneerTest the Assembly Re-Attach the Console CablesRe-Attach the Console Gripper Operation and Programming Gripper Self TestPsos Server Information Packet Gripper I/O Gripper ProgrammingDirect Control via Digital Ports SfRobotCom2BytessfCOMDIGOUT, 0x2 SfRobotCom2BytessfCOMDIGOUT, 0x20SfRobotCom2BytessfCOMDIGOUT, 0x3 Int sfGripperGetState voidGripper functions Experimenter’s Module I/O PortsExperimenter’s Module Digin BREAK, Boot to r EturnDigin Self-Test To skip Vv.vVProgramming the Digital I/O Ports Programming the A/D PortsProgramming the Speaker Drive Lubrication Maintenance & RepairGripper Belt Adjustments Factory RepairsAppendix a Example C Program Demonstrates Gripper and Speaker FunctionsGripper & Experimenter’s Module Momentary switch, 0 is pressed Gripper & Experimenter’s Module Appendix B Pioneer Server Information PacketIndex ComsayMore, Grinnell Gripper & Experimenter’s Module Warranty & Liabilities