root / branches / simulator / projects / simulator / simulator / core / robot.h @ 1074
History | View | Annotate | Download (971 Bytes)
1 | 988 | bcoltin | /**
|
---|---|---|---|
2 | * @file robot.h
|
||
3 | * @author Colony Project
|
||
4 | *
|
||
5 | * @brief Manages simulated robots.
|
||
6 | *
|
||
7 | * Contains structures and function prototypes used
|
||
8 | * for managing robots in the simulator.
|
||
9 | **/
|
||
10 | |||
11 | #ifndef __ROBOT_H__
|
||
12 | #define __ROBOT_H__
|
||
13 | |||
14 | #include "robot_shared.h" |
||
15 | |||
16 | typedef struct PoseType |
||
17 | { |
||
18 | 1020 | bcoltin | float x,y; /* position of robot in environment */ |
19 | 1019 | bcoltin | float theta; /* orientation of robot in environment */ |
20 | 988 | bcoltin | } Pose; |
21 | |||
22 | typedef struct RobotType |
||
23 | { |
||
24 | // the id is 0 if the robot hasn't been created
|
||
25 | int id;
|
||
26 | int pid;
|
||
27 | int sharedMemID; /* id for shared memory object */ |
||
28 | Pose pose; /* position in environment */
|
||
29 | |||
30 | RobotShared* shared; |
||
31 | /* add other sensors, etc here */
|
||
32 | } Robot; |
||
33 | |||
34 | int robots_initialize(void); |
||
35 | 1074 | bcoltin | int robots_cleanup(void); |
36 | 988 | bcoltin | int robot_create(char *execname); |
37 | int robot_destroy(int id); |
||
38 | |||
39 | 997 | bcoltin | void robot_iterator_reset(void); |
40 | Robot* robot_iterator_next(void);
|
||
41 | |||
42 | 1006 | bcoltin | void* robot_event_loop(void* arg); |
43 | 1068 | ayeager | void* logger_step_loop(void* arg); |
44 | 1006 | bcoltin | |
45 | 1074 | bcoltin | void robots_pause(void); |
46 | void robots_resume(void); |
||
47 | |||
48 | 988 | bcoltin | #endif
|