Fawkes API
Fawkes Development Version
|
This is a class containing all roboshape information. More...
#include <>>
Public Member Functions | |
RoboShape (const char *cfg_prefix, fawkes::Logger *logger, fawkes::Configuration *config) | |
Constructor. More... | |
~RoboShape () | |
Desctructor. More... | |
bool | is_round_robot () |
Returns if the robot is round. More... | |
bool | is_angular_robot () |
Returns if the robot is angular. More... | |
bool | is_robot_reading_for_rad (float anglerad, float length) |
Check if the reading is 'in' the robot. More... | |
bool | is_robot_reading_for_deg (float angledeg, float length) |
Check if the reading is 'in' the robot. More... | |
float | get_robot_length_for_rad (float anglerad) |
return the length of the robot for a specific angle More... | |
float | get_robot_length_for_deg (float angledeg) |
return the length of the robot for a specific angle More... | |
float | get_radius () |
Returns the radius of the robot if its round. More... | |
float | get_complete_radius () |
Returns the maximum radius of the robot if its round. More... | |
float | get_width_x () |
Returns the width-x of the angular robot. More... | |
float | get_width_y () |
Returns the width-y of the angular robot. More... | |
float | get_complete_width_x () |
Returns the complete x width of the angular robot. More... | |
float | get_complete_width_y () |
Returns the complete x width of the angular robot. More... | |
float | get_laser_offset_x () |
Returns the laser offset in x direction of the robot. More... | |
float | get_laser_offset_y () |
Returns the laser offset in y direction of the robot. More... | |
float | get_angle_front_left () const |
Get angle to the front left corner of the robot. More... | |
float | get_angle_front_right () const |
Get angle to the front right corner of the robot. More... | |
float | get_angle_back_left () const |
Get angle to of the rear left corner robot. More... | |
float | get_angle_back_right () const |
Get angle to of the rear right corner robot. More... | |
float | get_angle_left () const |
Get angle to middle of the left side of the robot. More... | |
float | get_angle_right () const |
Get angle to middle of the right side of the robot. More... | |
float | get_angle_front () const |
Get angle to middle of the front side of the robot. More... | |
float | get_angle_back () const |
Get angle to middle of the back side of the robot. More... | |
This is a class containing all roboshape information.
All methods have been implemented but round robots.
Definition at line 35 of file roboshape.h.
fawkes::RoboShape::RoboShape | ( | const char * | cfg_prefix, |
fawkes::Logger * | logger, | ||
fawkes::Configuration * | config | ||
) |
Constructor.
cfg_prefix | The prefix of the config node, where the roboshape values are found |
logger | Pointer to the fawkes logger |
config | Pointer to the fawkes configuration. |
Definition at line 49 of file roboshape.cpp.
References fawkes::Configuration::get_float(), fawkes::Configuration::get_int(), fawkes::Logger::log_info(), and fawkes::normalize_mirror_rad().
fawkes::RoboShape::~RoboShape | ( | ) |
Desctructor.
Definition at line 153 of file roboshape.cpp.
float fawkes::RoboShape::get_angle_back | ( | ) | const |
Get angle to middle of the back side of the robot.
Get angle to middle of the rear side of the robot.
Definition at line 264 of file roboshape.cpp.
float fawkes::RoboShape::get_angle_back_left | ( | ) | const |
Get angle to of the rear left corner robot.
Get angle to the rear left corner of the robot.
Definition at line 219 of file roboshape.cpp.
Referenced by fawkes::EscapeDriveModule::set_laser_data().
float fawkes::RoboShape::get_angle_back_right | ( | ) | const |
Get angle to of the rear right corner robot.
Get angle to the rear right corner of the robot.
Definition at line 228 of file roboshape.cpp.
Referenced by fawkes::EscapeDriveModule::set_laser_data().
float fawkes::RoboShape::get_angle_front | ( | ) | const |
Get angle to middle of the front side of the robot.
Definition at line 255 of file roboshape.cpp.
float fawkes::RoboShape::get_angle_front_left | ( | ) | const |
Get angle to the front left corner of the robot.
Definition at line 201 of file roboshape.cpp.
Referenced by fawkes::EscapeDriveModule::set_laser_data().
float fawkes::RoboShape::get_angle_front_right | ( | ) | const |
Get angle to the front right corner of the robot.
Definition at line 210 of file roboshape.cpp.
Referenced by fawkes::EscapeDriveModule::set_laser_data().
float fawkes::RoboShape::get_angle_left | ( | ) | const |
Get angle to middle of the left side of the robot.
Definition at line 237 of file roboshape.cpp.
Referenced by fawkes::EscapeDriveModule::set_laser_data().
float fawkes::RoboShape::get_angle_right | ( | ) | const |
Get angle to middle of the right side of the robot.
Definition at line 246 of file roboshape.cpp.
Referenced by fawkes::EscapeDriveModule::set_laser_data().
float fawkes::RoboShape::get_complete_radius | ( | ) |
Returns the maximum radius of the robot if its round.
Definition at line 356 of file roboshape.cpp.
References is_round_robot(), and fawkes::Logger::log_error().
Referenced by get_complete_width_x(), get_complete_width_y(), and get_robot_length_for_rad().
float fawkes::RoboShape::get_complete_width_x | ( | ) |
Returns the complete x width of the angular robot.
Definition at line 398 of file roboshape.cpp.
References get_complete_radius(), and is_angular_robot().
Referenced by fawkes::LaserOccupancyGrid::get_cell_costs(), and fawkes::LaserOccupancyGrid::LaserOccupancyGrid().
float fawkes::RoboShape::get_complete_width_y | ( | ) |
Returns the complete x width of the angular robot.
Returns the complete y width of the angular robot.
Definition at line 413 of file roboshape.cpp.
References get_complete_radius(), and is_angular_robot().
Referenced by fawkes::LaserOccupancyGrid::get_cell_costs(), and fawkes::LaserOccupancyGrid::LaserOccupancyGrid().
float fawkes::RoboShape::get_laser_offset_x | ( | ) |
Returns the laser offset in x direction of the robot.
Definition at line 427 of file roboshape.cpp.
float fawkes::RoboShape::get_laser_offset_y | ( | ) |
Returns the laser offset in y direction of the robot.
Definition at line 436 of file roboshape.cpp.
float fawkes::RoboShape::get_radius | ( | ) |
Returns the radius of the robot if its round.
Definition at line 342 of file roboshape.cpp.
References is_round_robot(), and fawkes::Logger::log_error().
float fawkes::RoboShape::get_robot_length_for_deg | ( | float | angledeg | ) |
return the length of the robot for a specific angle
Returns the robots length for a specific angle.
angledeg | is the angle in degree. |
Definition at line 333 of file roboshape.cpp.
References fawkes::deg2rad(), and get_robot_length_for_rad().
float fawkes::RoboShape::get_robot_length_for_rad | ( | float | anglerad | ) |
return the length of the robot for a specific angle
Returns the robots length for a specific angle.
anglerad | is the angle in radians. |
Definition at line 274 of file roboshape.cpp.
References get_complete_radius(), is_angular_robot(), is_round_robot(), and fawkes::normalize_mirror_rad().
Referenced by get_robot_length_for_deg(), is_robot_reading_for_rad(), and fawkes::RoboShapeColli::RoboShapeColli().
float fawkes::RoboShape::get_width_x | ( | ) |
Returns the width-x of the angular robot.
Definition at line 370 of file roboshape.cpp.
References is_angular_robot(), and fawkes::Logger::log_error().
float fawkes::RoboShape::get_width_y | ( | ) |
Returns the width-y of the angular robot.
Definition at line 384 of file roboshape.cpp.
References is_angular_robot(), and fawkes::Logger::log_error().
bool fawkes::RoboShape::is_angular_robot | ( | ) |
Returns if the robot is angular.
Definition at line 170 of file roboshape.cpp.
Referenced by get_complete_width_x(), get_complete_width_y(), get_robot_length_for_rad(), get_width_x(), get_width_y(), and fawkes::LaserOccupancyGrid::LaserOccupancyGrid().
bool fawkes::RoboShape::is_robot_reading_for_deg | ( | float | angledeg, |
float | length | ||
) |
Check if the reading is 'in' the robot.
Returns, if a reading length is in the robot.
angledeg | is float containing the angle of the reading in degree. |
length | containing the length of the reading. |
Definition at line 192 of file roboshape.cpp.
References fawkes::deg2rad(), and is_robot_reading_for_rad().
bool fawkes::RoboShape::is_robot_reading_for_rad | ( | float | anglerad, |
float | length | ||
) |
Check if the reading is 'in' the robot.
Returns, if a reading length is in the robot.
anglerad | is float containing the angle of the reading in radians. |
length | containing the length of the reading. |
Definition at line 181 of file roboshape.cpp.
References get_robot_length_for_rad().
Referenced by is_robot_reading_for_deg().
bool fawkes::RoboShape::is_round_robot | ( | ) |
Returns if the robot is round.
Definition at line 161 of file roboshape.cpp.
Referenced by get_complete_radius(), get_radius(), and get_robot_length_for_rad().