Change constants minimal and maximal angle detection to global
(HOKUYO_RANGE_ANGLE_LEFT, HOKUYO_RANGE_ANGLE_RIGHT).
fi = HOKUYO_INDEX_TO_RAD(i);
- if (r > 0 && fi > (MIN_ANGLE / 180.0 * M_PI) && fi < (MAX_ANGLE / 180.0 * M_PI)) {
+ if (r > 0 && fi > (-1 * HOKUYO_RANGE_ANGLE_LEFT / 180.0 * M_PI) && fi < (HOKUYO_RANGE_ANGLE_RIGHT / 180.0 * M_PI)) {
fi = HOKUYO_INDEX_TO_RAD(i);
point.x = r * cos(fi);
point.y = r * sin(fi);
#include <hokuyo.h>
#include <robot.h>
#include <robomath.h>
+#include <robodim.h>
#include <robottype.h>
#include <roboorte_robottype.h>
-/**
- * Maximal angle detection
- * @ingroup shapedet
- */
-#define MAX_ANGLE 70.0
-
-/**
- * Minimal angle detection
- * @ingroup shapedet
- */
-#define MIN_ANGLE -70.0
-
/**
* There are detected line segments in input array of measured data (laser_scan)
* by using perpendicular line regression.