root / branches / simulator / projects / simulator / common / robot_shared.h @ 982
History | View | Annotate | Download (920 Bytes)
1 | 964 | dsschult | /* shared structs for simulator */
|
---|---|---|---|
2 | 950 | bcoltin | |
3 | 982 | ayeager | #ifndef __ROBOT_SHARED_H
|
4 | #define __ROBOT_SHARED_H
|
||
5 | 950 | bcoltin | |
6 | 972 | dsschult | typedef struct PositionType |
7 | 964 | dsschult | { |
8 | int x,y; /* position of robot in environment */ |
||
9 | int theta; /* orientation of robot in environment */ |
||
10 | 972 | dsschult | } Position; |
11 | 950 | bcoltin | |
12 | 964 | dsschult | |
13 | 972 | dsschult | /* rangefinders are 1-5, so write convert function for this */
|
14 | typedef struct RangeFinderType |
||
15 | 964 | dsschult | { |
16 | 972 | dsschult | short d[5]; |
17 | } RangeFinder; |
||
18 | 964 | dsschult | |
19 | 977 | dsschult | /* this is what is in the robot shared memory */
|
20 | 950 | bcoltin | typedef struct RobotSharedType |
21 | { |
||
22 | 964 | dsschult | short motor1; /* motor1 value */ |
23 | short motor2; /* motor2 value */ |
||
24 | 972 | dsschult | RangeFinder ranges; /* rangefinders */
|
25 | 964 | dsschult | /* add other sensors, etc here */
|
26 | 950 | bcoltin | } RobotShared; |
27 | |||
28 | 972 | dsschult | |
29 | typedef struct SimulatorRobotType |
||
30 | { |
||
31 | 977 | dsschult | int robotSharedMemoryID; /* id for shared memory object */ |
32 | 972 | dsschult | 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 | 982 | ayeager | } SimulatorRobot; |
38 | |||
39 | #endif |