|
|
|
|
@@ -4,6 +4,7 @@
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
using std::vector;
|
|
|
|
|
|
|
|
|
|
@@ -48,7 +49,7 @@ namespace costmap_2d
|
|
|
|
|
boost::unique_lock<Costmap2D::mutex_t> lock(*(costmap_.getMutex()));
|
|
|
|
|
size_locked_ = size_locked;
|
|
|
|
|
costmap_.resizeMap(size_x, size_y, resolution, origin_x, origin_y);
|
|
|
|
|
for (vector<boost::shared_ptr<Layer>>::iterator plugin = plugins_.begin(); plugin != plugins_.end();
|
|
|
|
|
for (vector<costmap_2d::PluginLayerPtr>::iterator plugin = plugins_.begin(); plugin != plugins_.end();
|
|
|
|
|
++plugin)
|
|
|
|
|
{
|
|
|
|
|
(*plugin)->matchSize();
|
|
|
|
|
@@ -75,7 +76,7 @@ namespace costmap_2d
|
|
|
|
|
minx_ = miny_ = 1e30;
|
|
|
|
|
maxx_ = maxy_ = -1e30;
|
|
|
|
|
|
|
|
|
|
for (vector<boost::shared_ptr<Layer>>::iterator plugin = plugins_.begin(); plugin != plugins_.end();
|
|
|
|
|
for (vector<costmap_2d::PluginLayerPtr>::iterator plugin = plugins_.begin(); plugin != plugins_.end();
|
|
|
|
|
++plugin)
|
|
|
|
|
{
|
|
|
|
|
if (!(*plugin)->isEnabled())
|
|
|
|
|
@@ -111,7 +112,7 @@ namespace costmap_2d
|
|
|
|
|
|
|
|
|
|
costmap_.resetMap(x0, y0, xn, yn);
|
|
|
|
|
|
|
|
|
|
for (vector<boost::shared_ptr<Layer>>::iterator plugin = plugins_.begin(); plugin != plugins_.end();
|
|
|
|
|
for (vector<costmap_2d::PluginLayerPtr>::iterator plugin = plugins_.begin(); plugin != plugins_.end();
|
|
|
|
|
++plugin)
|
|
|
|
|
{
|
|
|
|
|
if ((*plugin)->isEnabled())
|
|
|
|
|
@@ -129,7 +130,7 @@ namespace costmap_2d
|
|
|
|
|
bool LayeredCostmap::isCurrent()
|
|
|
|
|
{
|
|
|
|
|
current_ = true;
|
|
|
|
|
for (vector<boost::shared_ptr<Layer>>::iterator plugin = plugins_.begin(); plugin != plugins_.end();
|
|
|
|
|
for (vector<costmap_2d::PluginLayerPtr>::iterator plugin = plugins_.begin(); plugin != plugins_.end();
|
|
|
|
|
++plugin)
|
|
|
|
|
{
|
|
|
|
|
if ((*plugin)->isEnabled())
|
|
|
|
|
@@ -143,7 +144,7 @@ namespace costmap_2d
|
|
|
|
|
footprint_ = footprint_spec;
|
|
|
|
|
costmap_2d::calculateMinAndMaxDistances(footprint_spec, inscribed_radius_, circumscribed_radius_);
|
|
|
|
|
|
|
|
|
|
for (vector<boost::shared_ptr<Layer>>::iterator plugin = plugins_.begin(); plugin != plugins_.end();
|
|
|
|
|
for (vector<costmap_2d::PluginLayerPtr>::iterator plugin = plugins_.begin(); plugin != plugins_.end();
|
|
|
|
|
++plugin)
|
|
|
|
|
{
|
|
|
|
|
(*plugin)->onFootprintChanged();
|
|
|
|
|
|