Project

General

Profile

Statistics
| Revision:

root / branches / simulator / projects / simulator / simulator / core / robot.h @ 988

History | View | Annotate | Download (750 Bytes)

1
/**
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
        int x,y; /* position of robot in environment */
19
        int theta; /* orientation of robot in environment */
20
} 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
int robot_create(char *execname);
36
int robot_destroy(int id);
37

    
38
#endif
39