* Parameters of Obstacle detection
*******************************************************************************/
-#define OBS_SIZE_M 0.1 /**< Expected size of detected obstacle */
+#define OBS_SIZE_M 0.05 /**< Expected size of detected obstacle */
#define IGNORE_CLOSER_THAN_M 0.1 /**< Do not mark any obstacle closer than this to center of the robot (avoid path planning deadlock) */
#define IGNORE_FURTHER_THAN_M 0.5 /**< Ignore data from sharp if further than this */
#define OBS_FORGET_PERIOD 100 /**< The period of thread_obstacle_forgeting [ms] */
-#define OBS_FORGET_SEC 1 /**< Time to completely forget detected obstacle. */
+#define OBS_FORGET_SEC 5 /**< Time to completely forget detected obstacle. */
#define OBS_OFFSET 0.6
void obstacle_detected_at(double x, double y, bool real_obstacle)
for (i = 0; i < HOKUYO_ARRAY_SIZE; i++) {
beam.ang = HOKUYO_INDEX_TO_RAD(i);
- if((beam.ang<(-70.0/180.0*M_PI))||((beam.ang>(70.0/180.0*M_PI))))
+ if((beam.ang<(-HOKUYO_RANGE_ANGLE_LEFT/180.0*M_PI))||((beam.ang>(HOKUYO_RANGE_ANGLE_RIGHT/180.0*M_PI))))
continue;
if(data[i] > 19 && data[i] < 4000) {
obst_coord(&e, &beam, data[i]/1000.0, &x, &y);
obstacle_detected_at(x, y, true);
- obst_coord(&e, &beam, (data[i]/1000.0)+0.1, &x, &y);
+ obst_coord(&e, &beam, (data[i]/1000.0) + OBS_SIZE_M, &x, &y);
obstacle_detected_at(x, y, false);
}