23#ifndef _PLUGINS_COLLI_SEARCH_OBSTACLE_MAP_H_
24#define _PLUGINS_COLLI_SEARCH_OBSTACLE_MAP_H_
26#include "../common/types.h"
47 const std::vector<int>
get_obstacle(
int width,
int height,
bool obstacle_increasement =
true);
50 std::map<unsigned int, ColliFastObstacle *> obstacles_;
61 cell_costs_ = cell_costs;
62 is_rectangle_ = is_rectangle;
71inline const std::vector<int>
74 unsigned int key = ((
unsigned int)width << 16) | (
unsigned int)height;
76 std::map<unsigned int, ColliFastObstacle *>::iterator p = obstacles_.find(key);
77 if (p == obstacles_.end()) {
83 obstacle =
new ColliFastEllipse(width, height, cell_costs_, obstacle_increasement);
85 obstacles_[key] = obstacle;
90 return obstacles_[key]->get_obstacle();
This is an implementation of a a fast ellipse.
This is an implementation of a a fast obstacle.
const std::vector< int > get_obstacle()
Return the occupied cells with their values.
void set_key(int key)
Set key.
This is an implementation of a a fast rectangle.
This is an implementation of a collection of fast obstacles.
const std::vector< int > get_obstacle(int width, int height, bool obstacle_increasement=true)
Get the occupied cells that match a given obstacle.
ColliObstacleMap(colli_cell_cost_t cell_costs, bool is_rectangle=false)
Constructor.
Fawkes library namespace.
Costs of occupancy-grid cells.