14 _steered = PlannerUtils::toSteeredTrajectory(path).getPath();
15 _geometric =
new og::PathGeometric(
ss->getSpaceInformation());
16 for (
auto &node : path) {
18 ss->getStateSpace()->allocState()->as<ob::SE2StateSpace::StateType>();
19 state->setXY(node.x_r, node.y_r);
20 state->setYaw(node.theta);
21 _geometric->append(state);
27 std::string
name()
const override {
return "OMPL Simplifier"; }
29 ob::PlannerStatus
run() {
30 OMPL_ERROR(
"OMPLSimplifier::run() has not been implemented.");
31 return ob::PlannerStatus::CRASH;
35 std::vector<TrajectoryPoint>
solutionPath()
const {
return _steered; }
44 const std::vector<GNode> _path{};
45 std::vector<TrajectoryPoint> _steered{};
46 og::PathGeometric *_geometric{};
Definition: AbstractPlanner.h:29
og::SimpleSetup * ss
Definition: AbstractPlanner.h:114
Derived from AbstractPlanner, this class is intended to simplify existing (hand-crafted) trajectories...
Definition: OMPLSimplifier.hpp:10
std::vector< TrajectoryPoint > solutionPath() const
Definition: OMPLSimplifier.hpp:35
ob::Planner * omplPlanner()
Definition: OMPLSimplifier.hpp:41
bool hasReachedGoalExactly() const
Definition: OMPLSimplifier.hpp:38
og::PathGeometric geometricPath() const
Definition: OMPLSimplifier.hpp:36
std::string name() const override
Definition: OMPLSimplifier.hpp:27
~OMPLSimplifier()
Definition: OMPLSimplifier.hpp:25
OMPLSimplifier(const std::vector< GNode > &path)
Definition: OMPLSimplifier.hpp:12
double planningTime() const
Definition: OMPLSimplifier.hpp:40
std::vector< GNode > solutionTrajectory() const
Definition: OMPLSimplifier.hpp:34
ob::PlannerStatus run()
Definition: OMPLSimplifier.hpp:29
Planner
Definition: PlannerSettings.h:16