hpp-constraints  4.12.0
Definition of basic geometric constraints for motion planning
com-between-feet.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015 CNRS
3 // Authors: Joseph Mirabel
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_COM_BETWEEN_FEET_HH
21 # define HPP_CONSTRAINTS_COM_BETWEEN_FEET_HH
22 
24 # include <hpp/constraints/config.hh>
25 # include <hpp/constraints/fwd.hh>
26 # include <hpp/constraints/tools.hh>
28 
29 namespace hpp {
30  namespace constraints {
31 
57  {
58  public:
59  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
60 
62  static ComBetweenFeetPtr_t create (
63  const std::string& name, const DevicePtr_t& robot,
64  const JointPtr_t& jointLeft, const JointPtr_t& jointRight,
65  const vector3_t pointLeft, const vector3_t pointRight,
66  const JointPtr_t& jointReference, const vector3_t pointRef,
67  std::vector <bool> mask = { true, true, true, true });
68 
70  static ComBetweenFeetPtr_t create (
71  const std::string& name, const DevicePtr_t& robot,
72  const CenterOfMassComputationPtr_t& comc,
73  const JointPtr_t& jointLeft, const JointPtr_t& jointRight,
74  const vector3_t pointLeft, const vector3_t pointRight,
75  const JointPtr_t& jointReference, const vector3_t pointRef,
76  std::vector <bool> mask = { true, true, true, true });
77 
78  virtual ~ComBetweenFeet () {}
79 
80  ComBetweenFeet (const std::string& name, const DevicePtr_t& robot,
81  const CenterOfMassComputationPtr_t& comc,
82  const JointPtr_t& jointLeft, const JointPtr_t& jointRight,
83  const vector3_t pointLeft, const vector3_t pointRight,
84  const JointPtr_t& jointReference, const vector3_t pointRef,
85  std::vector <bool> mask);
86 
87  protected:
92  virtual void impl_compute (LiegroupElementRef result,
93  ConfigurationIn_t argument) const;
94 
95  virtual void impl_jacobian (matrixOut_t jacobian,
96  ConfigurationIn_t arg) const;
97  private:
98  DevicePtr_t robot_;
99  mutable Traits<PointCom>::Ptr_t com_;
100  Traits<PointInJoint>::Ptr_t left_, right_;
101  eigen::vector3_t pointRef_;
102  JointPtr_t jointRef_;
106  typedef CrossProduct < Difference < PointCom,
108  DiffPiJPiJ > ECrossU_t;
109  mutable Traits<DiffPCPiJ>::Ptr_t xmxl_, xmxr_;
110  mutable Traits<DiffPiJPiJ>::Ptr_t u_;
111  mutable Traits<ECrossU_t>::Ptr_t ecrossu_;
112  mutable Traits<RotationMultiply <ECrossU_t> >::Ptr_t expr_;
113  mutable Traits<ScalarProduct<DiffPCPiJ,DiffPiJPiJ> >::Ptr_t xmxlDotu_, xmxrDotu_;
114  std::vector <bool> mask_;
115  mutable eigen::matrix3_t cross_;
116  }; // class ComBetweenFeet
117  } // namespace constraints
118 } // namespace hpp
119 #endif // HPP_CONSTRAINTS_COM_BETWEEN_FEET_HH
Difference of two expressions.
Definition: symbolic-calculus.hh:97
Eigen::Matrix< value_type, 3, 3 > matrix3_t
Definition: fwd.hh:60
Multiplication of an expression by a scalar.
Definition: symbolic-calculus.hh:99
Definition: active-set-differentiable-function.hh:24
Basic expression representing a COM.
Definition: symbolic-calculus.hh:825
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:97
shared_ptr< ComBetweenFeet > ComBetweenFeetPtr_t
Definition: fwd.hh:113
Definition: symbolic-calculus.hh:92
Definition: com-between-feet.hh:56
virtual ~ComBetweenFeet()
Definition: com-between-feet.hh:78
pinocchio::vector3_t vector3_t
Definition: fwd.hh:40
Eigen::Matrix< value_type, 3, 1 > vector3_t
Definition: fwd.hh:61
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:94
Sum of two expressions.
Definition: symbolic-calculus.hh:98
pinocchio::JointPtr_t JointPtr_t
Definition: fwd.hh:38
Definition: differentiable-function.hh:52
Cross product of two expressions.
Definition: symbolic-calculus.hh:95
#define HPP_CONSTRAINTS_DLLAPI
Definition: config.hh:64
HPP_CONSTRAINTS_CB_REF< Class > Ptr_t
Definition: symbolic-calculus.hh:107
pinocchio::LiegroupElementRef LiegroupElementRef
Definition: fwd.hh:54
Eigen::Ref< matrix_t > matrixOut_t
Definition: fwd.hh:46
pinocchio::CenterOfMassComputationPtr_t CenterOfMassComputationPtr_t
Definition: fwd.hh:99