kgripper_test.c File Reference

This is an application that demonstrates the various Gripper commands. More...

Include dependency graph for kgripper_test.c:

Go to the source code of this file.

Defines

#define MAXBUFFERSIZE   100

Functions

int initGripper (void)
int revisionOS (int argc, char *argv[], void *data)
int status (int argc, char *argv[], void *data)
int movearm (int argc, char *argv[], void *data)
int movegrip (int argc, char *argv[], void *data)
int get (int argc, char *argv[], void *data)
int grip (int argc, char *argv[], void *data)
int demo (int argc, char *argv[], void *data)
int sensor (int argc, char *argv[], void *data)
int setTorque (int argc, char *argv[], void *data)
int setMaxSpeed (int argc, char *argv[], void *data)
int searchLimit (int argc, char *argv[], void *data)
int quit (int argc, char *argv[], void *data)
int help (int argc, char *argv[], void *data)
int main (int arc, char *argv[])

Variables

static int quitReq = 0
static char buf [1024]
static knet_dev_tArm
static knet_dev_tGripper
static kb_command_t cmds []


Detailed Description

This is an application that demonstrates the various Gripper commands.

Khepera3 Gripper test application

Author:
Frederic Lambercy (K-Team SA)
Note:
Copyright (C) 2010 K-TEAM SA
Bug:
none discovered.
Todo:
nothing.

Definition in file kgripper_test.c.


Define Documentation

#define MAXBUFFERSIZE   100


Function Documentation

int demo ( int  argc,
char *  argv[],
void *  data 
)

demo function will move the gripper n times (0 = infiny) using kb_gripper.c library.

Definition at line 251 of file kgripper_test.c.

References kgripper_Arm_Get_Limits(), kgripper_Arm_OnTarget(), kgripper_Arm_Set_Order(), kgripper_Gripper_Get_Current(), kgripper_Gripper_Get_Limits(), kgripper_Gripper_OnTarget(), kgripper_Gripper_Set_Order(), and kgripper_Gripper_Set_Torque().

Here is the call graph for this function:

int get ( int  argc,
char *  argv[],
void *  data 
)

int grip ( int  argc,
char *  argv[],
void *  data 
)

grip function will move the gripper n times (0 = infiny) using kb_gripper.c library.

Definition at line 216 of file kgripper_test.c.

References kgripper_Gripper_Get_Current(), kgripper_Gripper_Get_Limits(), kgripper_Gripper_Get_Torque(), kgripper_Gripper_OnTarget(), and kgripper_Gripper_Set_Order().

Here is the call graph for this function:

int help ( int  argc,
char *  argv[],
void *  data 
)

Display a list of available commands.

Definition at line 453 of file koala_GoAutomation.c.

int initGripper ( void   ) 

initGripper open the various required handle to the both i2c devices on the Gripper using knet_open from the knet.c libkorebot's modules.

Returns:
A value :
  • 1 if success
  • 0 if any error

Definition at line 40 of file kgripper_test.c.

References kgripper_init(), KNET_BUS_I2C, and knet_open().

Referenced by main().

Here is the call graph for this function:

int main ( int  arc,
char *  argv[] 
)

Definition at line 417 of file kgripper_test.c.

References buf, initGripper(), kb_parse_command(), MAXBUFFERSIZE, and quitReq.

Here is the call graph for this function:

int movearm ( int  argc,
char *  argv[],
void *  data 
)

movearm function set a new position order for the Arm of the Gripper using kb_gripper.c library.

Definition at line 144 of file kgripper_test.c.

References kgripper_Arm_Set_Order().

Here is the call graph for this function:

int movegrip ( int  argc,
char *  argv[],
void *  data 
)

movegrip function set a new position order for the Finger of the Gripper using kb_gripper.c library.

Definition at line 155 of file kgripper_test.c.

References kgripper_Gripper_Set_Order().

Here is the call graph for this function:

int quit ( int  argc,
char *  argv[],
void *  data 
)

Quit the program.

Definition at line 374 of file kgripper_test.c.

References quitReq.

int revisionOS ( int  argc,
char *  argv[],
void *  data 
)

revisionOS retrieves the Gripper os version using kb_gripper.c library.

Definition at line 67 of file kgripper_test.c.

References kgripper_Arm_Get_Version(), and kgripper_Gripper_Get_Version().

Here is the call graph for this function:

int searchLimit ( int  argc,
char *  argv[],
void *  data 
)

searchLimit start the mechanical limit search using kb_gripper.c library.

Definition at line 353 of file kgripper_test.c.

References kgripper_Arm_Get_Limits(), kgripper_Arm_Get_Search_Limit(), kgripper_Arm_Set_Search_Limit(), kgripper_Gripper_Get_Limits(), kgripper_Gripper_Get_Search_Limit(), and kgripper_GripperSet_Search_Limit().

Here is the call graph for this function:

int sensor ( int  argc,
char *  argv[],
void *  data 
)

sensor return all the value of the sensors in the Gripper finger using kb_gripper.c library.

Definition at line 303 of file kgripper_test.c.

References kgripper_Gripper_Get_Ambiant_IR_Light(), kgripper_Gripper_Get_Distance_Sensors(), kgripper_Gripper_Get_Resistivity(), and kgripper_Gripper_Object_Detected().

Here is the call graph for this function:

int setMaxSpeed ( int  argc,
char *  argv[],
void *  data 
)

setMaxSpeed define the maximal speed of the arm gripper using kb_gripper.c library.

Definition at line 343 of file kgripper_test.c.

References kgripper_Arm_Set_Max_Speed().

Here is the call graph for this function:

int setTorque ( int  argc,
char *  argv[],
void *  data 
)

setTorque define the maximal Torque use by the finger to grip an object using kb_gripper.c library.

Definition at line 333 of file kgripper_test.c.

References kgripper_Gripper_Set_Torque().

Here is the call graph for this function:

int status ( int  argc,
char *  argv[],
void *  data 
)


Variable Documentation

knet_dev_t* Arm [static]

handle to the various Gripper devices (knet socket, i2c mode)

Definition at line 25 of file kgripper_test.c.

char buf[1024] [static]

Definition at line 20 of file kgripper_test.c.

kb_command_t cmds[] [static]

Initial value:

 {
 { "quit"            , 0 , 0 , quit } ,
 { "exit"            , 0 , 0 , quit } ,
 { "status"          , 1 , 1 , status },
 { "getrev"          , 0 , 0 , revisionOS },
 { "movearm"         , 1 , 1 , movearm } ,
 { "movegrip"        , 1 , 1 , movegrip } ,
 { "sensor"          , 1 , 1 , sensor } ,
 { "maxspeed"        , 1 , 1 , setMaxSpeed } ,
 { "get"             , 1 , 1 , get } ,
 { "demo"            , 1 , 1 , demo } ,
 { "grip"            , 1 , 1 , grip } ,
 { "torque"          , 1 , 1 , setTorque } ,
 { "search"          , 0 , 0 , searchLimit },
 { "help"            , 0 , 0 , help } ,
 { NULL              , 0 , 0 , NULL }
}
The command table contains: command name : min number of args : max number of args : the function to call

Definition at line 385 of file kgripper_test.c.

knet_dev_t* Gripper [static]

Definition at line 26 of file kgripper_test.c.

int quitReq = 0 [static]

Definition at line 19 of file kgripper_test.c.


Generated on Wed Dec 15 11:49:28 2010 for KoreBot Library by  doxygen 1.5.5