Project

General

Profile

Statistics
| Revision:

root / branches / simulator / projects / simulator / common / robot_shared.h @ 977

History | View | Annotate | Download (861 Bytes)

1
/* shared structs for simulator */
2

    
3

    
4
typedef struct PositionType
5
{
6
  int x,y; /* position of robot in environment */
7
  int theta; /* orientation of robot in environment */
8
} Position;
9

    
10

    
11
/* rangefinders are 1-5, so write convert function for this */
12
typedef struct RangeFinderType
13
{
14
  short d[5];
15
} RangeFinder;
16

    
17
/* this is what is in the robot shared memory */
18
typedef struct RobotSharedType
19
{
20
        short motor1; /* motor1 value */
21
        short motor2; /* motor2 value */
22
  RangeFinder ranges; /* rangefinders */
23
  /* add other sensors, etc here */
24
} RobotShared;
25

    
26

    
27
typedef struct SimulatorRobotType
28
{
29
  int robotSharedMemoryID; /* id for shared memory object */
30
  Position pos; /* position in environment */
31
        short motor1; /* motor1 value */
32
        short motor2; /* motor2 value */
33
  RangeFinder ranges; /* rangefinders */
34
  /* add other sensors, etc here */
35
} SimulatorRobot;