hpp-pinocchio 6.0.0
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
Loading...
Searching...
No Matches
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
7// Redistribution and use in source and binary forms, with or without
8// modification, are permitted provided that the following conditions are
9// met:
10//
11// 1. Redistributions of source code must retain the above copyright
12// notice, this list of conditions and the following disclaimer.
13//
14// 2. Redistributions in binary form must reproduce the above copyright
15// notice, this list of conditions and the following disclaimer in the
16// documentation and/or other materials provided with the distribution.
17//
18// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
29// DAMAGE.
30
31#ifndef HPP_PINOCCHIO_EXTRA_CONFIG_SPACE_HH
32#define HPP_PINOCCHIO_EXTRA_CONFIG_SPACE_HH
33
34#include <hpp/pinocchio/fwd.hh>
35
36namespace hpp {
37namespace pinocchio {
46 public:
47 ExtraConfigSpace() : dimension_(0), lowerBounds_(), upperBounds_() {
48 lowerBounds_.resize(0);
49 upperBounds_.resize(0);
50 }
51 value_type& lower(const size_type& index) { return lowerBounds_[index]; }
52 value_type& upper(const size_type& index) { return upperBounds_[index]; }
53 const value_type& lower(const size_type& index) const {
54 return lowerBounds_[index];
55 }
56 const value_type& upper(const size_type& index) const {
57 return upperBounds_[index];
58 }
59 const vector_t& lower() const { return lowerBounds_; }
60 const vector_t& upper() const { return upperBounds_; }
62 size_type dimension() const { return dimension_; }
63
64 private:
68 void setDimension(const size_type& dimension) {
69 dimension_ = dimension;
70 lowerBounds_.resize(dimension);
71 upperBounds_.resize(dimension);
72 lowerBounds_.setConstant(-std::numeric_limits<value_type>::infinity());
73 upperBounds_.setConstant(+std::numeric_limits<value_type>::infinity());
74 }
75 size_type dimension_;
76 vector_t lowerBounds_;
77 vector_t upperBounds_;
78 friend class Device;
79}; // class ExtraConfigSpace
80} // namespace pinocchio
81} // namespace hpp
82
83#endif // HPP_PINOCCHIO_EXTRA_CONFIG_SPACE_HH
Robot with geometric and dynamic pinocchio.
Definition device.hh:60
Definition extra-config-space.hh:45
value_type & upper(const size_type &index)
Definition extra-config-space.hh:52
const value_type & lower(const size_type &index) const
Definition extra-config-space.hh:53
value_type & lower(const size_type &index)
Definition extra-config-space.hh:51
const vector_t & lower() const
Definition extra-config-space.hh:59
ExtraConfigSpace()
Definition extra-config-space.hh:47
const vector_t & upper() const
Definition extra-config-space.hh:60
const value_type & upper(const size_type &index) const
Definition extra-config-space.hh:56
size_type dimension() const
Get dimension.
Definition extra-config-space.hh:62
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > vector_t
Definition fwd.hh:88
matrix_t::Index size_type
Definition fwd.hh:97
double value_type
Definition fwd.hh:51
Utility functions.
Definition body.hh:39
Definition collision-object.hh:40