Fawkes API
Fawkes Development Version
|
Class Escape-Drive-Module. More...
#include <>>
Public Member Functions | |
EscapePotentialFieldDriveModule (Logger *logger, Configuration *config) | |
Constructor. More... | |
~EscapePotentialFieldDriveModule () | |
Destruct your local values here. More... | |
void | set_grid_information (LaserOccupancyGrid *occ_grid, int robo_x, int robo_y) |
This function sets the Grid information for one escape step. More... | |
virtual 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... | |
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 38 of file escape_potential_field_drive_mode.h.
fawkes::EscapePotentialFieldDriveModule::EscapePotentialFieldDriveModule | ( | Logger * | logger, |
Configuration * | config | ||
) |
Constructor.
logger | The fawkes logger |
config | The fawkes configuration |
Definition at line 43 of file escape_potential_field_drive_mode.cpp.
References fawkes::AbstractDriveMode::config_, fawkes::AbstractDriveMode::drive_mode_, fawkes::NavigatorInterface::ESCAPE, fawkes::Configuration::get_bool(), fawkes::Configuration::get_float(), fawkes::Logger::log_debug(), fawkes::AbstractDriveMode::logger_, fawkes::AbstractDriveMode::max_rot_, fawkes::AbstractDriveMode::max_trans_, fawkes::point_struct::x, and fawkes::point_struct::y.
fawkes::EscapePotentialFieldDriveModule::~EscapePotentialFieldDriveModule | ( | ) |
Destruct your local values here.
Definition at line 64 of file escape_potential_field_drive_mode.cpp.
References fawkes::Logger::log_debug(), and fawkes::AbstractDriveMode::logger_.
void fawkes::EscapePotentialFieldDriveModule::set_grid_information | ( | LaserOccupancyGrid * | occ_grid, |
int | robo_x, | ||
int | robo_y | ||
) |
This function sets the Grid information for one escape step.
occ_grid | pointer to the occ_grid |
robo_x | robot position on the grid in x |
robo_y | robot position on the grid in y |
Definition at line 77 of file escape_potential_field_drive_mode.cpp.
References fawkes::point_struct::x, and fawkes::point_struct::y.
|
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 105 of file escape_potential_field_drive_mode.cpp.
References fawkes::LaserOccupancyGrid::get_cell_costs(), fawkes::OccupancyGrid::get_cell_height(), fawkes::OccupancyGrid::get_cell_width(), fawkes::OccupancyGrid::get_height(), fawkes::OccupancyGrid::get_prob(), fawkes::OccupancyGrid::get_width(), fawkes::Logger::log_debug(), fawkes::AbstractDriveMode::logger_, fawkes::AbstractDriveMode::max_rot_, fawkes::AbstractDriveMode::max_trans_, fawkes::normalize_mirror_rad(), fawkes::colli_cell_cost_t::occ, fawkes::polar_coord_2d_t::phi, fawkes::AbstractDriveMode::proposed_, fawkes::polar_coord_2d_t::r, fawkes::colli_trans_rot_t::rot, fawkes::point_struct::x, fawkes::colli_trans_rot_t::x, fawkes::point_struct::y, and fawkes::colli_trans_rot_t::y.