task-joint-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_joint_bounds_hpp__
19 #define __invdyn_task_joint_bounds_hpp__
20 
23 
24 namespace tsid
25 {
26  namespace tasks
27  {
28 
29  class TaskJointBounds : public TaskMotion
30  {
31  public:
32  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
33 
37 
38  TaskJointBounds(const std::string & name,
39  RobotWrapper & robot,
40  double dt);
41 
42  int dim() const;
43 
44  const ConstraintBase & compute(const double t,
47  Data & data);
48 
49  const ConstraintBase & getConstraint() const;
50 
51  void setTimeStep(double dt);
54  const Vector & getAccelerationLowerBounds() const;
55  const Vector & getAccelerationUpperBounds() const;
56  const Vector & getVelocityLowerBounds() const;
57  const Vector & getVelocityUpperBounds() const;
58 
59  virtual void setMask(math::ConstRefVector mask);
60 
61  protected:
62  Vector m_v_lb, m_v_ub;
63  Vector m_a_lb, m_a_ub;
65  ConstraintBound m_constraint;
66  double m_dt;
67  int m_nv, m_na;
68  };
69 
70  }
71 }
72 
73 #endif // ifndef __invdyn_task_joint_bounds_hpp__
math::ConstraintBound ConstraintBound
Definition: task-joint-bounds.hpp:35
TaskJointBounds(const std::string &name, RobotWrapper &robot, double dt)
Definition: task-joint-bounds.cpp:29
Vector m_v_ub
Definition: task-joint-bounds.hpp:62
void setVelocityBounds(ConstRefVector lower, ConstRefVector upper)
Definition: task-joint-bounds.cpp:75
const std::string & name() const
Definition: task-base.cpp:30
int m_nv
Definition: task-joint-bounds.hpp:67
Vector m_v_lb
Definition: task-joint-bounds.hpp:62
const ConstraintBase & getConstraint() const
Definition: task-joint-bounds.cpp:91
const Vector & getAccelerationUpperBounds() const
Definition: task-joint-bounds.cpp:60
void setAccelerationBounds(ConstRefVector lower, ConstRefVector upper)
Definition: task-joint-bounds.cpp:83
virtual void setMask(math::ConstRefVector mask)
Definition: task-joint-bounds.cpp:96
Definition: task-motion.hpp:28
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Vector Vector
Definition: task-joint-bounds.hpp:34
pinocchio::Data Data
Definition: task-joint-bounds.hpp:36
math::ConstRefVector ConstRefVector
Definition: task-base.hpp:42
Vector m_a_ub
Definition: task-joint-bounds.hpp:63
const Eigen::Ref< const Vector > ConstRefVector
Definition: fwd.hpp:50
Definition: task-joint-bounds.hpp:29
const ConstraintBase & compute(const double t, ConstRefVector q, ConstRefVector v, Data &data)
Definition: task-joint-bounds.cpp:101
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hpp:37
Vector m_ddq_min_due_to_vel
Definition: task-joint-bounds.hpp:64
Definition: constraint-bound.hpp:28
Wrapper for a robot based on pinocchio.
Definition: robot-wrapper.hpp:40
const Vector & getVelocityLowerBounds() const
Definition: task-joint-bounds.cpp:63
int m_na
Definition: task-joint-bounds.hpp:67
const Vector & getAccelerationLowerBounds() const
Definition: task-joint-bounds.cpp:57
Vector m_ddq_max_due_to_vel
Definition: task-joint-bounds.hpp:64
Vector m_a_lb
Definition: task-joint-bounds.hpp:63
Definition: constraint-bound.hpp:26
ConstraintBound m_constraint
Definition: task-joint-bounds.hpp:65
int dim() const
Return the dimension of the task. should be overloaded in the child class.
Definition: task-joint-bounds.cpp:54
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition: constraint-base.hpp:36
const Vector & getVelocityUpperBounds() const
Definition: task-joint-bounds.cpp:66
double m_dt
Definition: task-joint-bounds.hpp:66
pinocchio::Data Data
Definition: inverse-dynamics-formulation-acc-force.cpp:29
void setTimeStep(double dt)
Definition: task-joint-bounds.cpp:69