tsid 1.9.0
Efficient Task Space Inverse Dynamics for Multi-body Systems based on Pinocchio
Loading...
Searching...
No Matches
task-base.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_base_hpp__
19#define __invdyn_task_base_hpp__
20
21#include "tsid/math/fwd.hpp"
22#include "tsid/robots/fwd.hpp"
24
25#include <pinocchio/multibody/fwd.hpp>
26
27namespace tsid {
28namespace tasks {
29
34class TaskBase {
35 public:
36 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
37
40 typedef pinocchio::Data Data;
42
43 TaskBase(const std::string& name, RobotWrapper& robot);
44
45 virtual ~TaskBase() = default;
46
47 const std::string& name() const;
48
49 void name(const std::string& name);
50
53 virtual int dim() const = 0;
54
55 virtual const ConstraintBase& compute(double t, ConstRefVector q,
56 ConstRefVector v, Data& data) = 0;
57
58 virtual const ConstraintBase& getConstraint() const = 0;
59
60 protected:
61 std::string m_name;
62
65};
66
67} // namespace tasks
68} // namespace tsid
69
70#endif // ifndef __invdyn_task_base_hpp__
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition constraint-base.hpp:22
Wrapper for a robot based on pinocchio.
Definition robot-wrapper.hpp:37
std::string m_name
Definition task-base.hpp:61
RobotWrapper & m_robot
Reference on the robot model.
Definition task-base.hpp:64
const std::string & name() const
Definition task-base.cpp:12
virtual const ConstraintBase & getConstraint() const =0
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::ConstraintBase ConstraintBase
Definition task-base.hpp:38
math::ConstRefVector ConstRefVector
Definition task-base.hpp:39
virtual ~TaskBase()=default
TaskBase(const std::string &name, RobotWrapper &robot)
Definition task-base.cpp:9
pinocchio::Data Data
Definition task-base.hpp:40
virtual const ConstraintBase & compute(double t, ConstRefVector q, ConstRefVector v, Data &data)=0
robots::RobotWrapper RobotWrapper
Definition task-base.hpp:41
virtual int dim() const =0
Return the dimension of the task. \info should be overloaded in the child class.
const Eigen::Ref< const Vector > ConstRefVector
Definition fwd.hpp:35
Definition fwd.hpp:9
Definition constraint-bound.hpp:25