4#include <ompl/geometric/PathGeometric.h>
5#include <ompl/geometric/SimpleSetup.h>
6#include <ompl/geometric/planners/AnytimePathShortening.h>
10namespace ob = ompl::base;
11namespace og = ompl::geometric;
15 explicit OmplSmoother(og::SimpleSetup *ss,
const og::PathGeometric &solution)
16 : ss(ss), _solution(solution) {}
19 OMPL_INFORM(
"Running OMPL Shortcutting...");
21 r.
status = ss->getLastPlannerStatus();
22 og::PathGeometric path(ss->getSpaceInformation());
23 path.append(_solution);
25 og::PathSimplifier ps(ss->getSpaceInformation(), ss->getGoal());
42 OMPL_INFORM(
"Running OMPL B-spline smoothing...");
44 r.
status = ss->getLastPlannerStatus();
45 og::PathGeometric path(ss->getSpaceInformation());
46 path.append(_solution);
48 og::PathSimplifier ps(ss->getSpaceInformation(), ss->getGoal());
63 OMPL_INFORM(
"Running OMPL Simplify Max smoothing...");
65 r.
status = ss->getLastPlannerStatus();
66 og::PathGeometric path(ss->getSpaceInformation());
67 path.append(_solution);
68 og::PathSimplifier ps(ss->getSpaceInformation(), ss->getGoal());
112 og::SimpleSetup *ss{
nullptr};
113 og::PathGeometric _solution;
Definition: OmplSmoother.hpp:13
OmplSmoother(og::SimpleSetup *ss, const og::PathGeometric &solution)
Definition: OmplSmoother.hpp:15
virtual TimedResult simplifyMax() const
Definition: OmplSmoother.hpp:62
virtual TimedResult shortcutPath() const
Definition: OmplSmoother.hpp:18
virtual TimedResult smoothBSpline() const
Definition: OmplSmoother.hpp:41
double stop()
Stops the timer.
Definition: Stopwatch.hpp:32
void start()
Starts the timer.
Definition: Stopwatch.hpp:15
Definition: TimedResult.hpp:9
ob::PlannerStatus status
Definition: TimedResult.hpp:12
ompl::geometric::PathGeometric trajectory
Definition: TimedResult.hpp:11
Property< unsigned int > shortcut_max_empty_steps
Definition: PlannerSettings.h:652
Property< double > shortcut_snap_to_vertex
Definition: PlannerSettings.h:655
Property< double > bspline_epsilon
Definition: PlannerSettings.h:649
Property< double > shortcut_range_ratio
Definition: PlannerSettings.h:654
PlannerSettings::GlobalSettings::SmoothingSettings::OmplSettings ompl
PlannerSettings::GlobalSettings::OmplSettings ompl
PlannerSettings::GlobalSettings::SmoothingSettings smoothing
static PlannerSettings::GlobalSettings settings
Definition: PlannerSettings.h:699