#include <base_motor_driver.h>
Public Member Functions | |
BaseMotor () | |
Constructor. | |
int | disable_motors () |
Inhabilita los motores, es decir, no van a realizar ningún movimiento. | |
int | enable_disable_motor (int *fd, const char *order) |
Habilita o inhabilita el motor referido por el manejador que se la pasa como parámetro. | |
int | enable_motors () |
Habilita los motores. | |
int | end_communication () |
fin de la comunicacion con los motores | |
cinematic_data * | get_estimate_position () |
int | init_communication () |
inicio de la comunicacion con los motores | |
int | move_ahead (double distance) |
solicitud de movimiento en linea recta relativo | |
int | read_data (cinematic_data *data) |
int | read_data_variable_time_diff (cinematic_data *data, double time_since_last_call) |
actualizar lectura velocidad lineal, velocidad angular, angulo y posicion | |
int | relative_turn (double theta) |
solicitud de giro relativo | |
int | reset_odometry () |
comando para resetear la odometria | |
int | set_displacement_velocity (double d, double v, double w) |
movimiento de una distancia en línea recta a una velocidad determinada | |
int | set_estimate_position (double x, double y, double theta) |
int | set_velocity (double v, double w) |
actualizar lectura velocidad lineal, velocidad angular, angulo y posicion | |
int | update_odometry (double x, double y, double theta) |
comando para actualizar la odometria. Esto es si se tiene un loclaizador o controlador en lazo cerrado que corrige la odometria del robot. | |
~BaseMotor () | |
Destructor. | |
Public Attributes | |
std::string | motor_order |
Private Attributes | |
double | _before_distance1 |
double | _before_distance2 |
cinematic_data | _before_estimated |
int | _corrected_data |
cinematic_data | _current_cinematic |
cinematic_data | _current_estimated |
double | _distance1 |
double | _distance2 |
int | _fd_motor1 |
int | _fd_motor2 |
cinematic_data | _last_cinematic |
Definition at line 68 of file base_motor_driver.h.
Constructor.
Definition at line 35 of file base_motor_driver.cpp.
Destructor.
Definition at line 44 of file base_motor_driver.cpp.
int BaseMotor::disable_motors | ( | ) |
Inhabilita los motores, es decir, no van a realizar ningún movimiento.
Definition at line 292 of file base_motor_driver.cpp.
int BaseMotor::enable_disable_motor | ( | int * | fd, |
const char * | order | ||
) |
Habilita o inhabilita el motor referido por el manejador que se la pasa como parámetro.
fd | manejador del motor sobre el que se va a operar |
order | comando que queremos enviar al driver para habilitarlo/deshabilitarlo(EN ó DI) |
Definition at line 309 of file base_motor_driver.cpp.
int BaseMotor::enable_motors | ( | ) |
Habilita los motores.
Definition at line 275 of file base_motor_driver.cpp.
int BaseMotor::end_communication | ( | ) |
fin de la comunicacion con los motores
Definition at line 237 of file base_motor_driver.cpp.
int BaseMotor::init_communication | ( | ) |
inicio de la comunicacion con los motores
Definition at line 50 of file base_motor_driver.cpp.
int BaseMotor::move_ahead | ( | double | distance | ) |
solicitud de movimiento en linea recta relativo
d | distance |
Definition at line 725 of file base_motor_driver.cpp.
int BaseMotor::read_data | ( | cinematic_data * | data | ) |
int BaseMotor::read_data_variable_time_diff | ( | cinematic_data * | data, |
double | time_since_last_call | ||
) |
actualizar lectura velocidad lineal, velocidad angular, angulo y posicion
data | puntero a la direcciones de memoria donde se encuentran los data. |
time_since_last_call | the time that has passed since the last call of this function, in seconds |
Definition at line 427 of file base_motor_driver.cpp.
int BaseMotor::relative_turn | ( | double | theta | ) |
solicitud de giro relativo
teta | angulo a girar en radianes. |
Definition at line 773 of file base_motor_driver.cpp.
int BaseMotor::reset_odometry | ( | ) |
comando para resetear la odometria
Definition at line 830 of file base_motor_driver.cpp.
int BaseMotor::set_displacement_velocity | ( | double | d, |
double | v, | ||
double | w | ||
) |
movimiento de una distancia en línea recta a una velocidad determinada
d | distancia a recorrer en cm |
v | velocidad lineal en mm/seg |
w | velocidad angular en grados/seg |
Definition at line 652 of file base_motor_driver.cpp.
int BaseMotor::set_estimate_position | ( | double | x, |
double | y, | ||
double | theta | ||
) |
int BaseMotor::set_velocity | ( | double | v, |
double | w | ||
) |
actualizar lectura velocidad lineal, velocidad angular, angulo y posicion
v | Velocidad lineal en mm/seg |
w | Velocidad angular en grados/seg |
Definition at line 585 of file base_motor_driver.cpp.
int BaseMotor::update_odometry | ( | double | x, |
double | y, | ||
double | theta | ||
) |
comando para actualizar la odometria. Esto es si se tiene un loclaizador o controlador en lazo cerrado que corrige la odometria del robot.
Definition at line 860 of file base_motor_driver.cpp.
double BaseMotor::_before_distance1 [private] |
Definition at line 210 of file base_motor_driver.h.
double BaseMotor::_before_distance2 [private] |
Definition at line 210 of file base_motor_driver.h.
cinematic_data BaseMotor::_before_estimated [private] |
Definition at line 215 of file base_motor_driver.h.
int BaseMotor::_corrected_data [private] |
Definition at line 214 of file base_motor_driver.h.
cinematic_data BaseMotor::_current_cinematic [private] |
Definition at line 211 of file base_motor_driver.h.
cinematic_data BaseMotor::_current_estimated [private] |
Definition at line 215 of file base_motor_driver.h.
double BaseMotor::_distance1 [private] |
Definition at line 210 of file base_motor_driver.h.
double BaseMotor::_distance2 [private] |
Definition at line 210 of file base_motor_driver.h.
int BaseMotor::_fd_motor1 [private] |
Definition at line 207 of file base_motor_driver.h.
int BaseMotor::_fd_motor2 [private] |
Definition at line 207 of file base_motor_driver.h.
cinematic_data BaseMotor::_last_cinematic [private] |
Definition at line 211 of file base_motor_driver.h.
std::string BaseMotor::motor_order |
Definition at line 203 of file base_motor_driver.h.