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>
43 class RoboShapeColli :
public RoboShape
48 Configuration *config,
49 int readings_per_degree = 1);
60 std::vector<float> robot_lengths_;
62 unsigned int resolution_;
78 int readings_per_degree)
81 resolution_ = readings_per_degree;
82 for (
int i = 0; i < 360 * readings_per_degree; i++) {
83 float anglerad = (i / readings_per_degree) * M_PI / 180.f;
91 robot_lengths_.clear();
111 int number = (int)(angledeg * resolution_);
112 return robot_lengths_[number];