Skip to content

Commit

Permalink
Merge pull request #191 from geotsam/noetic-devel
Browse files Browse the repository at this point in the history
Fix polygon padding on filter load
  • Loading branch information
jonbinney authored Mar 24, 2024
2 parents df2b333 + aaecd18 commit 75913d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/polygon_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ bool LaserScanPolygonFilterBase::configure()
dyn_server_.reset(new dynamic_reconfigure::Server<laser_filters::PolygonFilterConfig>(own_mutex_, private_nh));
dynamic_reconfigure::Server<laser_filters::PolygonFilterConfig>::CallbackType f;
f = [this](auto& config, auto level){ reconfigureCB(config, level); };
dyn_server_->setCallback(f);

bool polygon_set = getParam("polygon", polygon_xmlrpc);
bool polygon_frame_set = getParam("polygon_frame", polygon_frame_);
Expand All @@ -274,6 +273,9 @@ bool LaserScanPolygonFilterBase::configure()
param_config.invert = invert_filter_;
dyn_server_->updateConfig(param_config);

// Calling setCallback(f) here calls reconfigureCB() which updates the polygon padding.
dyn_server_->setCallback(f);

polygon_pub_ = private_nh.advertise<geometry_msgs::PolygonStamped>("polygon", 1, true);
is_polygon_published_ = false;

Expand Down

0 comments on commit 75913d5

Please sign in to comment.