main.cc File Reference

#include <libplayerc++/playerc++.h>
#include <iostream>
#include <scorpion.h>

Include dependency graph for main.cc:

Go to the source code of this file.

Classes

struct  side

Enumerations

enum  direction {
  NORTH, NWEST, NEAST, WEST,
  EAST, SWEST, SEAST, SOUTH
}
enum  { LEFT, MIDDLE, RIGHT }
enum  behaviour { FIND_WALL, FACE_WALL, FOLLOW_WALL, FOLLOW_MIDDLE }

Functions

PlayerClient robot ("localhost")
Position2dProxy pp (&robot, 0)
IrProxy ir (&robot, 0)
static double side_avg (enum direction direction)
static double has_obstacles (enum direction direction)
int main (int argc, char **argv)

Variables

static struct side sides []
enum behaviour behaviour = FIND_WALL
player_pose_t pose


Enumeration Type Documentation

anonymous enum

Enumerator:
LEFT 
MIDDLE 
RIGHT 

Definition at line 23 of file main.cc.

enum behaviour

Enumerator:
FIND_WALL 
FACE_WALL 
FOLLOW_WALL 
FOLLOW_MIDDLE 

Definition at line 61 of file main.cc.

enum direction

Enumerator:
NORTH 
NWEST 
NEAST 
WEST 
EAST 
SWEST 
SEAST 
SOUTH 

Definition at line 15 of file main.cc.


Function Documentation

static double has_obstacles ( enum direction  direction  )  [static]

Definition at line 80 of file main.cc.

References side_avg().

Referenced by main().

Here is the call graph for this function:

IrProxy ir ( robot,
 
)

Referenced by main(), ERSP::Main(), and side_avg().

int main ( int  argc,
char **  argv 
)

Definition at line 85 of file main.cc.

References EAST, FACE_WALL, FIND_WALL, FOLLOW_MIDDLE, FOLLOW_WALL, has_obstacles(), NORTH, pose, pp(), robot(), SOUTH, and WEST.

Here is the call graph for this function:

Position2dProxy pp ( robot,
 
)

Referenced by main().

PlayerClient robot ( "localhost"   ) 

Referenced by main().

static double side_avg ( enum direction  direction  )  [static]

Definition at line 72 of file main.cc.

References ir(), LEFT, MIDDLE, RIGHT, side::sensors, and sides.

Referenced by has_obstacles().

Here is the call graph for this function:


Variable Documentation

enum behaviour behaviour = FIND_WALL

Definition at line 68 of file main.cc.

player_pose_t pose

Definition at line 69 of file main.cc.

Referenced by main().

struct side sides[] [static]

Initial value:

 {
   {  NORTH, { SCORPION_IR_TE_NNW,  SCORPION_IR_BN_N, SCORPION_IR_TW_NNE } },
   {  EAST,  { SCORPION_IR_BW_S, SCORPION_IR_BS_W, SCORPION_IR_BN_WNW } },
   {  WEST,  { SCORPION_IR_BE_S, SCORPION_IR_BS_E, SCORPION_IR_BN_ENE } },
   {  SOUTH, { SCORPION_IR_BW_S, SCORPION_IR_BS_E, SCORPION_IR_BN_ENE } },
























}

Definition at line 30 of file main.cc.

Referenced by side_avg().


Generated on Sat Jan 13 03:11:10 2007 for ERSP Player driver by  doxygen 1.5.1