GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: include/tsid/tasks/task-contact-force.hpp Lines: 0 2 0.0 %
Date: 2024-02-02 08:47:34 Branches: 0 0 - %

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_contact_force_hpp__
19
#define __invdyn_task_contact_force_hpp__
20
21
#include <tsid/deprecated.hh>
22
#include <tsid/tasks/task-base.hpp>
23
#include <tsid/formulations/contact-level.hpp>
24
#include <memory>
25
26
namespace tsid {
27
namespace tasks {
28
class TaskContactForce : public TaskBase {
29
 public:
30
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
31
32
  TaskContactForce(const std::string& name, RobotWrapper& robot);
33
34
  virtual ~TaskContactForce() {}
35
36
  /**
37
   * Contact force tasks have an additional compute method that takes as extra
38
   * input argument the list of active contacts. This can be needed for force
39
   * tasks that involve all contacts, such as the CoP task.
40
   */
41
  TSID_DISABLE_WARNING_PUSH
42
  TSID_DISABLE_WARNING(-Woverloaded - virtual)
43
  virtual const ConstraintBase& compute(
44
      const double t, ConstRefVector q, ConstRefVector v, Data& data,
45
      const std::vector<std::shared_ptr<ContactLevel> >* contacts) = 0;
46
  TSID_DISABLE_WARNING_POP
47
48
  /**
49
   * Return the name of the contact associated to this task if this task is
50
   * associated to a specific contact. If this task is associated to multiple
51
   * contact forces (all of them), returns an empty string.
52
   */
53
  virtual const std::string& getAssociatedContactName() = 0;
54
};
55
}  // namespace tasks
56
}  // namespace tsid
57
58
#endif  // ifndef __invdyn_task_contact_force_hpp__