hpp-constraints  4.12.0
Definition of basic geometric constraints for motion planning
configuration-constraint.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_CONFIGURATION_CONSTRAINT_HH
21 # define HPP_CONSTRAINTS_CONFIGURATION_CONSTRAINT_HH
22 
23 # include <Eigen/Core>
25 # include <hpp/constraints/config.hh>
26 # include <hpp/constraints/fwd.hh>
27 
28 namespace hpp {
29  namespace constraints {
30 
33  {
34  public:
35  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
36 
38  static ConfigurationConstraintPtr_t create (
39  const std::string& name, const DevicePtr_t& robot,
40  ConfigurationIn_t goal,
41  std::vector <bool> mask = std::vector <bool> (0));
42 
45  static ConfigurationConstraintPtr_t create (
46  const std::string& name, const DevicePtr_t& robot,
47  ConfigurationIn_t goal,
48  const vector_t& weights);
49 
51 
53  ConfigurationConstraint (const std::string& name,
54  const DevicePtr_t& robot, ConfigurationIn_t goal,
55  const vector_t& weights);
56 
57  const vector_t& weights () const { return weights_; }
58 
59  void weights (const vector_t& ws);
60 
61  const LiegroupElement& goal () const { return goal_; }
62 
63  protected:
68  virtual void impl_compute (LiegroupElementRef result,
69  ConfigurationIn_t argument) const;
70 
71  virtual void impl_jacobian (matrixOut_t jacobian,
72  ConfigurationIn_t arg) const;
73 
74  std::ostream& print (std::ostream& o) const;
75  private:
76  typedef Eigen::Array <bool, Eigen::Dynamic, 1> EigenBoolVector_t;
77  DevicePtr_t robot_;
78  LiegroupElement goal_;
79  vector_t weights_;
80  }; // class ComBetweenFeet
81  } // namespace constraints
82 } // namespace hpp
83 #endif // HPP_CONSTRAINTS_CONFIGURATION_CONSTRAINT_HH
pinocchio::vector_t vector_t
Definition: fwd.hh:47
shared_ptr< ConfigurationConstraint > ConfigurationConstraintPtr_t
Definition: fwd.hh:128
Definition: active-set-differentiable-function.hh:24
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:97
pinocchio::LiegroupElement LiegroupElement
Definition: fwd.hh:53
Square distance between input configuration and reference configuration.
Definition: configuration-constraint.hh:32
const vector_t & weights() const
Definition: configuration-constraint.hh:57
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:94
virtual ~ConfigurationConstraint()
Definition: configuration-constraint.hh:50
Definition: differentiable-function.hh:52
const LiegroupElement & goal() const
Definition: configuration-constraint.hh:61
#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