GCC Code Coverage Report


Directory: ./
File: include/tsid/tasks/task-actuation-equality.hpp
Date: 2024-08-26 20:29:39
Exec Total Coverage
Lines: 0 1 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 //
2 // Copyright (c) 2021 CNRS INRIA LORIA
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_actuation_equality_hpp__
19 #define __invdyn_task_actuation_equality_hpp__
20
21 #include <tsid/tasks/task-actuation.hpp>
22 #include <tsid/math/constraint-equality.hpp>
23
24 namespace tsid {
25 namespace tasks {
26 class TaskActuationEquality : public TaskActuation {
27 public:
28 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29
30 typedef math::Index Index;
31 typedef math::Vector Vector;
32 typedef math::VectorXi VectorXi;
33 typedef math::ConstraintEquality ConstraintEquality;
34 typedef pinocchio::Data Data;
35
36 TaskActuationEquality(const std::string& name, RobotWrapper& robot);
37
38 virtual ~TaskActuationEquality() {}
39
40 int dim() const;
41
42 const ConstraintBase& compute(const double t, ConstRefVector q,
43 ConstRefVector v, Data& data);
44
45 const ConstraintBase& getConstraint() const;
46
47 void setReference(math::ConstRefVector ref);
48 const Vector& getReference() const;
49
50 void setWeightVector(math::ConstRefVector weights);
51 const Vector& getWeightVector() const;
52
53 const Vector& mask() const;
54 void mask(const Vector& mask);
55
56 protected:
57 Vector m_mask;
58 VectorXi m_activeAxes;
59 Vector m_ref;
60 Vector m_weights;
61 ConstraintEquality m_constraint;
62 };
63 } // namespace tasks
64 } // namespace tsid
65
66 #endif // ifndef __invdyn_task_actuation_equality_hpp__
67