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