task-motion.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2017 CNRS, NYU, MPI Tübingen
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_motion_hpp__
19 #define __invdyn_task_motion_hpp__
20 
21 #include "tsid/tasks/task-base.hpp"
23 
24 namespace tsid
25 {
26  namespace tasks
27  {
28  class TaskMotion : public TaskBase
29  {
30  public:
31  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
32 
35 
36  TaskMotion(const std::string & name,
37  RobotWrapper & robot);
38 
39  virtual const TrajectorySample & getReference() const;
40 
41  virtual const Vector & getDesiredAcceleration() const;
42 
43  virtual Vector getAcceleration(ConstRefVector dv) const;
44 
45  virtual const Vector & position_error() const;
46  virtual const Vector & velocity_error() const;
47  virtual const Vector & position() const;
48  virtual const Vector & velocity() const;
49  virtual const Vector & position_ref() const;
50  virtual const Vector & velocity_ref() const;
51 
52  virtual void setMask(math::ConstRefVector mask);
53  virtual const Vector & getMask() const;
54  virtual bool hasMask();
55 
56  protected:
57  Vector m_mask;
58  Vector m_dummy;
60  };
61  }
62 }
63 
64 #endif // ifndef __invdyn_task_motion_hpp__
virtual const Vector & getDesiredAcceleration() const
Definition: task-motion.cpp:47
virtual bool hasMask()
Definition: task-motion.cpp:38
Base template of a Task. Each class is defined according to a constant model of a robot...
Definition: task-base.hpp:36
virtual const Vector & velocity() const
Definition: task-motion.cpp:54
const std::string & name() const
Definition: task-base.cpp:30
virtual const Vector & position_ref() const
Definition: task-motion.cpp:55
virtual const TrajectorySample & getReference() const
Definition: task-motion.cpp:45
virtual const Vector & velocity_ref() const
Definition: task-motion.cpp:56
virtual const Vector & getMask() const
Definition: task-motion.cpp:43
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Vector Vector
Definition: task-motion.hpp:33
Definition: task-motion.hpp:28
Definition: trajectory-base.hpp:35
Vector m_dummy
Definition: task-motion.hpp:58
math::ConstRefVector ConstRefVector
Definition: task-base.hpp:42
virtual const Vector & position() const
Definition: task-motion.cpp:53
const Eigen::Ref< const Vector > ConstRefVector
Definition: fwd.hpp:50
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hpp:37
Wrapper for a robot based on pinocchio.
Definition: robot-wrapper.hpp:40
virtual const Vector & velocity_error() const
Definition: task-motion.cpp:52
Vector m_mask
Definition: task-motion.hpp:57
trajectories::TrajectorySample TrajectorySample_dummy
Definition: task-motion.hpp:59
trajectories::TrajectorySample TrajectorySample
Definition: task-motion.hpp:34
Definition: constraint-bound.hpp:26
virtual void setMask(math::ConstRefVector mask)
Definition: task-motion.cpp:33
TaskMotion(const std::string &name, RobotWrapper &robot)
Definition: task-motion.cpp:28
virtual Vector getAcceleration(ConstRefVector dv) const
Definition: task-motion.cpp:49
virtual const Vector & position_error() const
Definition: task-motion.cpp:51