30 #ifndef EXOTICA_OMPL_SOLVER_OMPL_SOLVER_H_ 31 #define EXOTICA_OMPL_SOLVER_OMPL_SOLVER_H_ 36 typedef boost::function<ompl::base::PlannerPtr(const ompl::base::SpaceInformationPtr &si, const std::string &name)>
ConfiguredPlannerAllocator;
38 #if ROS_VERSION_MINIMUM(1, 12, 0) // if ROS version >= ROS_KINETIC 39 template <
class T,
class T1>
40 std::shared_ptr<T>
ompl_cast(std::shared_ptr<T1> ptr)
42 return std::static_pointer_cast<T>(ptr);
47 template <
class T,
class T1>
50 return boost::static_pointer_cast<T>(ptr);
58 template <
class ProblemType>
65 void Solve(Eigen::MatrixXd &solution)
override;
79 static ompl::base::PlannerPtr
AllocatePlanner(
const ompl::base::SpaceInformationPtr &si,
const std::string &new_name)
81 ompl::base::PlannerPtr planner(
new T(si));
82 if (!new_name.empty())
83 planner->setName(new_name);
90 void GetPath(Eigen::MatrixXd &traj, ompl::base::PlannerTerminationCondition &ptc);
92 std::shared_ptr<ProblemType>
prob_;
102 #endif // EXOTICA_OMPL_SOLVER_OMPL_SOLVER_H_ OMPLSolverInitializer init_
std::shared_ptr< ProblemType > prob_
ompl::base::StateSpacePtr state_space_
void SetValidSegmentCountFactor(unsigned int factor)
boost::function< ompl::base::PlannerPtr(const ompl::base::SpaceInformationPtr &si, const std::string &name)> ConfiguredPlannerAllocator
int GetRandomSeed() const
std::vector< double > bounds_
double GetLongestValidSegmentLength() const
ConfiguredPlannerAllocator planner_allocator_
void SpecifyProblem(PlanningProblemPtr pointer) override
boost::shared_ptr< T > ompl_cast(boost::shared_ptr< T1 > ptr)
double GetMaximumExtent() const
const Eigen::Ref< const Eigen::VectorXd > & VectorXdRefConst
ompl::geometric::SimpleSetupPtr ompl_simple_setup_
void SetGoalState(Eigen::VectorXdRefConst qT, const double eps=0)
void SetLongestValidSegmentFraction(double segmentFraction)
void GetPath(Eigen::MatrixXd &traj, ompl::base::PlannerTerminationCondition &ptc)
unsigned int GetValidSegmentCountFactor() const
std::shared_ptr< PlanningProblem > PlanningProblemPtr
void Solve(Eigen::MatrixXd &solution) override
static ompl::base::PlannerPtr AllocatePlanner(const ompl::base::SpaceInformationPtr &si, const std::string &new_name)