measured-3Dforce.hpp
Go to the documentation of this file.
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_3Dforce_hpp__
19 #define __invdyn_measured_3Dforce_hpp__
20 
21 #include <pinocchio/multibody/data.hpp>
22 
24 
25 namespace tsid {
26 namespace contacts {
28  public:
29  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
30 
31  typedef math::Index Index;
36 
37  Measured3Dforce(const std::string &name, RobotWrapper &robot,
38  const std::string &frameName);
39 
40  const Vector &computeJointTorques(Data &data);
41 
46  void setMeasuredContactForce(const Vector3 &fext);
47 
48  const Vector3 &getMeasuredContactForce() const;
49 
57  void useLocalFrame(bool local_frame);
58 
59  protected:
60  std::string m_frame_name;
61  Index m_frame_id;
62  Vector3 m_fext;
63  Matrix3x m_J;
64  Matrix3x m_J_rotated;
67 };
68 } // namespace contacts
69 } // namespace tsid
70 
71 #endif // ifndef __invdyn_measured_6Dwrench_hpp__
std::size_t Index
Definition: math/fwd.hpp:53
const Vector3 & getMeasuredContactForce() const
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: math/fwd.hpp:35
const std::string & name() const
pinocchio::Data::Matrix3x Matrix3x
void setMeasuredContactForce(const Vector3 &fext)
data
Definition: setup.in.py:48
Eigen::Matrix< Scalar, 3, 1 > Vector3
Definition: math/fwd.hpp:40
Measured3Dforce(const std::string &name, RobotWrapper &robot, const std::string &frameName)
Wrapper for a robot based on pinocchio.
const Vector & computeJointTorques(Data &data)
Eigen::Matrix< Scalar, 3, Eigen::Dynamic, Options > Matrix3x
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Index Index
void useLocalFrame(bool local_frame)
Specifies if the external force and jacobian is expressed in the local frame or the local world-orien...
string frameName
Definition: test_Contact.py:29


tsid
Author(s): Andrea Del Prete, Justin Carpentier
autogenerated on Sun Jul 2 2023 02:21:51