task-joint-posture.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_posture_hpp__
19 #define __invdyn_task_joint_posture_hpp__
20 
24 #include <tsid/deprecated.hh>
25 
26 namespace tsid
27 {
28  namespace tasks
29  {
30 
32  {
33  public:
34  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
35 
36  typedef math::Index Index;
42 
43  TaskJointPosture(const std::string & name,
44  RobotWrapper & robot);
45 
46  int dim() const;
47 
48  const ConstraintBase & compute(const double t,
51  Data & data);
52 
53  const ConstraintBase & getConstraint() const;
54 
55  void setReference(const TrajectorySample & ref);
56  const TrajectorySample & getReference() const;
57 
58  const Vector & getDesiredAcceleration() const;
60 
61  TSID_DEPRECATED const Vector & mask() const; // deprecated
62  TSID_DEPRECATED void mask(const Vector & mask); // deprecated
63  virtual void setMask(math::ConstRefVector mask);
64 
65  const Vector & position_error() const;
66  const Vector & velocity_error() const;
67  const Vector & position() const;
68  const Vector & velocity() const;
69  const Vector & position_ref() const;
70  const Vector & velocity_ref() const;
71 
72  const Vector & Kp();
73  const Vector & Kd();
74  void Kp(ConstRefVector Kp);
75  void Kd(ConstRefVector Kp);
76 
77  protected:
87  };
88 
89  }
90 }
91 
92 #endif // ifndef __invdyn_task_joint_posture_hpp__
tsid::tasks::TaskJointPosture::velocity_error
const Vector & velocity_error() const
Definition: task-joint-posture.cpp:123
tsid::tasks::TaskJointPosture::Index
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Index Index
Definition: task-joint-posture.hpp:36
tsid::tasks::TaskJointPosture::m_v
Vector m_v
Definition: task-joint-posture.hpp:81
tsid::tasks::TaskJointPosture::m_constraint
ConstraintEquality m_constraint
Definition: task-joint-posture.hpp:86
tsid::trajectories::TrajectorySample
Definition: trajectory-base.hpp:35
tsid::tasks::TaskJointPosture::TrajectorySample
trajectories::TrajectorySample TrajectorySample
Definition: task-joint-posture.hpp:37
tsid::math::ConstraintEquality
Definition: constraint-equality.hpp:28
Data
pinocchio::Data Data
Definition: inverse-dynamics-formulation-acc-force.cpp:29
tsid::tasks::TaskJointPosture::m_p_error
Vector m_p_error
Definition: task-joint-posture.hpp:80
task-motion.hpp
tsid::tasks::TaskJointPosture
Definition: task-joint-posture.hpp:31
tsid::tasks::TaskJointPosture::m_ref
TrajectorySample m_ref
Definition: task-joint-posture.hpp:84
tsid::math::ConstraintBase
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition: constraint-base.hpp:36
tsid::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hpp:37
tsid::tasks::TaskJointPosture::mask
const TSID_DEPRECATED Vector & mask() const
Definition: task-joint-posture.cpp:43
tsid::tasks::TaskJointPosture::getConstraint
const ConstraintBase & getConstraint() const
Definition: task-joint-posture.cpp:148
tsid::tasks::TaskJointPosture::setReference
void setReference(const TrajectorySample &ref)
Definition: task-joint-posture.cpp:95
constraint-equality.hpp
tsid::tasks::TaskJointPosture::m_Kd
Vector m_Kd
Definition: task-joint-posture.hpp:79
tsid::tasks::TaskJointPosture::getAcceleration
Vector getAcceleration(ConstRefVector dv) const
Definition: task-joint-posture.cpp:113
tsid::tasks::TaskJointPosture::position_error
const Vector & position_error() const
Definition: task-joint-posture.cpp:118
tsid::tasks::TaskJointPosture::getReference
const TrajectorySample & getReference() const
Definition: task-joint-posture.cpp:103
trajectory-base.hpp
tsid::tasks::TaskJointPosture::ConstraintEquality
math::ConstraintEquality ConstraintEquality
Definition: task-joint-posture.hpp:40
tsid::tasks::TaskJointPosture::m_activeAxes
VectorXi m_activeAxes
Definition: task-joint-posture.hpp:83
tsid::tasks::TaskJointPosture::VectorXi
math::VectorXi VectorXi
Definition: task-joint-posture.hpp:39
tsid::math::Index
std::size_t Index
Definition: fwd.hpp:55
tsid::math::VectorXi
Eigen::VectorXi VectorXi
Definition: fwd.hpp:39
tsid::tasks::TaskJointPosture::setMask
virtual void setMask(math::ConstRefVector mask)
Definition: task-joint-posture.cpp:54
tsid::tasks::TaskJointPosture::m_v_error
Vector m_v_error
Definition: task-joint-posture.hpp:80
tsid::tasks::TaskJointPosture::Kd
const Vector & Kd()
Definition: task-joint-posture.cpp:81
tsid::tasks::TaskMotion
Definition: task-motion.hpp:28
tsid::math::ConstRefVector
const typedef Eigen::Ref< const Vector > ConstRefVector
Definition: fwd.hpp:50
tsid::tasks::TaskBase::Data
pinocchio::Data Data
Definition: task-base.hpp:43
tsid::tasks::TaskJointPosture::position
const Vector & position() const
Definition: task-joint-posture.cpp:128
tsid::tasks::TaskJointPosture::position_ref
const Vector & position_ref() const
Definition: task-joint-posture.cpp:138
tsid
Definition: constraint-bound.hpp:26
tsid::tasks::TaskJointPosture::m_a_des
Vector m_a_des
Definition: task-joint-posture.hpp:82
tsid::tasks::TaskJointPosture::velocity_ref
const Vector & velocity_ref() const
Definition: task-joint-posture.cpp:143
tsid::robots::RobotWrapper
Wrapper for a robot based on pinocchio.
Definition: robot-wrapper.hpp:40
tsid::tasks::TaskJointPosture::Vector
math::Vector Vector
Definition: task-joint-posture.hpp:38
tsid::tasks::TaskJointPosture::m_Kp
Vector m_Kp
Definition: task-joint-posture.hpp:78
tsid::tasks::TaskJointPosture::Kp
const Vector & Kp()
Definition: task-joint-posture.cpp:79
tsid::tasks::TaskJointPosture::Data
pinocchio::Data Data
Definition: task-joint-posture.hpp:41
tsid::tasks::TaskBase::name
const std::string & name() const
Definition: task-base.cpp:30
tsid::tasks::TaskJointPosture::getDesiredAcceleration
const Vector & getDesiredAcceleration() const
Definition: task-joint-posture.cpp:108
tsid::tasks::TaskJointPosture::velocity
const Vector & velocity() const
Definition: task-joint-posture.cpp:133
tsid::tasks::TaskJointPosture::m_ref_q_augmented
Vector m_ref_q_augmented
Definition: task-joint-posture.hpp:85
tsid::tasks::TaskJointPosture::TaskJointPosture
TaskJointPosture(const std::string &name, RobotWrapper &robot)
Definition: task-joint-posture.cpp:30
tsid::tasks::TaskBase::ConstRefVector
math::ConstRefVector ConstRefVector
Definition: task-base.hpp:42
tsid::tasks::TaskJointPosture::dim
int dim() const
Return the dimension of the task. \info should be overloaded in the child class.
Definition: task-joint-posture.cpp:74
tsid::tasks::TaskJointPosture::m_p
Vector m_p
Definition: task-joint-posture.hpp:81
tsid::tasks::TaskJointPosture::compute
const ConstraintBase & compute(const double t, ConstRefVector q, ConstRefVector v, Data &data)
Definition: task-joint-posture.cpp:153