#include <robot.h>
#include <robodim.h>
#include <map.h>
#include <robomath.h>
#include <hokuyo.h>
#include <shape_detect.h>
#include "map_handling.h"
Defines | |
#define | OBS_SIZE_M 0.2 |
Expected size of detected obstacle. | |
#define | IGNORE_CLOSER_THAN_M 0.2 |
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_OFFSET 0.6 |
Functions | |
void | obstacle_detected_at (double x, double y, bool real_obstacle) |
void | figure_detected_at (double x, double y, const bool state) |
void | obst_coord (struct robot_pos_type *e, const struct sharp_pos *s, double v, double *x, double *y) |
A thread running the trajectory recalc. | |
void | get_checkerboard (std::vector< Shape_detect::Point > &team) |
float | point_distance (Shape_detect::Point a, Shape_detect::Point b) |
void | update_map_hokuyo (struct hokuyo_scan_type *s) |
void * | thread_obstacle_forgeting (void *arg) |
A thread updating the map. |
#define IGNORE_CLOSER_THAN_M 0.2 |
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_OFFSET 0.6 |
#define OBS_SIZE_M 0.2 |
Expected size of detected obstacle.
void figure_detected_at | ( | double | x, | |
double | y, | |||
const bool | state | |||
) |
void get_checkerboard | ( | std::vector< Shape_detect::Point > & | team | ) |
void obst_coord | ( | struct robot_pos_type * | e, | |
const struct sharp_pos * | s, | |||
double | v, | |||
double * | x, | |||
double * | y | |||
) |
A thread running the trajectory recalc.
This (low-medium priority) thread updates the map with sensors information. If it is necesary, it recalculate the path.
arg |
void obstacle_detected_at | ( | double | x, | |
double | y, | |||
bool | real_obstacle | |||
) |
Then all the cells arround obstacle cell are set as MAP_NEW_OBSTACLE. Cells of current robot position are not set to avoid path planning deadlock. If there are a path cell between them, the path will be recalculated.
float point_distance | ( | Shape_detect::Point | a, | |
Shape_detect::Point | b | |||
) | [inline] |
void* thread_obstacle_forgeting | ( | void * | arg | ) |
A thread updating the map.
void update_map_hokuyo | ( | struct hokuyo_scan_type * | s | ) |