hpp-manipulation  4.12.0
Classes for manipulation planning.
constraint-set.hh
Go to the documentation of this file.
1 // Copyright (c) 2015 CNRS
2 // Authors: Joseph Mirabel
3 //
4 // This file is part of hpp-manipulation
5 // hpp-manipulation is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 //
10 // hpp-manipulation is distributed in the hope that it will be
11 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Lesser Public License for more details. You should have
14 // received a copy of the GNU Lesser General Public License along with
15 // hpp-manipulation If not, see
16 // <http://www.gnu.org/licenses/>.
17 
18 #ifndef HPP_MANIPULATION_CONSTRAINT_SET_HH
19 # define HPP_MANIPULATION_CONSTRAINT_SET_HH
20 
21 # include <hpp/core/constraint-set.hh>
22 
23 # include <hpp/manipulation/fwd.hh>
26 
27 namespace hpp {
28  namespace manipulation {
31 
33  class HPP_MANIPULATION_DLLAPI ConstraintSet : public core::ConstraintSet
34  {
35  public:
36  typedef core::ConstraintSet Parent_t;
37 
39  static ConstraintSetPtr_t create (const DevicePtr_t& robot,
40  const std::string& name);
41 
43  static ConstraintSetPtr_t createCopy (const ConstraintSetPtr_t& cs);
44 
46  virtual ConstraintPtr_t copy () const;
47 
48  void edge (graph::EdgePtr_t edge);
49 
50  graph::EdgePtr_t edge () const;
51 
52  protected:
54  ConstraintSet (const DevicePtr_t& robot, const std::string& name);
56  ConstraintSet (const ConstraintSet& other);
58  void init (const ConstraintSetPtr_t& self);
59 
60  virtual std::ostream& print (std::ostream& os) const;
61 
62  private:
63  graph::EdgePtr_t edge_;
64  ConstraintSetWkPtr_t weak_;
65 
66  ConstraintSet() {}
67  HPP_SERIALIZABLE();
68  }; // class ConstraintSet
69 
75  const ImplicitPtr_t& comp,
76  const ImplicitPtr_t& b) :
77  constraint (constr), complement (comp), both (b)
78  {
79  }
80  };
81  typedef std::vector <ConstraintAndComplement_t>
84  } // namespace manipulation
85 } // namespace hpp
86 
87 BOOST_CLASS_EXPORT_KEY(hpp::manipulation::ConstraintSet)
88 
89 #endif // HPP_MANIPULATION_CONSTRAINT_SET_HH
Definition: main.hh:1
a core::ConstraintSet remembering which edge created it
Definition: constraint-set.hh:33
std::vector< ConstraintAndComplement_t > ConstraintsAndComplements_t
Definition: constraint-set.hh:82
#define HPP_MANIPULATION_DLLAPI
Definition: config.hh:64
core::ConstraintPtr_t ConstraintPtr_t
Definition: fwd.hh:105
ImplicitPtr_t constraint
Definition: constraint-set.hh:71
Definition: constraint-set.hh:70
shared_ptr< ConstraintSet > ConstraintSetPtr_t
Definition: fwd.hh:115
constraints::ImplicitPtr_t ImplicitPtr_t
Definition: fwd.hh:108
ImplicitPtr_t complement
Definition: constraint-set.hh:72
ConstraintAndComplement_t(const ImplicitPtr_t &constr, const ImplicitPtr_t &comp, const ImplicitPtr_t &b)
Definition: constraint-set.hh:74
core::ConstraintSet Parent_t
Definition: constraint-set.hh:36
shared_ptr< Device > DevicePtr_t
Definition: fwd.hh:29
shared_ptr< Edge > EdgePtr_t
Definition: fwd.hh:37
ImplicitPtr_t both
Definition: constraint-set.hh:73