aversive_10-03-12/modules/devices/robot/position_manager/position_manager.c File Reference

#include <string.h>
#include <math.h>
#include <robot_system.h>
#include <position_manager.h>

Go to the source code of this file.

Functions

void position_init (struct robot_position *pos)
void position_set (struct robot_position *pos, int16_t x, int16_t y, int16_t a)
void position_set_related_robot_system (struct robot_position *pos, struct robot_system *rs)
void position_set_physical_params (struct robot_position *pos, double track_cm, double distance_imp_per_cm)
void position_use_ext (struct robot_position *pos)
void position_manage (struct robot_position *pos)
int16_t position_get_x_s16 (struct robot_position *pos)
int16_t position_get_y_s16 (struct robot_position *pos)
int16_t position_get_a_deg_s16 (struct robot_position *pos)
double position_get_x_double (struct robot_position *pos)
double position_get_y_double (struct robot_position *pos)
double position_get_a_rad_double (struct robot_position *pos)


Function Documentation

int16_t position_get_a_deg_s16 ( struct robot_position pos  ) 

returns current alpha

Definition at line 214 of file position_manager.c.

References xya_position_s16::a, and robot_position::pos_s16.

double position_get_a_rad_double ( struct robot_position pos  ) 

double position_get_x_double ( struct robot_position pos  ) 

int16_t position_get_x_s16 ( struct robot_position pos  ) 

returns current x

Definition at line 198 of file position_manager.c.

References robot_position::pos_s16, and xya_position_s16::x.

double position_get_y_double ( struct robot_position pos  ) 

int16_t position_get_y_s16 ( struct robot_position pos  ) 

returns current y

Definition at line 206 of file position_manager.c.

References robot_position::pos_s16, and xya_position_s16::y.

void position_init ( struct robot_position pos  ) 

initialization of the robot_position pos, everthing is set to 0

Definition at line 29 of file position_manager.c.

References IRQ_LOCK, and IRQ_UNLOCK.

void position_manage ( struct robot_position pos  ) 

void position_set ( struct robot_position pos,
int16_t  x,
int16_t  y,
int16_t  a 
)

void position_set_physical_params ( struct robot_position pos,
double  track_cm,
double  distance_imp_per_cm 
)

Set the physical parameters of the robot :

  • number of impulsions for 1 cm (distance)
  • number of impulsions for 1 degree (angle)

Definition at line 69 of file position_manager.c.

References robot_physical_params::distance_imp_per_cm, IRQ_LOCK, IRQ_UNLOCK, robot_position::phys, and robot_physical_params::track_cm.

void position_set_related_robot_system ( struct robot_position pos,
struct robot_system rs 
)

Save in pos structure the pointer to the associated robot_system. The robot_system structure is used to get values from virtual encoders that return angle and distance.

Definition at line 56 of file position_manager.c.

References IRQ_LOCK, IRQ_UNLOCK, and robot_position::rs.

void position_use_ext ( struct robot_position pos  ) 


Generated on Fri Mar 12 06:32:06 2010 for AVR by  doxygen 1.5.6