Aikido
GoalRegion.hpp
Go to the documentation of this file.
1 #ifndef AIKIDO_OMPL_GOALREGION_HPP_
2 #define AIKIDO_OMPL_GOALREGION_HPP_
3 
4 #include <ompl/base/goals/GoalSampleableRegion.h>
5 
8 
9 namespace aikido {
10 namespace planner {
11 namespace ompl {
12 
14 class GoalRegion : public ::ompl::base::GoalSampleableRegion
15 {
16 public:
24  GoalRegion(
25  const ::ompl::base::SpaceInformationPtr& _si,
26  constraint::TestablePtr _goalTestable,
27  std::unique_ptr<constraint::SampleGenerator> _generator);
28 
32  void sampleGoal(::ompl::base::State* _state) const override;
33 
36  unsigned int maxSampleCount() const override;
37 
39  bool couldSample() const override;
40 
43  double distanceGoal(const ::ompl::base::State* _state) const override;
44 
47  bool isSatisfied(const ::ompl::base::State* _state) const override;
48 
49 private:
51  std::unique_ptr<constraint::SampleGenerator> mSampleGenerator;
52 };
53 
54 } // namespace ompl
55 } // namespace planner
56 } // namespace aikido
57 
58 #endif
aikido
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
aikido::planner::ompl::GoalRegion::GoalRegion
GoalRegion(const ::ompl::base::SpaceInformationPtr &_si, constraint::TestablePtr _goalTestable, std::unique_ptr< constraint::SampleGenerator > _generator)
Constructor.
aikido::planner::ompl::GoalRegion::mSampleGenerator
std::unique_ptr< constraint::SampleGenerator > mSampleGenerator
Definition: GoalRegion.hpp:51
aikido::planner::ompl::GoalRegion::isSatisfied
bool isSatisfied(const ::ompl::base::State *_state) const override
Return true if the state satisfies the goal constraints.
Sampleable.hpp
aikido::planner::ompl::GoalRegion::maxSampleCount
unsigned int maxSampleCount() const override
Return the maximum number of samples that can be asked for before repeating.
aikido::planner::ompl::GoalRegion::mTestable
constraint::TestablePtr mTestable
Definition: GoalRegion.hpp:50
aikido::planner::ompl::GoalRegion
Exposes a Testable/Sampleable constraint pair as a goal to OMPL planners.
Definition: GoalRegion.hpp:14
aikido::planner::ompl::GoalRegion::distanceGoal
double distanceGoal(const ::ompl::base::State *_state) const override
Return 0 if the goal is satisfied or inf otherwise.
Testable.hpp
aikido::planner::ompl::GoalRegion::sampleGoal
void sampleGoal(::ompl::base::State *_state) const override
Sample a state in the goal region using the SampleGenerator defined on the class.
aikido::planner::ompl::GoalRegion::couldSample
bool couldSample() const override
Return true if the SampleGenerator can generate more samples.
aikido::constraint::TestablePtr
std::shared_ptr< Testable > TestablePtr
Definition: Testable.hpp:13