Fawkes API  Fawkes Development Version
fawkes::RoboShape Class Reference

#include <>>

Inheritance diagram for fawkes::RoboShape:

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...
 

Detailed Description

This is a class containing all roboshape information. All methods have been implemented but round robots.

Definition at line 35 of file roboshape.h.

Constructor & Destructor Documentation

◆ RoboShape()

fawkes::RoboShape::RoboShape ( const char *  cfg_prefix,
fawkes::Logger logger,
fawkes::Configuration config 
)

Constructor.

Parameters
cfg_prefixThe prefix of the config node, where the roboshape values are found
loggerPointer to the fawkes logger
configPointer to the fawkes configuration.

Definition at line 50 of file roboshape.cpp.

◆ ~RoboShape()

fawkes::RoboShape::~RoboShape ( )

Desctructor.

Definition at line 137 of file roboshape.cpp.

Member Function Documentation

◆ get_angle_back()

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.

Returns
angle in radians

Definition at line 248 of file roboshape.cpp.

References fawkes::normalize_mirror_rad().

◆ get_angle_back_left()

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.

Returns
angle in radians

Definition at line 203 of file roboshape.cpp.

◆ get_angle_back_right()

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.

Returns
angle in radians

Definition at line 212 of file roboshape.cpp.

◆ get_angle_front()

float fawkes::RoboShape::get_angle_front ( ) const

Get angle to middle of the front side of the robot.

Returns
angle in radians

Definition at line 239 of file roboshape.cpp.

◆ get_angle_front_left()

float fawkes::RoboShape::get_angle_front_left ( ) const

Get angle to the front left corner of the robot.

Returns
angle in radians

Definition at line 185 of file roboshape.cpp.

◆ get_angle_front_right()

float fawkes::RoboShape::get_angle_front_right ( ) const

Get angle to the front right corner of the robot.

Returns
angle in radians

Definition at line 194 of file roboshape.cpp.

◆ get_angle_left()

float fawkes::RoboShape::get_angle_left ( ) const

Get angle to middle of the left side of the robot.

Returns
angle in radians

Definition at line 221 of file roboshape.cpp.

◆ get_angle_right()

float fawkes::RoboShape::get_angle_right ( ) const

Get angle to middle of the right side of the robot.

Returns
angle in radians

Definition at line 230 of file roboshape.cpp.

◆ get_complete_radius()

float fawkes::RoboShape::get_complete_radius ( )

Returns the maximum radius of the robot if its round.

Returns
maximum radius of the round robot

Definition at line 342 of file roboshape.cpp.

Referenced by get_robot_length_for_rad().

◆ get_complete_width_x()

float fawkes::RoboShape::get_complete_width_x ( )

Returns the complete x width of the angular robot.

Returns
the complete x width.

Definition at line 385 of file roboshape.cpp.

◆ get_complete_width_y()

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.

Returns
the complete y width.

Definition at line 399 of file roboshape.cpp.

◆ get_laser_offset_x()

float fawkes::RoboShape::get_laser_offset_x ( )

Returns the laser offset in x direction of the robot.

Returns
the laser offset in x direction.

Definition at line 413 of file roboshape.cpp.

◆ get_laser_offset_y()

float fawkes::RoboShape::get_laser_offset_y ( )

Returns the laser offset in y direction of the robot.

Returns
the laser offset in y direction.

Definition at line 422 of file roboshape.cpp.

◆ get_radius()

float fawkes::RoboShape::get_radius ( )

Returns the radius of the robot if its round.

Returns
radius of the round robot

Definition at line 328 of file roboshape.cpp.

◆ get_robot_length_for_deg()

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.

Parameters
angledegis the angle in degree.
Returns
the length in this direction.

Definition at line 319 of file roboshape.cpp.

References is_round_robot().

◆ 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.

Parameters
angleradis the angle in radians.
Returns
the length in this direction.

Definition at line 258 of file roboshape.cpp.

References get_complete_radius().

Referenced by is_angular_robot(), and fawkes::RoboShapeColli::RoboShapeColli().

◆ get_width_x()

float fawkes::RoboShape::get_width_x ( )

Returns the width-x of the angular robot.

Returns
only the robot x width.

Definition at line 357 of file roboshape.cpp.

◆ get_width_y()

float fawkes::RoboShape::get_width_y ( )

Returns the width-y of the angular robot.

Returns
only the robot y width.

Definition at line 371 of file roboshape.cpp.

◆ is_angular_robot()

bool fawkes::RoboShape::is_angular_robot ( )

Returns if the robot is angular.

Returns
bool indicating if the robot is angular.

Definition at line 154 of file roboshape.cpp.

References get_robot_length_for_rad().

◆ is_robot_reading_for_deg()

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.

Parameters
angledegis float containing the angle of the reading in degree.
lengthcontaining the length of the reading.
Returns
if the reading is in the robot.

Definition at line 176 of file roboshape.cpp.

◆ 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.

Parameters
angleradis float containing the angle of the reading in radians.
lengthcontaining the length of the reading.
Returns
if the reading is in the robot.

Definition at line 165 of file roboshape.cpp.

References fawkes::deg2rad().

◆ is_round_robot()

bool fawkes::RoboShape::is_round_robot ( )

Returns if the robot is round.

Returns
bool indicating if the robot is round.

Definition at line 145 of file roboshape.cpp.

Referenced by get_robot_length_for_deg().


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