Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter to enforce single sweep direction #63

Open
rikba opened this issue Dec 1, 2021 · 0 comments
Open

Parameter to enforce single sweep direction #63

rikba opened this issue Dec 1, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@rikba
Copy link
Collaborator

rikba commented Dec 1, 2021

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

@rikba rikba mentioned this issue Dec 1, 2021
@rikba rikba added the enhancement New feature or request label Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant