Robot Agent  1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Typedefs | Functions
robot.h File Reference
#include "rfid.h"
#include "enviroment.h"

Go to the source code of this file.

Data Structures

struct  s_ROBOT_STRUCT
 Robot structure. More...
 

Typedefs

typedef struct s_ROBOT_STRUCT robot_t
 Robot structure. More...
 

Functions

robot_trobot_init (int x, int y, int a, int move_noise, float turn_noise, int sense_tag_noise, int sense_wall_noise, int radius)
 
void robot_destroy (robot_t *robot)
 
void robot_set_pose (robot_t *robot, int x, int y, int a)
 
void robot_set_noise (robot_t *robot, int move_noise, float turn_noise, int sense_tag_noise, int sense_wall_noise)
 
void robot_drive (robot_t *robot, int distance, int angle, int uncertain)
 
float robot_sense_tag (robot_t *robot, rfid_t *rfids, enviroment_t *envs)
 
float robot_sense_wall (robot_t *robot, enviroment_t *envs)
 
float robot_eval_tag (robot_t *robot, enviroment_t *envs)
 
float robot_eval_wall (robot_t *robot, enviroment_t *envs)
 

Detailed Description

Author
Eriks Zaharans
Date
1 Jul 2013

DESCRIPTION

Robot model function library header file.

Definition in file robot.h.

Typedef Documentation

typedef struct s_ROBOT_STRUCT robot_t

Robot structure.

Function Documentation

void robot_destroy ( robot_t robot)

Deinitialize robot

Parameters
robotPointer to robot structure
Returns
Void

Definition at line 70 of file robot.c.

void robot_drive ( robot_t robot,
int  distance,
int  angle,
int  uncertain 
)

Drive robot

Parameters
robotPointer to robot structure
distanceDistance traveled (mm)
angleAngle change (Degrees)
Returns
Void

Definition at line 115 of file robot.c.

float robot_eval_tag ( robot_t robot,
enviroment_t envs 
)

Evaluate tag

Parameters
robotPointer to robot structure
envsPointer to enviroment structure
Returns
Probability of reading the tag

Definition at line 214 of file robot.c.

float robot_eval_wall ( robot_t robot,
enviroment_t envs 
)

Evaluate wall

Parameters
robotPointer to robot structure
envsPointer to enviroment structure
Returns
Probability of hitting the wall

Definition at line 250 of file robot.c.

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 
)

Initialize robot

Parameters
xX coordinate of position (mm)
yY coordinate of position (mm)
aHeading direction (Radians)
move_noiseError created during forward or backward motion (mm)
turn_noiseError created during turning (Radians)
sense_tag_noiseError of tag read (mm)
sense_wall_noiseError of wall read (mm)
radiusRobot radius (mm)
Returns
Pointer to robot structure

Definition at line 38 of file robot.c.

float robot_sense_tag ( robot_t robot,
rfid_t rfids,
enviroment_t envs 
)

Calculate distance to read tag

Parameters
robotPointer to robot structure
rfidsPointer to RFID structure
envsPointer to enviroment structure
Returns
Distance to read tag (mm)

Definition at line 150 of file robot.c.

float robot_sense_wall ( robot_t robot,
enviroment_t envs 
)

Calculate distance to read tag

Parameters
robotPointer to robot structure
envsPointer to enviroment structure
Returns
Distance to closest wall (mm)

Definition at line 188 of file robot.c.

void robot_set_noise ( robot_t robot,
int  move_noise,
float  turn_noise,
int  sense_tag_noise,
int  sense_wall_noise 
)

Set error/noise for motion and sensors

Parameters
robotPointer to robot structure
move_noiseError created during forward or backward motion (mm)
turn_noiseError created during turning (Radians)
sense_tag_noiseError of tag read (mm)
sense_wall_noiseError of wall read (mm)
Returns
Void

Definition at line 100 of file robot.c.

void robot_set_pose ( robot_t robot,
int  x,
int  y,
int  a 
)

Set pose of the robot (x, y, heading direction)

Parameters
robotPointer to robot structure
xX coordinate of position (mm)
yY coordinate of position (mm)
aHeading direction (Radians)
Returns
Void

Definition at line 84 of file robot.c.