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

Fix ompl so it only simplifies when requested #562

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions tesseract_motion_planners/ompl/src/ompl_motion_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,9 @@ std::pair<bool, std::string> parallelPlan(ompl::geometric::SimpleSetup& simple_s
if (solver_config.simplify)
simple_setup.simplifySolution();

// Interpolate the path if it shouldn't be simplified and there are currently fewer states than requested
// Interpolate the path there are currently fewer states than requested
marrts marked this conversation as resolved.
Show resolved Hide resolved
if (simple_setup.getSolutionPath().getStateCount() < num_output_states)
{
simple_setup.getSolutionPath().interpolate(num_output_states);
}
else
{
// Now try to simplify the trajectory to get it under the requested number of output states
// The interpolate function only executes if the current number of states is less than the requested
if (!solver_config.simplify)
simple_setup.simplifySolution();

if (simple_setup.getSolutionPath().getStateCount() < num_output_states)
simple_setup.getSolutionPath().interpolate(num_output_states);
}

return std::make_pair(true, "SUCCESS");
}
Expand Down
Loading