task-actuation-bounds.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2017 CNRS
3 //
4 // This file is part of tsid
5 // tsid is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 // tsid is distributed in the hope that it will be
10 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // General Lesser Public License for more details. You should have
13 // received a copy of the GNU Lesser General Public License along with
14 // tsid If not, see
15 // <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef __invdyn_task_actuation_bounds_hpp__
19 #define __invdyn_task_actuation_bounds_hpp__
20 
24 
25 namespace tsid
26 {
27  namespace tasks
28  {
29 
31  {
32  public:
33  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
34 
35  typedef math::Index Index;
41 
42  TaskActuationBounds(const std::string & name,
43  RobotWrapper & robot);
44 
45  int dim() const;
46 
47  const ConstraintBase & compute(const double t,
50  Data & data);
51 
52  const ConstraintBase & getConstraint() const;
53 
54  void setBounds(ConstRefVector lower, ConstRefVector upper);
55  const Vector & getLowerBounds() const;
56  const Vector & getUpperBounds() const;
57 
58  const Vector & mask() const;
59  void mask(const Vector & mask);
60 
61  protected:
62  Vector m_mask;
63  VectorXi m_activeAxes;
64  ConstraintInequality m_constraint;
65  };
66 
67  }
68 }
69 
70 #endif // ifndef __invdyn_task_actuation_bounds_hpp__
std::size_t Index
Definition: fwd.hpp:55
Vector m_mask
Definition: task-actuation-bounds.hpp:62
const Vector & getUpperBounds() const
Definition: task-actuation-bounds.cpp:70
math::ConstraintInequality ConstraintInequality
Definition: task-actuation-bounds.hpp:39
const std::string & name() const
Definition: task-base.cpp:30
const Vector & mask() const
Definition: task-actuation-bounds.cpp:38
const ConstraintBase & getConstraint() const
Definition: task-actuation-bounds.cpp:80
VectorXi m_activeAxes
Definition: task-actuation-bounds.hpp:63
TaskActuationBounds(const std::string &name, RobotWrapper &robot)
Definition: task-actuation-bounds.cpp:29
ConstraintInequality m_constraint
Definition: task-actuation-bounds.hpp:64
math::VectorXi VectorXi
Definition: task-actuation-bounds.hpp:38
Definition: trajectory-base.hpp:35
Definition: task-actuation.hpp:27
int dim() const
Return the dimension of the task. should be overloaded in the child class.
Definition: task-actuation-bounds.cpp:63
void setBounds(ConstRefVector lower, ConstRefVector upper)
Definition: task-actuation-bounds.cpp:72
math::ConstRefVector ConstRefVector
Definition: task-base.hpp:42
const ConstraintBase & compute(const double t, ConstRefVector q, ConstRefVector v, Data &data)
Definition: task-actuation-bounds.cpp:85
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hpp:37
trajectories::TrajectorySample TrajectorySample
Definition: task-actuation-bounds.hpp:36
const Vector & getLowerBounds() const
Definition: task-actuation-bounds.cpp:68
Wrapper for a robot based on pinocchio.
Definition: robot-wrapper.hpp:40
Definition: constraint-inequality.hpp:28
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Index Index
Definition: task-actuation-bounds.hpp:35
math::Vector Vector
Definition: task-actuation-bounds.hpp:37
Definition: constraint-bound.hpp:26
Eigen::VectorXi VectorXi
Definition: fwd.hpp:39
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition: constraint-base.hpp:36
Definition: task-actuation-bounds.hpp:30
pinocchio::Data Data
Definition: inverse-dynamics-formulation-acc-force.cpp:29
pinocchio::Data Data
Definition: task-actuation-bounds.hpp:40