Robot Agent  1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
robot.h
Go to the documentation of this file.
1 
12 #ifndef __ROBOT_H
13 #define __ROBOT_H
14 
15 /* -- Includes -- */
16 /* project libraries */
17 #include "rfid.h"
18 #include "enviroment.h"
19 
20 /* -- Types -- */
21 
25 typedef struct s_ROBOT_STRUCT
26 {
27  int x; // X coordinate
28  int y; // Y coordinate
29  float a; // Heading direction
30 
31  float weight; // Weight
32 
33  int move_noise; // Move noise
34  float turn_noise; // Turn noise
35  int sense_tag_noise; // Tag sense noise
36  int sense_wall_noise; // Wall sense noise
37 
38  int radius; // Robot radius in mm
39 
40  int tag_num;
41 
42 } robot_t;
43 
44 /* -- Constants -- */
45 
46 /* -- Function Prototypes -- */
47 robot_t *robot_init(int x, int y, int a,
48  int move_noise,
49  float turn_noise,
50  int sense_tag_noise,
51  int sense_wall_noise,
52  int radius); // Initialize robot
53 void robot_destroy(robot_t *robot); // Deinitialize robot
54 void robot_set_pose(robot_t *robot, int x, int y, int a); // Set pose of the robot (x, y, heading direction)
55 void robot_set_noise(robot_t *robot, int move_noise,
56  float turn_noise,
57  int sense_tag_noise,
58  int sense_wall_noise); // Set error/noise for motion and sensors
59 void robot_drive(robot_t *robot, int distance, int angle, int uncertain); // Drive robot
60 float robot_sense_tag(robot_t *robot, rfid_t *rfids, enviroment_t *envs); // Calculate distance to read tag
61 float robot_sense_wall(robot_t *robot, enviroment_t *envs); // Calculate distance to read tag
62 float robot_eval_tag(robot_t *robot, enviroment_t *envs); // Evaluate tag
63 float robot_eval_wall(robot_t *robot, enviroment_t *envs); // Evaluate wall
64 
65 
66 
67 
68  #endif /* __ROBOT_H */
float robot_eval_wall(robot_t *robot, enviroment_t *envs)
Definition: robot.c:250
robot_t * robot_init(int x, int y, int a, int move_noise, float turn_noise, int sense_tag_noise, int sense_wall_noise, int radius)
Definition: robot.c:38
int tag_num
Definition: robot.h:40
float robot_eval_tag(robot_t *robot, enviroment_t *envs)
Definition: robot.c:214
float a
Definition: robot.h:29
void robot_set_noise(robot_t *robot, int move_noise, float turn_noise, int sense_tag_noise, int sense_wall_noise)
Definition: robot.c:100
void robot_drive(robot_t *robot, int distance, int angle, int uncertain)
Definition: robot.c:115
struct s_ROBOT_STRUCT robot_t
Robot structure.
float robot_sense_wall(robot_t *robot, enviroment_t *envs)
Definition: robot.c:188
int radius
Definition: robot.h:38
float weight
Definition: robot.h:31
void robot_set_pose(robot_t *robot, int x, int y, int a)
Definition: robot.c:84
void robot_destroy(robot_t *robot)
Definition: robot.c:70
Robot structure.
Definition: robot.h:25
RFID structure.
Definition: rfid.h:24
int move_noise
Definition: robot.h:33
int sense_tag_noise
Definition: robot.h:35
float turn_noise
Definition: robot.h:34
int sense_wall_noise
Definition: robot.h:36
float robot_sense_tag(robot_t *robot, rfid_t *rfids, enviroment_t *envs)
Definition: robot.c:150
Enviroment Structure - room points, tags, room point number, tag number.
Definition: enviroment.h:49