23 #ifndef __PLUGINS_COLLI_SEARCH_OBSTACLE_MAP_H_ 24 #define __PLUGINS_COLLI_SEARCH_OBSTACLE_MAP_H_ 27 #include "../common/types.h" 48 const std::vector< int >
get_obstacle(
int width,
int height,
bool obstacle_increasement =
true );
51 std::map< unsigned int, ColliFastObstacle * > obstacles_;
63 cell_costs_ = cell_costs;
64 is_rectangle_ = is_rectangle;
73 inline const std::vector< int >
76 unsigned int key = ((
unsigned int)width << 16) | (
unsigned int)height;
78 std::map< unsigned int, ColliFastObstacle * >::iterator p = obstacles_.find( key );
79 if ( p == obstacles_.end() ) {
85 obstacle =
new ColliFastEllipse( width, height, cell_costs_, obstacle_increasement );
87 obstacles_[ key ] = obstacle;
92 return obstacles_[ key ]->get_obstacle();
ColliObstacleMap(colli_cell_cost_t cell_costs, bool is_rectangle=false)
Constructor.
const std::vector< int > get_obstacle()
Return the occupied cells with their values.
Fawkes library namespace.
This is an implementation of a a fast obstacle.
This is an implementation of a a fast ellipse.
Costs of occupancy-grid cells.
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.