hpp-constraints  4.12.0
Definition of basic geometric constraints for motion planning
convex-shape-contact.hh
Go to the documentation of this file.
1 // Copyright (c) 2020, Airbus SAS and 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_CONVEX_SHAPE_CONTACT_HH
18 #define HPP_CONSTRAINTS_EXPLICIT_CONVEX_SHAPE_CONTACT_HH
19 
21 #include <tuple>
22 
23 namespace hpp {
24  namespace constraints {
25  namespace explicit_ {
27  {
28  public:
29  typedef std::tuple<ImplicitPtr_t, ImplicitPtr_t, ExplicitPtr_t>
32  virtual ImplicitPtr_t copy () const;
41  static ConvexShapeContactPtr_t create
42  (const std::string& name, DevicePtr_t robot,
43  const JointAndShapes_t& floorSurfaces,
44  const JointAndShapes_t& objectSurfaces,
45  const value_type& margin);
60  static Constraints_t createConstraintAndComplement
61  (const std::string& name, DevicePtr_t robot,
62  const JointAndShapes_t& floorSurfaces,
63  const JointAndShapes_t& objectSurfaces,
64  const value_type& margin);
65 
67  static ConvexShapeContactPtr_t createCopy
68  (const ConvexShapeContactPtr_t& other);
76  virtual void outputValue(LiegroupElementRef result, vectorIn_t qin,
77  LiegroupElementConstRef rhs) const;
78 
89  virtual void jacobianOutputValue
90  (vectorIn_t qin, LiegroupElementConstRef f_value,
91  LiegroupElementConstRef rhs, matrixOut_t jacobian) const;
92  protected:
102  (const std::string& name, DevicePtr_t robot,
103  const JointAndShapes_t& floorSurfaces,
104  const JointAndShapes_t& objectSurfaces,
105  const value_type& margin);
107  void init (ConvexShapeContactWkPtr_t weak);
108  private:
109  // Store a vector of explicit relative transforms corresponding to
110  // each pair (floor surface, object surface)
111  std::vector<RelativePosePtr_t> pose_;
112  // Number of floor surfaces
113  std::size_t nFloor_;
114  // shared pointer to itself
115  ConvexShapeContactWkPtr_t weak_;
116  }; // class ConvexShapeContact
117  } // namespace explicit_
118  } // namespace constraints
119 } // namespace hpp
120 #endif // HPP_CONSTRAINTS_EXPLICIT_CONVEX_SHAPE_CONTACT_HH
pinocchio::vectorIn_t vectorIn_t
Definition: fwd.hh:48
Definition: active-set-differentiable-function.hh:24
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:97
pinocchio::LiegroupElementConstRef LiegroupElementConstRef
Definition: fwd.hh:55
Definition: explicit.hh:118
shared_ptr< ConvexShapeContact > ConvexShapeContactPtr_t
Definition: fwd.hh:198
std::tuple< ImplicitPtr_t, ImplicitPtr_t, ExplicitPtr_t > Constraints_t
Definition: convex-shape-contact.hh:30
#define HPP_CONSTRAINTS_DLLAPI
Definition: config.hh:64
pinocchio::LiegroupElementRef LiegroupElementRef
Definition: fwd.hh:54
Eigen::Ref< matrix_t > matrixOut_t
Definition: fwd.hh:46
shared_ptr< Implicit > ImplicitPtr_t
Definition: fwd.hh:163
pinocchio::value_type value_type
Definition: fwd.hh:37
std::list< JointAndShape_t > JointAndShapes_t
Definition: fwd.hh:118
Definition: convex-shape-contact.hh:26