23 #ifndef __PLUGINS_COLLI_UTILS_ROB_ROBOSHAPE_COLLI_H_ 24 #define __PLUGINS_COLLI_UTILS_ROB_ROBOSHAPE_COLLI_H_ 26 #include "roboshape.h" 28 #include <utils/math/angle.h> 53 int readings_per_degree = 1 )
throw (
int);
64 std::vector< float > robot_lengths_;
66 unsigned int resolution_;
84 int readings_per_degree )
throw (
int)
87 resolution_ = readings_per_degree;
88 for (
int i = 0; i < 360*readings_per_degree; i++ ) {
89 float anglerad = (i / readings_per_degree) * M_PI / 180.f;
98 robot_lengths_.clear();
118 int number = (int)(angledeg*resolution_);
119 return robot_lengths_[number];
float get_robot_length_for_deg(float angledeg)
Returns the robots length for a specific angle.
float get_robot_length_for_rad(float anglerad)
Returns the robots length for a specific angle.
float get_robot_length_for_rad(float anglerad)
return the length of the robot for a specific angle
Fawkes library namespace.
RoboShapeColli(const char *cfg_prefix, Logger *logger, Configuration *config, int readings_per_degree=1)
Constructor.
~RoboShapeColli()
Destructor.
RoboShape(const char *cfg_prefix, fawkes::Logger *logger, fawkes::Configuration *config)
Constructor.
float rad2deg(float rad)
Convert an angle given in radians to degrees.
This is a class containing all roboshape information.
This class is mainly the same as the basic class with the difference that all data is precalculated o...
Interface for configuration handling.