Fawkes API  Fawkes Development Version
fawkes::BaseMotorInstruct Class Referenceabstract

The Basic of a Motorinstructor. More...

#include <>>

Inheritance diagram for fawkes::BaseMotorInstruct:

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

Loggerlogger_
 The fawkes logger. More...
 
Configurationconfig_
 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...
 

Detailed Description

The Basic of a Motorinstructor.

Definition at line 48 of file base_motor_instruct.h.

Constructor & Destructor Documentation

◆ BaseMotorInstruct()

fawkes::BaseMotorInstruct::BaseMotorInstruct ( MotorInterface motor,
float  frequency,
Logger logger,
Configuration config 
)
inline

Constructor.

Initializes all constants and the local pointers.

Parameters
motorThe MotorInterface with all the motor information
frequencyThe frequency of the colli (should become deprecated!)
loggerThe fawkes logger
configThe 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.

◆ ~BaseMotorInstruct()

Member Function Documentation

◆ drive()

void fawkes::BaseMotorInstruct::drive ( float  trans_x,
float  trans_y,
float  rot 
)
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.

Parameters
trans_xthe proposed x translation velocity
trans_ythe proposed y translation velocity
rotthe 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().

◆ stop()

void fawkes::BaseMotorInstruct::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().

Member Data Documentation

◆ config_

Configuration* fawkes::BaseMotorInstruct::config_
protected

The fawkse config.

Definition at line 65 of file base_motor_instruct.h.

Referenced by BaseMotorInstruct().

◆ logger_

◆ rot_acc_

◆ rot_dec_

◆ trans_acc_

◆ trans_dec_

float fawkes::BaseMotorInstruct::trans_dec_
protected

The documentation for this class was generated from the following file: