Project

General

Profile

Statistics
| Revision:

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

History | View | Annotate | Download (920 Bytes)

1
/* shared structs for simulator */
2

    
3
#ifndef __ROBOT_SHARED_H
4
#define __ROBOT_SHARED_H
5

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

    
12

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

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

    
28

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

    
39
#endif