Project

General

Profile

Statistics
| Revision:

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

History | View | Annotate | Download (893 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
int robot_create(char *execname);
36
int robot_destroy(int id);
37
38 997 bcoltin
void robot_iterator_reset(void);
39
Robot* robot_iterator_next(void);
40
41 1006 bcoltin
void* robot_event_loop(void* arg);
42 1068 ayeager
void* logger_step_loop(void* arg);
43 1006 bcoltin
44 988 bcoltin
#endif