Skip to content

Commit

Permalink
Fix polygons not clearing, credit to tonynajjar
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-Morcos committed Aug 19, 2024
1 parent 4e736ee commit d49f7e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions opennav_coverage_bt/src/compute_complete_coverage_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ void ComputeCoveragePathAction::on_tick()
// Convert from vector of Polygons to coverage sp. message
std::vector<geometry_msgs::msg::Polygon> polys;
getInput("polygons", polys);
goal_.polygons.clear();
goal_.polygons.resize(polys.size());
for (unsigned int i = 0; i != polys.size(); i++) {
for (unsigned int j = 0; j != polys[i].points.size(); j++) {
Expand Down

0 comments on commit d49f7e6

Please sign in to comment.