Fawkes API
Fawkes Development Version
|
Class Escape-Drive-Module. More...
#include <>>
Public Member Functions | |
EscapeDriveModule (Logger *logger, Configuration *config) | |
Constructor. More... | |
~EscapeDriveModule () | |
Destructor. More... | |
virtual void | update () |
Calculate here your desired settings. More... | |
void | set_laser_data (std::vector< polar_coord_2d_t > &laser_points) |
This function sets the laser points for one escape round. 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... | |
Class Escape-Drive-Module.
This module is called, if an escape is neccessary. It should try to maximize distance to the disturbing obstacle.
Definition at line 41 of file escape_drive_mode.h.
fawkes::EscapeDriveModule::EscapeDriveModule | ( | Logger * | logger, |
Configuration * | config | ||
) |
Constructor.
logger | The fawkes logger |
config | The fawkes configuration |
Definition at line 43 of file escape_drive_mode.cpp.
References fawkes::AbstractDriveMode::config_, fawkes::AbstractDriveMode::drive_mode_, fawkes::NavigatorInterface::ESCAPE, fawkes::Configuration::get_float(), fawkes::Logger::log_info(), fawkes::AbstractDriveMode::logger_, fawkes::AbstractDriveMode::max_rot_, and fawkes::AbstractDriveMode::max_trans_.
fawkes::EscapeDriveModule::~EscapeDriveModule | ( | ) |
Destructor.
Destruct your local values here.
Definition at line 59 of file escape_drive_mode.cpp.
References fawkes::Logger::log_info(), and fawkes::AbstractDriveMode::logger_.
void fawkes::EscapeDriveModule::set_laser_data | ( | std::vector< polar_coord_2d_t > & | laser_points | ) |
This function sets the laser points for one escape round.
laser_points | vector of laser points |
Definition at line 169 of file escape_drive_mode.cpp.
References fawkes::RoboShape::get_angle_back_left(), fawkes::RoboShape::get_angle_back_right(), fawkes::RoboShape::get_angle_front_left(), fawkes::RoboShape::get_angle_front_right(), fawkes::RoboShape::get_angle_left(), fawkes::RoboShape::get_angle_right(), fawkes::RoboShapeColli::get_robot_length_for_rad(), fawkes::Logger::log_error(), fawkes::AbstractDriveMode::logger_, and fawkes::normalize_rad().
|
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!!!!
All values of the other drive modes inherited by the abstract-drive-mode are non-valid, because search did not succeed or should not have been called! So do not use them. Instead here you use the m_pLaser!
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 86 of file escape_drive_mode.cpp.
References fawkes::AbstractDriveMode::local_target_, fawkes::Logger::log_debug(), fawkes::AbstractDriveMode::logger_, fawkes::AbstractDriveMode::max_rot_, fawkes::AbstractDriveMode::max_trans_, fawkes::AbstractDriveMode::proposed_, fawkes::AbstractDriveMode::robot_, fawkes::colli_trans_rot_t::rot, fawkes::AbstractDriveMode::target_, fawkes::colli_trans_rot_t::x, fawkes::field_pos_t::x, fawkes::cart_coord_2d_struct::y, fawkes::colli_trans_rot_t::y, and fawkes::field_pos_t::y.