hpp-constraints  4.9.1
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 <boost/assign/list_of.hpp>
24 # include <Eigen/Core>
26 # include <hpp/constraints/config.hh>
27 # include <hpp/constraints/fwd.hh>
28 
29 namespace hpp {
30  namespace constraints {
31 
33  class HPP_CONSTRAINTS_DLLAPI ConfigurationConstraint : public DifferentiableFunction
34  {
35  public:
36  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
37 
40  const std::string& name, const DevicePtr_t& robot,
41  ConfigurationIn_t goal,
42  std::vector <bool> mask = std::vector <bool> (0));
43 
46  static ConfigurationConstraintPtr_t create (
47  const std::string& name, const DevicePtr_t& robot,
48  ConfigurationIn_t goal,
49  const vector_t& weights);
50 
52 
54  ConfigurationConstraint (const std::string& name,
55  const DevicePtr_t& robot, ConfigurationIn_t goal,
56  const vector_t& weights);
57 
58  protected:
63  virtual void impl_compute (LiegroupElementRef result,
64  ConfigurationIn_t argument) const;
65 
66  virtual void impl_jacobian (matrixOut_t jacobian,
67  ConfigurationIn_t arg) const;
68  private:
69  typedef Eigen::Array <bool, Eigen::Dynamic, 1> EigenBoolVector_t;
70  DevicePtr_t robot_;
71  LiegroupElement goal_;
72  vector_t weights_;
73  }; // class ComBetweenFeet
74  } // namespace constraints
75 } // namespace hpp
76 #endif // HPP_CONSTRAINTS_CONFIGURATION_CONSTRAINT_HH
pinocchio::vector_t vector_t
Definition: fwd.hh:45
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:91
Square distance between input configuration and reference configuration.
Definition: configuration-constraint.hh:33
ObjectFactory * create(ObjectFactory *parent=NULL, const XMLElement *element=NULL)
boost::shared_ptr< ConfigurationConstraint > ConfigurationConstraintPtr_t
Definition: fwd.hh:115
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:88
virtual ~ConfigurationConstraint()
Definition: configuration-constraint.hh:51
Definition: differentiable-function.hh:50
Eigen::Ref< matrix_t > matrixOut_t
Definition: fwd.hh:44