hpp-constraints: include/hpp/constraints/explicit/convex-shape-contact.hh Source File

hpp-constraints 9.0.2 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
32#include <hpp/constraints/explicit.hh>
33#include <tuple>
34
35 namespace hpp {
36 namespace constraints {
37 namespace explicit_ {
38 class HPP_CONSTRAINTS_DLLAPI ConvexShapeContact : public 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);
70 static Constraints_t createConstraintAndComplement(
71 const std::string& name, DevicePtr_t robot,
72 const JointAndShapes_t& floorSurfaces,
73 const JointAndShapes_t& objectSurfaces, const value_type& margin);
74
76 static ConvexShapeContactPtr_t createCopy(
77 const ConvexShapeContactPtr_t& other);
85 virtual void outputValue(LiegroupElementRef result, vectorIn_t qin,
86 LiegroupElementConstRef rhs) const;
87
98 virtual void jacobianOutputValue(vectorIn_t qin,
99 LiegroupElementConstRef f_value,
100 LiegroupElementConstRef rhs,
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
hpp::constraints::Explicit
Definition explicit.hh:143
hpp::constraints::explicit_::ConvexShapeContact
Definition convex-shape-contact.hh:38
hpp::constraints::explicit_::ConvexShapeContact::createConstraintAndComplement
static Constraints_t createConstraintAndComplement(const std::string &name, DevicePtr_t robot, const JointAndShapes_t &floorSurfaces, const JointAndShapes_t &objectSurfaces, const value_type &margin)
hpp::constraints::explicit_::ConvexShapeContact::copy
virtual ImplicitPtr_t copy() const
Copy object and return shared pointer to copy.
hpp::constraints::explicit_::ConvexShapeContact::ConvexShapeContact
ConvexShapeContact(const std::string &name, DevicePtr_t robot, const JointAndShapes_t &floorSurfaces, const JointAndShapes_t &objectSurfaces, const value_type &margin)
hpp::constraints::explicit_::ConvexShapeContact::outputValue
virtual void outputValue(LiegroupElementRef result, vectorIn_t qin, LiegroupElementConstRef rhs) const
hpp::constraints::explicit_::ConvexShapeContact::createCopy
static ConvexShapeContactPtr_t createCopy(const ConvexShapeContactPtr_t &other)
Create copy and return shared pointer.
hpp::constraints::explicit_::ConvexShapeContact::create
static ConvexShapeContactPtr_t create(const std::string &name, DevicePtr_t robot, const JointAndShapes_t &floorSurfaces, const JointAndShapes_t &objectSurfaces, const value_type &margin)
hpp::constraints::explicit_::ConvexShapeContact::Constraints_t
std::tuple< ImplicitPtr_t, ImplicitPtr_t, ExplicitPtr_t > Constraints_t
Definition convex-shape-contact.hh:40
hpp::constraints::explicit_::ConvexShapeContact::init
void init(ConvexShapeContactWkPtr_t weak)
Store weak pointer to itself.
hpp::constraints::explicit_::ConvexShapeContact::jacobianOutputValue
virtual void jacobianOutputValue(vectorIn_t qin, LiegroupElementConstRef f_value, LiegroupElementConstRef rhs, matrixOut_t jacobian) const
hpp::pinocchio::LiegroupElementBase
hpp::pinocchio::LiegroupElementConstBase
HPP_CONSTRAINTS_DLLAPI
#define HPP_CONSTRAINTS_DLLAPI
Definition config.hh:88
explicit.hh
hpp::constraints::explicit_::ConvexShapeContactPtr_t
shared_ptr< ConvexShapeContact > ConvexShapeContactPtr_t
Definition fwd.hh:205
hpp::constraints::JointAndShapes_t
std::vector< JointAndShape_t > JointAndShapes_t
Definition fwd.hh:128
hpp::constraints::DevicePtr_t
pinocchio::DevicePtr_t DevicePtr_t
Definition fwd.hh:111
hpp::constraints::ImplicitPtr_t
shared_ptr< Implicit > ImplicitPtr_t
Definition fwd.hh:175
hpp::constraints::value_type
pinocchio::value_type value_type
Definition fwd.hh:49
hpp::constraints::vectorIn_t
pinocchio::vectorIn_t vectorIn_t
Definition fwd.hh:61
hpp::constraints::matrixOut_t
Eigen::Ref< matrix_t > matrixOut_t
Definition fwd.hh:59
hpp