hpp-constraints 6.0.0
Definition of basic geometric constraints for motion planning
Loading...
Searching...
No Matches
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
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are
7// met:
8//
9// 1. Redistributions of source code must retain the above copyright
10// notice, this list of conditions and the following disclaimer.
11//
12// 2. Redistributions in binary form must reproduce the above copyright
13// notice, this list of conditions and the following disclaimer in the
14// documentation and/or other materials provided with the distribution.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
27// DAMAGE.
28
29#ifndef HPP_CONSTRAINTS_EXPLICIT_CONVEX_SHAPE_CONTACT_HH
30#define HPP_CONSTRAINTS_EXPLICIT_CONVEX_SHAPE_CONTACT_HH
31
33#include <tuple>
34
35namespace hpp {
36namespace constraints {
37namespace explicit_ {
39 public:
40 typedef std::tuple<ImplicitPtr_t, ImplicitPtr_t, ExplicitPtr_t> Constraints_t;
42 virtual ImplicitPtr_t copy() const;
51 static ConvexShapeContactPtr_t create(const std::string& name,
52 DevicePtr_t robot,
53 const JointAndShapes_t& floorSurfaces,
54 const JointAndShapes_t& objectSurfaces,
55 const value_type& margin);
71 const std::string& name, DevicePtr_t robot,
72 const JointAndShapes_t& floorSurfaces,
73 const JointAndShapes_t& objectSurfaces, const value_type& margin);
74
77 const ConvexShapeContactPtr_t& other);
85 virtual void outputValue(LiegroupElementRef result, vectorIn_t qin,
86 LiegroupElementConstRef rhs) const;
87
101 matrixOut_t jacobian) const;
102
103 protected:
112 ConvexShapeContact(const std::string& name, DevicePtr_t robot,
113 const JointAndShapes_t& floorSurfaces,
114 const JointAndShapes_t& objectSurfaces,
115 const value_type& margin);
117 void init(ConvexShapeContactWkPtr_t weak);
118
119 private:
120 // Store a vector of explicit relative transforms corresponding to
121 // each pair (floor surface, object surface)
122 std::vector<RelativePosePtr_t> pose_;
123 // Number of object surfaces
124 std::size_t nObjSurf_;
125 // shared pointer to itself
126 ConvexShapeContactWkPtr_t weak_;
127}; // class ConvexShapeContact
128} // namespace explicit_
129} // namespace constraints
130} // namespace hpp
131#endif // HPP_CONSTRAINTS_EXPLICIT_CONVEX_SHAPE_CONTACT_HH
Definition explicit.hh:143
Definition convex-shape-contact.hh:38
static Constraints_t createConstraintAndComplement(const std::string &name, DevicePtr_t robot, const JointAndShapes_t &floorSurfaces, const JointAndShapes_t &objectSurfaces, const value_type &margin)
virtual ImplicitPtr_t copy() const
Copy object and return shared pointer to copy.
ConvexShapeContact(const std::string &name, DevicePtr_t robot, const JointAndShapes_t &floorSurfaces, const JointAndShapes_t &objectSurfaces, const value_type &margin)
virtual void outputValue(LiegroupElementRef result, vectorIn_t qin, LiegroupElementConstRef rhs) const
static ConvexShapeContactPtr_t createCopy(const ConvexShapeContactPtr_t &other)
Create copy and return shared pointer.
static ConvexShapeContactPtr_t create(const std::string &name, DevicePtr_t robot, const JointAndShapes_t &floorSurfaces, const JointAndShapes_t &objectSurfaces, const value_type &margin)
std::tuple< ImplicitPtr_t, ImplicitPtr_t, ExplicitPtr_t > Constraints_t
Definition convex-shape-contact.hh:40
void init(ConvexShapeContactWkPtr_t weak)
Store weak pointer to itself.
virtual void jacobianOutputValue(vectorIn_t qin, LiegroupElementConstRef f_value, LiegroupElementConstRef rhs, matrixOut_t jacobian) const
#define HPP_CONSTRAINTS_DLLAPI
Definition config.hh:88
shared_ptr< ConvexShapeContact > ConvexShapeContactPtr_t
Definition fwd.hh:201
std::vector< JointAndShape_t > JointAndShapes_t
Definition fwd.hh:126
pinocchio::DevicePtr_t DevicePtr_t
Definition fwd.hh:109
shared_ptr< Implicit > ImplicitPtr_t
Definition fwd.hh:173
pinocchio::value_type value_type
Definition fwd.hh:48
pinocchio::vectorIn_t vectorIn_t
Definition fwd.hh:60
Eigen::Ref< matrix_t > matrixOut_t
Definition fwd.hh:58
pinocchio::LiegroupElementConstRef LiegroupElementConstRef
Definition fwd.hh:67
pinocchio::LiegroupElementRef LiegroupElementRef
Definition fwd.hh:66
Definition active-set-differentiable-function.hh:36