hpp-pinocchio  4.9.1
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
extra-config-space.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2013, 2014 CNRS
3 // Author: Florent Lamiraux
4 //
5 //
6 // This file is part of hpp-pinocchio
7 // hpp-pinocchio 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-pinocchio 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-pinocchio If not, see
18 // <http://www.gnu.org/licenses/>.
19 
20 #ifndef HPP_PINOCCHIO_EXTRA_CONFIG_SPACE_HH
21 #define HPP_PINOCCHIO_EXTRA_CONFIG_SPACE_HH
22 
23 # include <hpp/pinocchio/fwd.hh>
24 
25 namespace hpp {
26  namespace pinocchio {
35  {
36  public:
37  ExtraConfigSpace () : dimension_ (0), lowerBounds_ (), upperBounds_ ()
38  {
39  lowerBounds_.resize (0);
40  upperBounds_.resize (0);
41  }
42  value_type& lower (const size_type& index)
43  {
44  return lowerBounds_ [index];
45  }
46  value_type& upper (const size_type& index)
47  {
48  return upperBounds_ [index];
49  }
50  const value_type& lower (const size_type& index) const
51  {
52  return lowerBounds_ [index];
53  }
54  const value_type& upper (const size_type& index) const
55  {
56  return upperBounds_ [index];
57  }
58  const vector_t& lower () const
59  {
60  return lowerBounds_;
61  }
62  const vector_t& upper () const
63  {
64  return upperBounds_;
65  }
68  {
69  return dimension_;
70  }
71  private:
75  void setDimension (const size_type& dimension)
76  {
77  dimension_ = dimension;
78  lowerBounds_.resize (dimension);
79  upperBounds_.resize (dimension);
80  lowerBounds_.setConstant (-std::numeric_limits<value_type>::infinity());
81  upperBounds_.setConstant (+std::numeric_limits<value_type>::infinity());
82  }
83  size_type dimension_;
84  vector_t lowerBounds_;
85  vector_t upperBounds_;
86  friend class Device;
87  }; // class ExtraConfigSpace
88  } // namespace pinocchio
89 } // namespace hpp
90 
91 #endif // HPP_PINOCCHIO_EXTRA_CONFIG_SPACE_HH
Definition: extra-config-space.hh:34
const vector_t & lower() const
Definition: extra-config-space.hh:58
Utility functions.
ExtraConfigSpace()
Definition: extra-config-space.hh:37
const value_type & upper(const size_type &index) const
Definition: extra-config-space.hh:54
value_type & lower(const size_type &index)
Definition: extra-config-space.hh:42
matrix_t::Index size_type
Definition: fwd.hh:84
size_type dimension() const
Get dimension.
Definition: extra-config-space.hh:67
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > vector_t
Definition: fwd.hh:75
Robot with geometric and dynamic pinocchio.
Definition: device.hh:51
value_type & upper(const size_type &index)
Definition: extra-config-space.hh:46
double value_type
Definition: fwd.hh:40
const vector_t & upper() const
Definition: extra-config-space.hh:62
const value_type & lower(const size_type &index) const
Definition: extra-config-space.hh:50