Skip to content

Commit

Permalink
Merge pull request #29 from davetcoleman/simple_setup_minor
Browse files Browse the repository at this point in the history
Added debug output to simplifySolution to match other simplifySolution function
  • Loading branch information
mamoll committed Aug 1, 2014
2 parents 25aae57 + 7b5e5f8 commit e21bbf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ompl/geometric/src/SimpleSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,15 @@ void ompl::geometric::SimpleSetup::simplifySolution(double duration)
if (p)
{
time::point start = time::now();
PathGeometric &path = static_cast<PathGeometric&>(*p);
std::size_t numStates = path.getStateCount();
if (duration < std::numeric_limits<double>::epsilon())
psk_->simplifyMax(static_cast<PathGeometric&>(*p));
else
psk_->simplify(static_cast<PathGeometric&>(*p), duration);
simplifyTime_ = time::seconds(time::now() - start);
OMPL_INFORM("Path simplification took %f seconds", simplifyTime_);
OMPL_INFORM("Path simplification took %f seconds and changed from %d to %d states",
simplifyTime_, numStates, path.getStateCount());
return;
}
}
Expand Down

0 comments on commit e21bbf6

Please sign in to comment.