Set the sweep direction in degrees. This should go somewhere here:
|
bool SweepPlanGraph::computeDecomposition() { |
|
// Create decomposition. |
|
timing::Timer timer_decom("decomposition"); |
|
switch (settings_.decomposition_type) { |
|
case DecompositionType::kBCD: { |
|
if (!computeBestBCDFromPolygonWithHoles(settings_.polygon, |
|
&polygon_clusters_)) { |
|
ROS_ERROR_STREAM("Cannot compute boustrophedon decomposition."); |
|
return false; |
|
} else { |
|
ROS_INFO_STREAM("Successfully created boustrophedon decomposition with " |
|
<< polygon_clusters_.size() << " polygon(s)."); |
|
} |
|
break; |
|
} |
|
case DecompositionType::kTCD: { |
|
if (!computeBestTCDFromPolygonWithHoles(settings_.polygon, |
|
&polygon_clusters_)) { |
|
ROS_ERROR_STREAM("Cannot compute trapezoidal decomposition."); |
|
return false; |
|
} else { |
|
ROS_INFO_STREAM("Successfully created trapezoidal decomposition with " |
|
<< polygon_clusters_.size() << " polygon(s)."); |
|
} |
|
break; |
|
} |
|
default: { |
|
ROS_ERROR_STREAM("No valid decomposition type set."); |
|
return false; |
|
break; |
|
} |
|
} |
|
timer_decom.Stop(); |
|
|
|
return true; |
|
} |
Addresses question by @FrGe2016 in #60
Set the sweep direction in degrees. This should go somewhere here:
polygon_coverage_planning/polygon_coverage_planners/src/graphs/sweep_plan_graph.cc
Lines 174 to 209 in 1056d54
Addresses question by @FrGe2016 in #60