hpp-constraints  4.9.1
Definition of basic geometric constraints for motion planning
relative-pose.hh
Go to the documentation of this file.
1 // Copyright (c) 2018, LAAS-CNRS
2 // Authors: Florent Lamiraux
3 //
4 // This file is part of hpp-constraints.
5 // hpp-constraints 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-constraints 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-constraints. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef HPP_CONSTRAINTS_EXPLICIT_RELATIVE_POSE_HH
18 # define HPP_CONSTRAINTS_EXPLICIT_RELATIVE_POSE_HH
19 
22 # include <pinocchio/spatial/se3.hpp>
23 
24 namespace hpp {
25  namespace constraints {
26  namespace explicit_ {
28  class HPP_CONSTRAINTS_DLLAPI RelativePose :
29  public Explicit, public implicit::RelativePose
30  {
31  public:
33  virtual ImplicitPtr_t copy () const;
49  (const std::string& name, const DevicePtr_t& robot,
50  const JointConstPtr_t& joint1, const JointConstPtr_t& joint2,
51  const Transform3f& frame1, const Transform3f& frame2,
52  std::vector <bool> mask = std::vector<bool>(6,true),
53  ComparisonTypes_t comp = std::vector <ComparisonType> (),
54  vectorIn_t rhs = vector_t ());
55 
56  static RelativePosePtr_t createCopy (const RelativePosePtr_t& other);
57 
78  virtual void implicitToExplicitRhs (vectorIn_t implicitRhs,
79  vectorOut_t explicitRhs) const;
100  virtual void explicitToImplicitRhs (vectorIn_t explicitRhs,
101  vectorOut_t implicitRhs) const;
102  protected:
117  RelativePose (const std::string& name, const DevicePtr_t& robot,
118  const JointConstPtr_t& joint1,
119  const JointConstPtr_t& joint2,
120  const Transform3f& frame1, const Transform3f& frame2,
121  std::vector <bool> mask = std::vector<bool>(6,true),
122  ComparisonTypes_t comp = std::vector <ComparisonType> (),
123  vectorIn_t rhs = vector_t ());
124 
126  RelativePose (const RelativePose& other);
127 
129  void init (RelativePoseWkPtr_t weak);
130  private:
131  // Create LiegroupSpace instances to avoid useless allocation.
132  static LiegroupSpacePtr_t SE3;
133  static LiegroupSpacePtr_t R3xSO3;
134  Transform3f frame1_;
135  Transform3f frame2_;
136  RelativePoseWkPtr_t weak_;
137  }; // class RelativePose
138  } // namespace explicit_
139  } // namespace constraints
140 } // namespace hpp
141 #endif //HPP_CONSTRAINTS_EXPLICIT_RELATIVE_POSE_HH
pinocchio::vector_t vector_t
Definition: fwd.hh:45
pinocchio::vectorIn_t vectorIn_t
Definition: fwd.hh:46
pinocchio::LiegroupSpacePtr_t LiegroupSpacePtr_t
Definition: fwd.hh:54
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:91
ObjectFactory * create(ObjectFactory *parent=NULL, const XMLElement *element=NULL)
Definition: explicit.hh:124
Constraint of relative pose between two frames on a kinematic chain.
Definition: relative-pose.hh:28
::pinocchio::SE3 SE3
std::vector< ComparisonType > ComparisonTypes_t
Definition: fwd.hh:170
pinocchio::JointConstPtr_t JointConstPtr_t
Definition: fwd.hh:38
Constraint of relative pose between two frames on a kinematic chain.
Definition: relative-pose.hh:26
pinocchio::vectorOut_t vectorOut_t
Definition: fwd.hh:47
boost::shared_ptr< Implicit > ImplicitPtr_t
Definition: fwd.hh:157
pinocchio::Transform3f Transform3f
Definition: fwd.hh:50
boost::shared_ptr< RelativePose > RelativePosePtr_t
Definition: fwd.hh:191