Revision 972
update to robot shared header
robot_shared.h | ||
---|---|---|
1 | 1 |
/* shared structs for simulator */ |
2 | 2 |
|
3 | 3 |
|
4 |
typedef struct Position |
|
4 |
typedef struct PositionType
|
|
5 | 5 |
{ |
6 | 6 |
int x,y; /* position of robot in environment */ |
7 | 7 |
int theta; /* orientation of robot in environment */ |
8 |
}; |
|
8 |
} Position;
|
|
9 | 9 |
|
10 | 10 |
|
11 |
typedef struct RangeFinder |
|
11 |
/* rangefinders are 1-5, so write convert function for this */ |
|
12 |
typedef struct RangeFinderType |
|
12 | 13 |
{ |
13 |
short d1,d2,d3,d4,d5;
|
|
14 |
}; |
|
14 |
short d[5];
|
|
15 |
} RangeFinder;
|
|
15 | 16 |
|
16 | 17 |
|
17 | 18 |
typedef struct RobotSharedType |
18 | 19 |
{ |
19 |
struct Position pos; /* position in environment */ |
|
20 | 20 |
short motor1; /* motor1 value */ |
21 | 21 |
short motor2; /* motor2 value */ |
22 |
struct RangeFinder ranges; /* rangefinders */
|
|
22 |
RangeFinder ranges; /* rangefinders */ |
|
23 | 23 |
/* add other sensors, etc here */ |
24 | 24 |
} RobotShared; |
25 | 25 |
|
26 |
|
|
27 |
typedef struct SimulatorRobotType |
|
28 |
{ |
|
29 |
Position pos; /* position in environment */ |
|
30 |
short motor1; /* motor1 value */ |
|
31 |
short motor2; /* motor2 value */ |
|
32 |
RangeFinder ranges; /* rangefinders */ |
|
33 |
/* add other sensors, etc here */ |
|
34 |
} SimulatorRobot; |
Also available in: Unified diff