Line |
Branch |
Exec |
Source |
1 |
|
|
// |
2 |
|
|
// Copyright (c) 2022 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_measured_force_base_hpp__ |
19 |
|
|
#define __invdyn_measured_force_base_hpp__ |
20 |
|
|
|
21 |
|
|
#include <pinocchio/multibody/fwd.hpp> |
22 |
|
|
|
23 |
|
|
#include "tsid/math/fwd.hpp" |
24 |
|
|
#include "tsid/robots/fwd.hpp" |
25 |
|
|
|
26 |
|
|
namespace tsid { |
27 |
|
|
namespace contacts { |
28 |
|
|
class MeasuredForceBase { |
29 |
|
|
public: |
30 |
|
|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW |
31 |
|
|
|
32 |
|
|
typedef math::Vector Vector; |
33 |
|
|
typedef pinocchio::Data Data; |
34 |
|
|
typedef robots::RobotWrapper RobotWrapper; |
35 |
|
|
|
36 |
|
|
MeasuredForceBase(const std::string &name, RobotWrapper &robot); |
37 |
|
|
|
38 |
|
2 |
virtual ~MeasuredForceBase() = default; |
39 |
|
|
|
40 |
|
|
const std::string &name() const; |
41 |
|
|
|
42 |
|
|
void name(const std::string &name); |
43 |
|
|
|
44 |
|
|
/** |
45 |
|
|
* Compute the bias force (J^t F) associated to the |
46 |
|
|
* external measured force. |
47 |
|
|
*/ |
48 |
|
|
virtual const Vector &computeJointTorques(Data &data) = 0; |
49 |
|
|
|
50 |
|
|
protected: |
51 |
|
|
std::string m_name; |
52 |
|
|
|
53 |
|
|
/// \brief Reference on the robot model. |
54 |
|
|
RobotWrapper &m_robot; |
55 |
|
|
}; |
56 |
|
|
} // namespace contacts |
57 |
|
|
} // namespace tsid |
58 |
|
|
|
59 |
|
|
#endif // ifndef __invdyn_measured_force_base_hpp__ |
60 |
|
|
|