hpp-constraints  4.11.0
Definition of basic geometric constraints for motion planning
relative-com.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 CNRS
3 // Authors: Florent Lamiraux
4 //
5 //
6 // This file is part of hpp-constraints.
7 // hpp-constraints is free software: you can redistribute it
8 // and/or modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation, either version
10 // 3 of the License, or (at your option) any later version.
11 //
12 // hpp-constraints is distributed in the hope that it will be
13 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Lesser Public License for more details. You should have
16 // received a copy of the GNU Lesser General Public License along with
17 // hpp-constraints. If not, see
18 // <http://www.gnu.org/licenses/>.
19 
20 #ifndef HPP_CONSTRAINTS_RELATIVE_COM_HH
21 # define HPP_CONSTRAINTS_RELATIVE_COM_HH
22 
24 # include <hpp/constraints/config.hh>
25 # include <hpp/constraints/fwd.hh>
26 
27 namespace hpp {
28  namespace constraints {
29 
32 
57  {
58  public:
59  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
61  static RelativeComPtr_t create (const DevicePtr_t& robot,
62  const JointPtr_t& joint,
63  const vector3_t reference,
64  std::vector <bool> mask = std::vector<bool>(3, true))
65  { return create ("RelativeCom", robot, joint, reference, mask); }
66  static RelativeComPtr_t create (const std::string& name,
67  const DevicePtr_t& robot,
68  const JointPtr_t& joint,
69  const vector3_t reference,
70  std::vector <bool> mask = std::vector<bool>(3, true));
71  static RelativeComPtr_t create (const DevicePtr_t& robot,
72  const CenterOfMassComputationPtr_t& comc,
73  const JointPtr_t& joint,
74  const vector3_t reference,
75  std::vector <bool> mask = std::vector<bool>(3, true));
76  static RelativeComPtr_t create (const std::string& name,
77  const DevicePtr_t& robot,
78  const CenterOfMassComputationPtr_t& comc,
79  const JointPtr_t& joint,
80  const vector3_t reference,
81  std::vector <bool> mask = std::vector<bool> (3, true));
82  virtual ~RelativeCom () {}
83  RelativeCom (const DevicePtr_t& robot,
84  const CenterOfMassComputationPtr_t& comc,
85  const JointPtr_t& joint, const vector3_t reference,
86  std::vector <bool> mask,
87  const std::string& name);
88 
89  virtual std::ostream& print (std::ostream& o) const;
90  protected:
95  virtual void impl_compute (LiegroupElementRef result,
96  ConfigurationIn_t argument)
97  const;
98  virtual void impl_jacobian (matrixOut_t jacobian,
99  ConfigurationIn_t arg) const;
100  private:
101  DevicePtr_t robot_;
103  JointPtr_t joint_;
104  vector3_t reference_;
105  std::vector <bool> mask_;
106  bool nominalCase_;
107  mutable ComJacobian_t jacobian_;
108 
109  RelativeCom() {}
110  HPP_SERIALIZABLE();
111  }; // class RelativeCom
113  } // namespace constraints
114 } // namespace hpp
115 #endif // HPP_CONSTRAINTS_RELATIVE_COM_HH
Definition: active-set-differentiable-function.hh:24
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:97
pinocchio::ComJacobian_t ComJacobian_t
Definition: fwd.hh:50
pinocchio::vector3_t vector3_t
Definition: fwd.hh:40
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:94
pinocchio::JointPtr_t JointPtr_t
Definition: fwd.hh:38
Definition: differentiable-function.hh:52
virtual ~RelativeCom()
Definition: relative-com.hh:82
Definition: relative-com.hh:56
shared_ptr< RelativeCom > RelativeComPtr_t
Definition: fwd.hh:112
#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
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW RelativeComPtr_t create(const DevicePtr_t &robot, const JointPtr_t &joint, const vector3_t reference, std::vector< bool > mask=std::vector< bool >(3, true))
Return a shared pointer to a new instance.
Definition: relative-com.hh:61
pinocchio::CenterOfMassComputationPtr_t CenterOfMassComputationPtr_t
Definition: fwd.hh:99