hpp-manipulation  4.9.0
Classes for manipulation planning.
state.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016 CNRS
3 // Authors: Joseph Mirabel
4 //
5 // This file is part of hpp-manipulation
6 // hpp-manipulation is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-manipulation is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-manipulation If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_MANIPULATION_PROBLEM_TARGET_STATE_HH
20 # define HPP_MANIPULATION_PROBLEM_TARGET_STATE_HH
21 
22 # include <hpp/core/problem-target.hh>
23 
24 # include <hpp/core/fwd.hh>
25 # include <hpp/manipulation/fwd.hh>
27 # include <hpp/manipulation/config.hh>
28 
29 namespace hpp {
30  namespace manipulation {
31  namespace problemTarget {
34 
38  class HPP_MANIPULATION_DLLAPI State : public core::ProblemTarget {
39  public:
41 
43  void check (const core::RoadmapPtr_t& roadmap) const;
44 
46  bool reached (const core::RoadmapPtr_t& roadmap) const;
47 
48  core::PathVectorPtr_t computePath(const core::RoadmapPtr_t& roadmap) const;
49 
50  void target (const graph::StatePtr_t& state)
51  {
52  state_ = state;
53  }
54 
55  protected:
57  State (const core::ProblemPtr_t& problem)
58  : ProblemTarget (problem)
59  {}
60 
61  private:
62  graph::StatePtr_t state_;
63  }; // class State
65  } // namespace problemTarget
66  } // namespace manipulation
67 } // namespace hpp
68 #endif // HPP_MANIPULATION_PROBLEM_TARGET_STATE_HH
boost::shared_ptr< State > StatePtr_t
Definition: fwd.hh:143
boost::shared_ptr< State > StatePtr_t
Definition: fwd.hh:36
const Problem & problem() const
static GradientBasedPtr_t create(const Problem &problem)
boost::shared_ptr< PathVector > PathVectorPtr_t
boost::shared_ptr< Roadmap > RoadmapPtr_t
void target(const graph::StatePtr_t &state)
Definition: state.hh:50
State(const core::ProblemPtr_t &problem)
Constructor.
Definition: state.hh:57
boost::shared_ptr< Problem > ProblemPtr_t