Fawkes API
Fawkes Development Version
|
This is the SlowBackward drive-module, for slow backward only movements. More...
#include <>>
Public Member Functions | |
BackwardDriveModule (Logger *logger, Configuration *config) | |
Constructor. More... | |
~BackwardDriveModule () | |
Destruct your local values here! More... | |
void | update () |
Calculate here your desired settings. More... | |
![]() | |
AbstractDriveMode (Logger *logger, Configuration *config) | |
Constructor. More... | |
virtual | ~AbstractDriveMode () |
Desctructor. More... | |
void | set_current_target (float x, float y, float ori) |
Sets the current target. More... | |
void | set_current_robo_pos (float x, float y, float ori) |
Sets the current robo position. More... | |
void | set_current_robo_speed (float x, float y, float rot) |
Sets the current robo speed. More... | |
void | set_current_colli_mode (NavigatorInterface::OrientationMode orient, bool stop) |
Set the colli mode values for each drive mode. More... | |
void | set_local_target (float x, float y) |
Set the local targetpoint found by the search. More... | |
void | set_local_trajec (float x, float y) |
Set the local trajectory point found by the search. More... | |
NavigatorInterface::DriveMode | get_drive_mode_name () |
Returns the drive modes name. More... | |
float | get_proposed_trans_x () |
Returns the proposed x translation. More... | |
float | get_proposed_trans_y () |
Returns the proposed y translation. More... | |
float | get_proposed_rot () |
Returns the proposed rotatio. More... | |
Additional Inherited Members | |
![]() | |
float | lin_interpol (float x, float left, float right, float bot, float top) |
Perform linear interpolation. More... | |
float | guarantee_trans_stop (float distance, float current_trans, float desired_trans) |
Get velocity that guarantees a stop for a given distance. More... | |
![]() | |
field_pos_t | target_ |
current target More... | |
field_pos_t | robot_ |
current robot pos More... | |
colli_trans_rot_t | robot_vel_ |
current robot velocity More... | |
float | robot_speed_ |
current robo translation velocity More... | |
cart_coord_2d_t | local_target_ |
local target More... | |
cart_coord_2d_t | local_trajec_ |
local trajectory More... | |
NavigatorInterface::OrientationMode | orient_mode_ |
orient mode of nav if More... | |
bool | stop_at_target_ |
flag if stopping on or after target More... | |
colli_trans_rot_t | proposed_ |
proposed translation and rotation for next timestep More... | |
NavigatorInterface::DriveMode | drive_mode_ |
the drive mode name More... | |
Logger * | logger_ |
The fawkes logger. More... | |
Configuration * | config_ |
The fawkes configuration. More... | |
float | max_trans_ |
The maximum translation speed. More... | |
float | max_rot_ |
The maximum rotation speed. More... | |
This is the SlowBackward drive-module, for slow backward only movements.
Definition at line 34 of file backward_drive_mode.h.
fawkes::BackwardDriveModule::BackwardDriveModule | ( | Logger * | logger, |
Configuration * | config | ||
) |
Constructor.
logger | The fawkes logger |
config | The fawkes configuration |
Definition at line 42 of file backward_drive_mode.cpp.
References fawkes::NavigatorInterface::Backward, fawkes::AbstractDriveMode::config_, fawkes::AbstractDriveMode::drive_mode_, fawkes::Configuration::get_float(), fawkes::Logger::log_debug(), fawkes::AbstractDriveMode::logger_, fawkes::AbstractDriveMode::max_rot_, and fawkes::AbstractDriveMode::max_trans_.
fawkes::BackwardDriveModule::~BackwardDriveModule | ( | ) |
Destruct your local values here!
Definition at line 57 of file backward_drive_mode.cpp.
References fawkes::AbstractDriveMode::drive_mode_, fawkes::AbstractDriveMode::guarantee_trans_stop(), fawkes::AbstractDriveMode::lin_interpol(), fawkes::Logger::log_debug(), fawkes::AbstractDriveMode::logger_, fawkes::AbstractDriveMode::max_trans_, fawkes::NavigatorInterface::MovingNotAllowed, and fawkes::AbstractDriveMode::stop_at_target_.
|
virtual |
Calculate here your desired settings.
What you desire is checked afterwards to the current settings of the physical boundaries, but take care also.
How you do this is up to you, but be careful, our hardware is expensive!!!!
Available are:
target_ –> current target coordinates to drive to robot_ –> current robot coordinates robot_vel_ –> current Motor velocities
local_target_ –> our local target found by the search component we want to reach local_trajec_ –> The point we would collide with, if we would drive WITHOUT Rotation
orient_at_target_ –> Do we have to orient ourself at the target? stop_at_target_ –> Do we have to stop really ON the target?
Afterwards filled should be:
proposed_ –> Desired translation and rotation speed
Those values are questioned after an update() was called.
Implements fawkes::AbstractDriveMode.
Definition at line 173 of file backward_drive_mode.cpp.
References fawkes::AbstractDriveMode::local_target_, fawkes::AbstractDriveMode::local_trajec_, fawkes::AbstractDriveMode::max_rot_, fawkes::AbstractDriveMode::max_trans_, fawkes::normalize_mirror_rad(), fawkes::AbstractDriveMode::proposed_, fawkes::AbstractDriveMode::robot_speed_, fawkes::AbstractDriveMode::robot_vel_, fawkes::colli_trans_rot_t::rot, fawkes::sqr(), fawkes::AbstractDriveMode::stop_at_target_, fawkes::cart_coord_2d_struct::x, fawkes::colli_trans_rot_t::x, fawkes::cart_coord_2d_struct::y, and fawkes::colli_trans_rot_t::y.