Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions nav2_costmap_2d/include/nav2_costmap_2d/layered_costmap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,8 @@ class LayeredCostmap
/**
* @brief Add a new plugin to the plugins vector to process
*/
void addPlugin(std::shared_ptr<Layer> plugin)
{
plugins_.push_back(plugin);
}
void addPlugin(std::shared_ptr<Layer> plugin);


/**
* @brief Add a new costmap filter plugin to the filters vector to process
Expand Down
6 changes: 6 additions & 0 deletions nav2_costmap_2d/src/layered_costmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ LayeredCostmap::~LayeredCostmap()
}
}

void LayeredCostmap::addPlugin(std::shared_ptr<Layer> plugin)
{
std::unique_lock<Costmap2D::mutex_t> lock(*(combined_costmap_.getMutex()));
plugins_.push_back(plugin);
}

void LayeredCostmap::resizeMap(
unsigned int size_x, unsigned int size_y, double resolution,
double origin_x,
Expand Down