| Line | Branch | Exec | Source | 
    
      | 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 |  |  |  | 
    
      | 21 |  |  | #include <tsid/tasks/task-motion.hpp> | 
    
      | 22 |  |  | #include <tsid/math/constraint-bound.hpp> | 
    
      | 23 |  |  |  | 
    
      | 24 |  |  | namespace tsid { | 
    
      | 25 |  |  | namespace tasks { | 
    
      | 26 |  |  |  | 
    
      | 27 |  |  | class TaskJointBounds : public TaskMotion { | 
    
      | 28 |  |  | public: | 
    
      | 29 |  |  | EIGEN_MAKE_ALIGNED_OPERATOR_NEW | 
    
      | 30 |  |  |  | 
    
      | 31 |  |  | typedef math::Vector Vector; | 
    
      | 32 |  |  | typedef math::ConstraintBound ConstraintBound; | 
    
      | 33 |  |  | typedef pinocchio::Data Data; | 
    
      | 34 |  |  |  | 
    
      | 35 |  |  | TaskJointBounds(const std::string& name, RobotWrapper& robot, double dt); | 
    
      | 36 |  |  |  | 
    
      | 37 |  | 2 | virtual ~TaskJointBounds() {} | 
    
      | 38 |  |  |  | 
    
      | 39 |  |  | int dim() const; | 
    
      | 40 |  |  |  | 
    
      | 41 |  |  | const ConstraintBase& compute(const double t, ConstRefVector q, | 
    
      | 42 |  |  | ConstRefVector v, Data& data); | 
    
      | 43 |  |  |  | 
    
      | 44 |  |  | const ConstraintBase& getConstraint() const; | 
    
      | 45 |  |  |  | 
    
      | 46 |  |  | void setTimeStep(double dt); | 
    
      | 47 |  |  | void setVelocityBounds(ConstRefVector lower, ConstRefVector upper); | 
    
      | 48 |  |  | void setAccelerationBounds(ConstRefVector lower, ConstRefVector upper); | 
    
      | 49 |  |  | const Vector& getAccelerationLowerBounds() const; | 
    
      | 50 |  |  | const Vector& getAccelerationUpperBounds() const; | 
    
      | 51 |  |  | const Vector& getVelocityLowerBounds() const; | 
    
      | 52 |  |  | const Vector& getVelocityUpperBounds() const; | 
    
      | 53 |  |  |  | 
    
      | 54 |  |  | virtual void setMask(math::ConstRefVector mask); | 
    
      | 55 |  |  |  | 
    
      | 56 |  |  | protected: | 
    
      | 57 |  |  | Vector m_v_lb, m_v_ub; | 
    
      | 58 |  |  | Vector m_a_lb, m_a_ub; | 
    
      | 59 |  |  | Vector m_ddq_max_due_to_vel, m_ddq_min_due_to_vel; | 
    
      | 60 |  |  | ConstraintBound m_constraint; | 
    
      | 61 |  |  | double m_dt; | 
    
      | 62 |  |  | int m_nv, m_na; | 
    
      | 63 |  |  | }; | 
    
      | 64 |  |  |  | 
    
      | 65 |  |  | }  // namespace tasks | 
    
      | 66 |  |  | }  // namespace tsid | 
    
      | 67 |  |  |  | 
    
      | 68 |  |  | #endif  // ifndef __invdyn_task_joint_bounds_hpp__ | 
    
      | 69 |  |  |  |