tasks/task-joint-posVelAcc-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_posVelAcc_bounds_hpp__
19 #define __invdyn_task_joint_posVelAcc_bounds_hpp__
20 
24 #include <tsid/deprecated.hh>
25 
33 namespace tsid {
34 namespace tasks {
35 
37  public:
38  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
39 
45 
46  TaskJointPosVelAccBounds(const std::string& name, RobotWrapper& robot,
47  double dt, bool verbose = true);
48 
49  int dim() const override;
50 
52  Data& data) override;
53 
54  const ConstraintBase& getConstraint() const override;
55 
56  void setTimeStep(double dt);
60  const Vector& getAccelerationBounds() const;
61  const Vector& getVelocityBounds() const;
62  const Vector& getPositionLowerBounds() const;
63  const Vector& getPositionUpperBounds() const;
64 
65  void setVerbose(bool verbose);
66 
67  void setImposeBounds(bool impose_position_bounds, bool impose_velocity_bounds,
68  bool impose_viability_bounds,
69  bool impose_acceleration_bounds);
70 
75  void isStateViable(ConstRefVector q, ConstRefVector dq, bool verbose = true);
76 
81  bool verbose = true);
82 
94  bool verbose = true);
95 
103  bool verbose = true);
104 
105  TSID_DEPRECATED const Vector& mask() const; // deprecated
106  TSID_DEPRECATED void mask(const Vector& mask); // deprecated
107  virtual void setMask(math::ConstRefVector mask) override;
108 
109  protected:
111  double m_dt;
112  bool m_verbose;
113  int m_nv, m_na;
114 
117 
118  Vector m_qa; // actuated part of q
119  Vector m_dqa; // actuated part of dq
120 
121  double m_eps; // tolerance used to check violations
122 
123  Vector m_qMin; // joints position limits
124  Vector m_qMax; // joints position limits
125  Vector m_dqMax; // joints max velocity limits
126  Vector m_ddqMax; // joints max acceleration limits
127 
128  Vector m_dqMinViab; // velocity lower limits from viability
129  Vector m_dqMaxViab; // velocity upper limits from viability
130 
131  Vector m_ddqLBPos; // acceleration lower bound from position bounds
132  Vector m_ddqUBPos; // acceleration upper bound from position bounds
133  Vector m_ddqLBVia; // acceleration lower bound from viability bounds
134  Vector m_ddqUBVia; // acceleration upper bound from viability bounds
135  Vector m_ddqLBVel; // acceleration lower bound from velocity bounds
136  Vector m_ddqUBVel; // acceleration upper bound from velocity bounds
137  Vector m_ddqLBAcc; // acceleration lower bound from acceleration bounds
138  Vector m_ddqUBAcc; // acceleration upper bound from acceleration bounds
139 
140  Vector m_ddqLB; // final acceleration bounds
141  Vector m_ddqUB; // final acceleration bounds
142 
147 
148  Vector m_viabViol; // 0 if the state is viable, error otherwise
149 
150  // Used in computeAccLimitsFromPosLimits
151  double m_two_dt_sq;
157 
158  // Used in computeAccLimitsFromViability
159  double m_dt_square;
166  double m_two_a;
175 
176  // Used in computeAccLimits
179 };
180 
181 } // namespace tasks
182 } // namespace tsid
183 
184 #endif // ifndef __invdyn_task_joint_bounds_hpp__
tsid::tasks::TaskJointPosVelAccBounds::m_ddqUB
Vector m_ddqUB
Definition: tasks/task-joint-posVelAcc-bounds.hpp:141
demo_quadruped.v
v
Definition: demo_quadruped.py:80
tsid::tasks::TaskJointPosVelAccBounds::setTimeStep
void setTimeStep(double dt)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:156
tsid::tasks::TaskJointPosVelAccBounds::m_ddqUBAcc
Vector m_ddqUBAcc
Definition: tasks/task-joint-posVelAcc-bounds.hpp:138
tsid::tasks::TaskJointPosVelAccBounds::m_ddqMax_q2
Vector m_ddqMax_q2
Definition: tasks/task-joint-posVelAcc-bounds.hpp:154
tsid::tasks::TaskJointPosVelAccBounds::getConstraint
const ConstraintBase & getConstraint() const override
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:197
pinocchio::DataTpl
tsid::tasks::TaskJointPosVelAccBounds::m_dqMinViab
Vector m_dqMinViab
Definition: tasks/task-joint-posVelAcc-bounds.hpp:128
tsid::tasks::TaskJointPosVelAccBounds::dim
int dim() const override
Return the dimension of the task. \info should be overloaded in the child class.
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:138
tsid::tasks::TaskJointPosVelAccBounds::computeAccLimitsFromPosLimits
void computeAccLimitsFromPosLimits(ConstRefVector q, ConstRefVector dq, bool verbose=true)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:279
tsid::tasks::TaskJointPosVelAccBounds::m_impose_velocity_bounds
bool m_impose_velocity_bounds
Definition: tasks/task-joint-posVelAcc-bounds.hpp:144
task-motion.hpp
tsid::tasks::TaskJointPosVelAccBounds::m_mask
Vector m_mask
Definition: tasks/task-joint-posVelAcc-bounds.hpp:115
tsid::tasks::TaskJointPosVelAccBounds::m_ddqLB
Vector m_ddqLB
Definition: tasks/task-joint-posVelAcc-bounds.hpp:140
tsid::math::ConstraintBase
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition: constraint-base.hpp:35
tsid::tasks::TaskJointPosVelAccBounds::m_ddq_2
Vector m_ddq_2
Definition: tasks/task-joint-posVelAcc-bounds.hpp:170
tsid::tasks::TaskJointPosVelAccBounds::TaskJointPosVelAccBounds
TaskJointPosVelAccBounds(const std::string &name, RobotWrapper &robot, double dt, bool verbose=true)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:35
tsid::tasks::TaskJointPosVelAccBounds::m_ddqMax
Vector m_ddqMax
Definition: tasks/task-joint-posVelAcc-bounds.hpp:126
tsid::tasks::TaskJointPosVelAccBounds::m_ddqLBPos
Vector m_ddqLBPos
Definition: tasks/task-joint-posVelAcc-bounds.hpp:131
tsid::math::ConstraintBound
Definition: math/constraint-bound.hpp:26
tsid::tasks::TaskJointPosVelAccBounds::m_b_1
Vector m_b_1
Definition: tasks/task-joint-posVelAcc-bounds.hpp:167
tsid::tasks::TaskJointPosVelAccBounds::m_dt_two_dq
Vector m_dt_two_dq
Definition: tasks/task-joint-posVelAcc-bounds.hpp:161
tsid::tasks::TaskJointPosVelAccBounds::m_ub
Vector m_ub
Definition: tasks/task-joint-posVelAcc-bounds.hpp:177
setup.data
data
Definition: setup.in.py:48
demo_quadruped.robot
robot
Definition: demo_quadruped.py:51
tsid::tasks::TaskJointPosVelAccBounds::m_two_dt_sq
double m_two_dt_sq
Definition: tasks/task-joint-posVelAcc-bounds.hpp:151
tsid::tasks::TaskJointPosVelAccBounds::m_qMax
Vector m_qMax
Definition: tasks/task-joint-posVelAcc-bounds.hpp:124
tsid::tasks::TaskJointPosVelAccBounds::mask
const TSID_DEPRECATED Vector & mask() const
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:109
tsid::tasks::TaskJointPosVelAccBounds::m_impose_viability_bounds
bool m_impose_viability_bounds
Definition: tasks/task-joint-posVelAcc-bounds.hpp:145
tsid::tasks::TaskJointPosVelAccBounds::m_minus_dq_over_dt
Vector m_minus_dq_over_dt
Definition: tasks/task-joint-posVelAcc-bounds.hpp:156
tsid::tasks::TaskJointPosVelAccBounds::m_viabViol
Vector m_viabViol
Definition: tasks/task-joint-posVelAcc-bounds.hpp:148
tsid::tasks::TaskJointPosVelAccBounds::setPositionBounds
void setPositionBounds(ConstRefVector lower, ConstRefVector upper)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:163
tsid::tasks::TaskJointPosVelAccBounds::m_dqMaxViab
Vector m_dqMaxViab
Definition: tasks/task-joint-posVelAcc-bounds.hpp:129
tsid::tasks::TaskJointPosVelAccBounds::m_dt_ddqMax_dt
Vector m_dt_ddqMax_dt
Definition: tasks/task-joint-posVelAcc-bounds.hpp:163
tsid::tasks::TaskJointPosVelAccBounds::m_activeAxes
VectorXi m_activeAxes
Definition: tasks/task-joint-posVelAcc-bounds.hpp:116
tsid::tasks::TaskJointPosVelAccBounds::setVerbose
void setVerbose(bool verbose)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:161
tsid::tasks::TaskJointPosVelAccBounds::m_ddqLBAcc
Vector m_ddqLBAcc
Definition: tasks/task-joint-posVelAcc-bounds.hpp:137
tsid::tasks::TaskJointPosVelAccBounds::m_ddqLBVel
Vector m_ddqLBVel
Definition: tasks/task-joint-posVelAcc-bounds.hpp:135
tsid::tasks::TaskJointPosVelAccBounds::setAccelerationBounds
void setAccelerationBounds(ConstRefVector upper)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:188
tsid::tasks::TaskJointPosVelAccBounds::m_c_2
Vector m_c_2
Definition: tasks/task-joint-posVelAcc-bounds.hpp:173
tsid::tasks::TaskJointPosVelAccBounds::m_ddqMin_q2
Vector m_ddqMin_q2
Definition: tasks/task-joint-posVelAcc-bounds.hpp:155
tsid::tasks::TaskJointPosVelAccBounds::getAccelerationBounds
const Vector & getAccelerationBounds() const
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:140
tsid::tasks::TaskJointPosVelAccBounds::m_dt
double m_dt
Definition: tasks/task-joint-posVelAcc-bounds.hpp:111
demo_quadruped.q
q
Definition: demo_quadruped.py:74
tsid::tasks::TaskJointPosVelAccBounds::m_two_a
double m_two_a
Definition: tasks/task-joint-posVelAcc-bounds.hpp:166
tsid::tasks::TaskJointPosVelAccBounds::computeAccLimitsFromViability
void computeAccLimitsFromViability(ConstRefVector q, ConstRefVector dq, bool verbose=true)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:323
tsid::tasks::TaskJointPosVelAccBounds::VectorXi
math::VectorXi VectorXi
Definition: tasks/task-joint-posVelAcc-bounds.hpp:43
tsid::tasks::TaskJointPosVelAccBounds::m_qa
Vector m_qa
Definition: tasks/task-joint-posVelAcc-bounds.hpp:118
tsid::tasks::TaskJointPosVelAccBounds::m_dt_dq
Vector m_dt_dq
Definition: tasks/task-joint-posVelAcc-bounds.hpp:160
tsid::math::VectorXi
Eigen::VectorXi VectorXi
Definition: math/fwd.hpp:37
tsid::tasks::TaskJointPosVelAccBounds::ConstraintBound
math::ConstraintBound ConstraintBound
Definition: tasks/task-joint-posVelAcc-bounds.hpp:41
tsid::tasks::TaskJointPosVelAccBounds::m_impose_acceleration_bounds
bool m_impose_acceleration_bounds
Definition: tasks/task-joint-posVelAcc-bounds.hpp:146
tsid::tasks::TaskJointPosVelAccBounds::m_ddqLBVia
Vector m_ddqLBVia
Definition: tasks/task-joint-posVelAcc-bounds.hpp:133
tsid::tasks::TaskJointPosVelAccBounds::m_ddqUBPos
Vector m_ddqUBPos
Definition: tasks/task-joint-posVelAcc-bounds.hpp:132
tsid::tasks::TaskJointPosVelAccBounds::m_verbose
bool m_verbose
Definition: tasks/task-joint-posVelAcc-bounds.hpp:112
tsid::tasks::TaskJointPosVelAccBounds::m_two_ddqMax
Vector m_two_ddqMax
Definition: tasks/task-joint-posVelAcc-bounds.hpp:162
tsid::tasks::TaskJointPosVelAccBounds::m_eps
double m_eps
Definition: tasks/task-joint-posVelAcc-bounds.hpp:121
demo_quadruped.dt
float dt
Definition: demo_quadruped.py:41
tsid::tasks::TaskJointPosVelAccBounds::m_c_1
Vector m_c_1
Definition: tasks/task-joint-posVelAcc-bounds.hpp:171
tsid::tasks::TaskJointPosVelAccBounds::m_impose_position_bounds
bool m_impose_position_bounds
Definition: tasks/task-joint-posVelAcc-bounds.hpp:143
tsid::tasks::TaskJointPosVelAccBounds::m_dqMax
Vector m_dqMax
Definition: tasks/task-joint-posVelAcc-bounds.hpp:125
tsid::math::ConstraintInequality
Definition: math/constraint-inequality.hpp:26
tsid::tasks::TaskJointPosVelAccBounds::setImposeBounds
void setImposeBounds(bool impose_position_bounds, bool impose_velocity_bounds, bool impose_viability_bounds, bool impose_acceleration_bounds)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:216
tsid::tasks::TaskJointPosVelAccBounds::m_na
int m_na
Definition: tasks/task-joint-posVelAcc-bounds.hpp:113
tsid::tasks::TaskJointPosVelAccBounds::m_ddqMax_q3
Vector m_ddqMax_q3
Definition: tasks/task-joint-posVelAcc-bounds.hpp:152
tsid::tasks::TaskJointPosVelAccBounds
Definition: tasks/task-joint-posVelAcc-bounds.hpp:36
tsid::tasks::TaskMotion
Definition: task-motion.hpp:26
tsid::math::ConstRefVector
const typedef Eigen::Ref< const Vector > ConstRefVector
Definition: math/fwd.hpp:48
tsid::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: math/fwd.hpp:35
tsid::tasks::TaskJointPosVelAccBounds::m_delta_2
Vector m_delta_2
Definition: tasks/task-joint-posVelAcc-bounds.hpp:174
constraint-inequality.hpp
tsid::tasks::TaskJointPosVelAccBounds::m_ddqUBVia
Vector m_ddqUBVia
Definition: tasks/task-joint-posVelAcc-bounds.hpp:134
tsid::tasks::TaskJointPosVelAccBounds::m_ddqUBVel
Vector m_ddqUBVel
Definition: tasks/task-joint-posVelAcc-bounds.hpp:136
tsid::tasks::TaskJointPosVelAccBounds::m_q_plus_dt_dq
Vector m_q_plus_dt_dq
Definition: tasks/task-joint-posVelAcc-bounds.hpp:165
tsid::tasks::TaskJointPosVelAccBounds::m_nv
int m_nv
Definition: tasks/task-joint-posVelAcc-bounds.hpp:113
tsid
Definition: bindings/python/constraint/constraint-bound.cpp:21
tsid::tasks::TaskJointPosVelAccBounds::m_delta_1
Vector m_delta_1
Definition: tasks/task-joint-posVelAcc-bounds.hpp:172
tsid::tasks::TaskJointPosVelAccBounds::m_dqa
Vector m_dqa
Definition: tasks/task-joint-posVelAcc-bounds.hpp:119
tsid::robots::RobotWrapper
Wrapper for a robot based on pinocchio.
Definition: robots/robot-wrapper.hpp:37
tsid::tasks::TaskJointPosVelAccBounds::Data
pinocchio::Data Data
Definition: tasks/task-joint-posVelAcc-bounds.hpp:44
constraint-bound.hpp
tsid::tasks::TaskJointPosVelAccBounds::getPositionUpperBounds
const Vector & getPositionUpperBounds() const
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:152
tsid::tasks::TaskBase::name
const std::string & name() const
Definition: task-base.cpp:25
tsid::tasks::TaskJointPosVelAccBounds::setMask
virtual void setMask(math::ConstRefVector mask) override
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:117
tsid::tasks::TaskJointPosVelAccBounds::computeAccLimits
void computeAccLimits(ConstRefVector q, ConstRefVector dq, bool verbose=true)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:369
tsid::tasks::TaskJointPosVelAccBounds::setVelocityBounds
void setVelocityBounds(ConstRefVector upper)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:179
tsid::tasks::TaskJointPosVelAccBounds::m_qMin
Vector m_qMin
Definition: tasks/task-joint-posVelAcc-bounds.hpp:123
tsid::tasks::TaskJointPosVelAccBounds::m_lb
Vector m_lb
Definition: tasks/task-joint-posVelAcc-bounds.hpp:178
t
Transform3f t
tsid::tasks::TaskJointPosVelAccBounds::isStateViable
void isStateViable(ConstRefVector q, ConstRefVector dq, bool verbose=true)
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:225
tsid::tasks::TaskJointPosVelAccBounds::m_dq_square
Vector m_dq_square
Definition: tasks/task-joint-posVelAcc-bounds.hpp:164
tsid::tasks::TaskJointPosVelAccBounds::compute
const ConstraintBase & compute(double t, ConstRefVector q, ConstRefVector v, Data &data) override
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:201
tsid::tasks::TaskJointPosVelAccBounds::getPositionLowerBounds
const Vector & getPositionLowerBounds() const
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:148
tsid::tasks::TaskJointPosVelAccBounds::m_b_2
Vector m_b_2
Definition: tasks/task-joint-posVelAcc-bounds.hpp:168
tsid::tasks::TaskJointPosVelAccBounds::Vector
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Vector Vector
Definition: tasks/task-joint-posVelAcc-bounds.hpp:40
tsid::tasks::TaskJointPosVelAccBounds::m_constraint
ConstraintInequality m_constraint
Definition: tasks/task-joint-posVelAcc-bounds.hpp:110
tsid::tasks::TaskJointPosVelAccBounds::m_ddqMin_q3
Vector m_ddqMin_q3
Definition: tasks/task-joint-posVelAcc-bounds.hpp:153
tsid::tasks::TaskJointPosVelAccBounds::ConstraintInequality
math::ConstraintInequality ConstraintInequality
Definition: tasks/task-joint-posVelAcc-bounds.hpp:42
tsid::tasks::TaskJointPosVelAccBounds::m_dt_square
double m_dt_square
Definition: tasks/task-joint-posVelAcc-bounds.hpp:159
tsid::tasks::TaskBase::ConstRefVector
math::ConstRefVector ConstRefVector
Definition: task-base.hpp:39
tsid::tasks::TaskJointPosVelAccBounds::m_ddq_1
Vector m_ddq_1
Definition: tasks/task-joint-posVelAcc-bounds.hpp:169
tsid::tasks::TaskJointPosVelAccBounds::getVelocityBounds
const Vector & getVelocityBounds() const
Definition: src/tasks/task-joint-posVelAcc-bounds.cpp:144


tsid
Author(s): Andrea Del Prete, Justin Carpentier
autogenerated on Sat May 3 2025 02:48:17