-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRIG.h
50 lines (37 loc) · 1.18 KB
/
RIG.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef RIG_
#define RIG_
#include <ompl/geometric/planners/PlannerIncludes.h>
#include <ompl/datastructures/NearestNeighbors.h>
class RIG : ompl::base::Planner {
public:
RIG(const ompl::base::SpaceInformationPtr &si);
virtual ~RIG();
virtual ompl::base::PlannerStatus solve(const ompl::base::PlannerTerminationCondition &ptc);
protected:
/** \brief Representation of a motion
This only contains pointers to parent motions as we
only need to go backwards in the tree. */
class Motion
{
public:
Motion() : state(NULL), parent(NULL)
{
}
/** \brief Constructor that allocates memory for the state */
Motion(const ompl::base::SpaceInformationPtr &si) : state(si->allocState()), parent(NULL)
{
}
~Motion()
{
}
/** \brief The state contained by the motion */
ompl::base::State *state;
/** \brief The parent motion in the exploration tree */
Motion *parent;
};
private:
ompl::base::StateSamplerPtr sampler_;
ompl::base::OptimizationObjectivePtr obj_;
boost::shared_ptr<ompl::NearestNeighbors<Motion *> > nn_;
};
#endif