Fawkes API
Fawkes Development Version
|
The Basic of a Motorinstructor. More...
#include <>>
Public Member Functions | |
BaseMotorInstruct (MotorInterface *motor, float frequency, Logger *logger, Configuration *config) | |
Constructor. More... | |
virtual | ~BaseMotorInstruct () |
Desctructor. More... | |
void | drive (float trans_x, float trans_y, float rot) |
Try to realize the proposed values with respect to the maximum allowed values. More... | |
void | stop () |
Executes a soft stop with respect to calculate_translation and calculate_rotation. More... | |
Protected Attributes | |
Logger * | logger_ |
The fawkes logger. More... | |
Configuration * | config_ |
The fawkse config. More... | |
float | trans_acc_ |
Translation acceleration. More... | |
float | trans_dec_ |
Translation deceleration. More... | |
float | rot_acc_ |
Rotation acceleration. More... | |
float | rot_dec_ |
Rotation deceleration. More... | |
The Basic of a Motorinstructor.
Definition at line 48 of file base_motor_instruct.h.
|
inline |
Constructor.
Initializes all constants and the local pointers.
motor | The MotorInterface with all the motor information |
frequency | The frequency of the colli (should become deprecated!) |
logger | The fawkes logger |
config | The fawkes configuration |
Definition at line 110 of file base_motor_instruct.h.
References config_, fawkes::Configuration::get_float(), fawkes::Logger::log_debug(), logger_, fawkes::colli_trans_rot_t::rot, rot_acc_, rot_dec_, trans_acc_, trans_dec_, fawkes::colli_trans_rot_t::x, and fawkes::colli_trans_rot_t::y.
|
inlinevirtual |
Desctructor.
Definition at line 136 of file base_motor_instruct.h.
References fawkes::Interface::has_writer(), fawkes::Interface::id(), fawkes::Logger::log_debug(), fawkes::Logger::log_warn(), logger_, fawkes::Interface::msgq_enqueue(), fawkes::colli_trans_rot_t::rot, fawkes::colli_trans_rot_t::x, and fawkes::colli_trans_rot_t::y.
|
inline |
Try to realize the proposed values with respect to the maximum allowed values.
Try to realize the proposed values with respect to the physical constraints of the robot.
trans_x | the proposed x translation velocity |
trans_y | the proposed y translation velocity |
rot | the proposed rotation velocity |
Definition at line 186 of file base_motor_instruct.h.
References fawkes::MotorInterface::des_omega(), fawkes::MotorInterface::des_vx(), fawkes::MotorInterface::des_vy(), fawkes::colli_trans_rot_t::rot, fawkes::colli_trans_rot_t::x, and fawkes::colli_trans_rot_t::y.
Referenced by ColliThread::loop(), and stop().
|
inline |
Executes a soft stop with respect to calculate_translation and calculate_rotation.
Executes a soft stop with respect to calculate_translation and calculate_rotation if it is called several times.
Definition at line 232 of file base_motor_instruct.h.
References drive().
Referenced by ColliThread::loop().
|
protected |
The fawkse config.
Definition at line 65 of file base_motor_instruct.h.
Referenced by BaseMotorInstruct().
|
protected |
The fawkes logger.
Definition at line 64 of file base_motor_instruct.h.
Referenced by BaseMotorInstruct(), fawkes::EmergencyMotorInstruct::EmergencyMotorInstruct(), fawkes::LinearMotorInstruct::LinearMotorInstruct(), fawkes::QuadraticMotorInstruct::QuadraticMotorInstruct(), ~BaseMotorInstruct(), fawkes::EmergencyMotorInstruct::~EmergencyMotorInstruct(), fawkes::LinearMotorInstruct::~LinearMotorInstruct(), and fawkes::QuadraticMotorInstruct::~QuadraticMotorInstruct().
|
protected |
Rotation acceleration.
Definition at line 69 of file base_motor_instruct.h.
Referenced by BaseMotorInstruct(), fawkes::EmergencyMotorInstruct::~EmergencyMotorInstruct(), fawkes::LinearMotorInstruct::~LinearMotorInstruct(), and fawkes::QuadraticMotorInstruct::~QuadraticMotorInstruct().
|
protected |
Rotation deceleration.
Definition at line 70 of file base_motor_instruct.h.
Referenced by BaseMotorInstruct(), fawkes::EmergencyMotorInstruct::~EmergencyMotorInstruct(), fawkes::LinearMotorInstruct::~LinearMotorInstruct(), and fawkes::QuadraticMotorInstruct::~QuadraticMotorInstruct().
|
protected |
Translation acceleration.
Definition at line 67 of file base_motor_instruct.h.
Referenced by BaseMotorInstruct(), fawkes::EmergencyMotorInstruct::~EmergencyMotorInstruct(), fawkes::LinearMotorInstruct::~LinearMotorInstruct(), and fawkes::QuadraticMotorInstruct::~QuadraticMotorInstruct().
|
protected |
Translation deceleration.
Definition at line 68 of file base_motor_instruct.h.
Referenced by BaseMotorInstruct(), fawkes::LinearMotorInstruct::~LinearMotorInstruct(), and fawkes::QuadraticMotorInstruct::~QuadraticMotorInstruct().