Skip to content

Parameter to enforce single sweep direction #63

Open
@rikba

Description

@rikba

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions