hpp-constraints: include/hpp/constraints/explicit/relative-pose.hh Source File

hpp-constraints 9.0.2 Definition of basic geometric constraints for motion planning

Loading...
Searching...
No Matches
relative-pose.hh
Go to the documentation of this file.
1// Copyright (c) 2018, LAAS-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_RELATIVE_POSE_HH
30#define HPP_CONSTRAINTS_EXPLICIT_RELATIVE_POSE_HH
31
32#include <hpp/constraints/explicit.hh>
33#include <pinocchio/spatial/se3.hpp>
34
35 namespace hpp {
36 namespace constraints {
37 namespace explicit_ {
75 class HPP_CONSTRAINTS_DLLAPI RelativePose : public Explicit {
76 public:
78 virtual ImplicitPtr_t copy() const;
95 static RelativePosePtr_t create(
96 const std::string& name, const DevicePtr_t& robot,
97 const JointConstPtr_t& joint1, const JointConstPtr_t& joint2,
98 const Transform3s& frame1, const Transform3s& frame2,
99 ComparisonTypes_t comp, std::vector<bool> mask = std::vector<bool>());
100
101 static RelativePosePtr_t createCopy(const RelativePosePtr_t& other);
102
116 virtual void outputValue(LiegroupElementRef result, vectorIn_t qin,
117 LiegroupElementConstRef rhs) const;
118
128 virtual void jacobianOutputValue(vectorIn_t qin,
129 LiegroupElementConstRef f_value,
130 LiegroupElementConstRef rhs,
131 matrixOut_t jacobian) const;
132
133 protected:
150 RelativePose(const std::string& name, const DevicePtr_t& robot,
151 const JointConstPtr_t& joint1, const JointConstPtr_t& joint2,
152 const Transform3s& frame1, const Transform3s& frame2,
153 ComparisonTypes_t comp = ComparisonTypes_t(),
154 std::vector<bool> mask = std::vector<bool>(6, true));
155
157 RelativePose(const RelativePose& other);
158
160 void init(RelativePoseWkPtr_t weak);
161
162 private:
184 void implicitToExplicitRhs(LiegroupElementConstRef implicitRhs,
185 vectorOut_t explicitRhs) const;
204 void explicitToImplicitRhs(vectorIn_t explicitRhs,
205 LiegroupElementRef implicitRhs) const;
206 // Create LiegroupSpace instances to avoid useless allocation.
207 static LiegroupSpacePtr_t SE3;
208 static LiegroupSpacePtr_t R3xSO3;
209 JointConstPtr_t joint1_, joint2_;
210 Transform3s frame1_;
211 Transform3s frame2_;
212 RelativePoseWkPtr_t weak_;
213
214 RelativePose() {}
215 HPP_SERIALIZABLE();
216}; // class RelativePose
217} // namespace explicit_
218} // namespace constraints
219} // namespace hpp
220
221BOOST_CLASS_EXPORT_KEY(hpp::constraints::explicit_::RelativePose)
222
223#endif // HPP_CONSTRAINTS_EXPLICIT_RELATIVE_POSE_HH
hpp::constraints::Explicit
Definition explicit.hh:143
hpp::constraints::explicit_::RelativePose
Definition relative-pose.hh:75
hpp::constraints::explicit_::RelativePose::copy
virtual ImplicitPtr_t copy() const
Copy object and return shared pointer to copy.
hpp::constraints::explicit_::RelativePose::jacobianOutputValue
virtual void jacobianOutputValue(vectorIn_t qin, LiegroupElementConstRef f_value, LiegroupElementConstRef rhs, matrixOut_t jacobian) const
hpp::constraints::explicit_::RelativePose::outputValue
virtual void outputValue(LiegroupElementRef result, vectorIn_t qin, LiegroupElementConstRef rhs) const
hpp::constraints::explicit_::RelativePose::createCopy
static RelativePosePtr_t createCopy(const RelativePosePtr_t &other)
hpp::constraints::explicit_::RelativePose::RelativePose
RelativePose(const RelativePose &other)
Copy constructor.
hpp::constraints::explicit_::RelativePose::create
static RelativePosePtr_t create(const std::string &name, const DevicePtr_t &robot, const JointConstPtr_t &joint1, const JointConstPtr_t &joint2, const Transform3s &frame1, const Transform3s &frame2, ComparisonTypes_t comp, std::vector< bool > mask=std::vector< bool >())
hpp::constraints::explicit_::RelativePose::RelativePose
RelativePose(const std::string &name, const DevicePtr_t &robot, const JointConstPtr_t &joint1, const JointConstPtr_t &joint2, const Transform3s &frame1, const Transform3s &frame2, ComparisonTypes_t comp=ComparisonTypes_t(), std::vector< bool > mask=std::vector< bool >(6, true))
hpp::constraints::explicit_::RelativePose::init
void init(RelativePoseWkPtr_t weak)
Store weak pointer to itself.
hpp::pinocchio::LiegroupElementBase
hpp::pinocchio::LiegroupElementConstBase
HPP_CONSTRAINTS_DLLAPI
#define HPP_CONSTRAINTS_DLLAPI
Definition config.hh:88
explicit.hh
hpp::constraints::explicit_::RelativePosePtr_t
shared_ptr< RelativePose > RelativePosePtr_t
Definition fwd.hh:199
hpp::constraints::ComparisonTypes_t
std::vector< ComparisonType > ComparisonTypes_t
Definition fwd.hh:182
hpp::constraints::Transform3s
pinocchio::Transform3s Transform3s
Definition fwd.hh:65
hpp::constraints::DevicePtr_t
pinocchio::DevicePtr_t DevicePtr_t
Definition fwd.hh:111
hpp::constraints::LiegroupSpacePtr_t
pinocchio::LiegroupSpacePtr_t LiegroupSpacePtr_t
Definition fwd.hh:70
hpp::constraints::ImplicitPtr_t
shared_ptr< Implicit > ImplicitPtr_t
Definition fwd.hh:175
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::constraints::vectorOut_t
pinocchio::vectorOut_t vectorOut_t
Definition fwd.hh:62
hpp::constraints::JointConstPtr_t
pinocchio::JointConstPtr_t JointConstPtr_t
Definition fwd.hh:51
hpp
HPP_SERIALIZABLE
#define HPP_SERIALIZABLE()