tasks/task-two-frames-equality.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2023 MIPT
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_frames_equality_hpp__
19 #define __invdyn_task_frames_equality_hpp__
20 
24 
25 #include <pinocchio/multibody/model.hpp>
26 #include <pinocchio/multibody/data.hpp>
27 
28 namespace tsid {
29 namespace tasks {
30 
32  public:
33  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
34 
35  typedef math::Index Index;
43 
44  TaskTwoFramesEquality(const std::string& name, RobotWrapper& robot,
45  const std::string& frameName1,
46  const std::string& frameName2);
47 
48  int dim() const override;
49 
50  const ConstraintBase& compute(const double t, ConstRefVector q,
51  ConstRefVector v, Data& data) override;
52 
53  const ConstraintBase& getConstraint() const override;
54 
59  const Vector& getDesiredAcceleration() const override;
60 
65  Vector getAcceleration(ConstRefVector dv) const override;
66 
67  virtual void setMask(math::ConstRefVector mask) override;
68 
73  const Vector& position_error() const override;
74 
79  const Vector& velocity_error() const override;
80 
81  const Vector& Kp() const;
82  const Vector& Kd() const;
83  void Kp(ConstRefVector Kp);
84  void Kd(ConstRefVector Kp);
85 
86  Index frame_id1() const;
87  Index frame_id2() const;
88 
96  void useLocalFrame(bool local_frame);
97 
98  protected:
99  std::string m_frame_name1;
100  std::string m_frame_name2;
118 };
119 
120 } // namespace tasks
121 } // namespace tsid
122 
123 #endif // ifndef __invdyn_task_frames_equality_hpp__
tsid::tasks::TaskTwoFramesEquality::m_v_ref_vec
Vector m_v_ref_vec
Definition: tasks/task-two-frames-equality.hpp:107
tsid::tasks::TaskTwoFramesEquality::m_a_des
Vector m_a_des
Definition: tasks/task-two-frames-equality.hpp:112
tsid::tasks::TaskTwoFramesEquality::m_Kp
Vector m_Kp
Definition: tasks/task-two-frames-equality.hpp:110
demo_quadruped.v
v
Definition: demo_quadruped.py:80
tsid::tasks::TaskTwoFramesEquality::m_p
Vector m_p
Definition: tasks/task-two-frames-equality.hpp:106
tsid::trajectories::TrajectorySample
Definition: trajectories/trajectory-base.hpp:33
pinocchio::DataTpl
tsid::tasks::TaskTwoFramesEquality::m_a_ref
Motion m_a_ref
Definition: tasks/task-two-frames-equality.hpp:108
tsid::tasks::TaskTwoFramesEquality::m_v_ref
Motion m_v_ref
Definition: tasks/task-two-frames-equality.hpp:108
tsid::math::ConstraintEquality
Definition: math/constraint-equality.hpp:26
task-motion.hpp
tsid::tasks::TaskTwoFramesEquality::Kd
const Vector & Kd() const
Definition: src/tasks/task-two-frames-equality.cpp:79
tsid::tasks::TaskTwoFramesEquality::position_error
const Vector & position_error() const override
Definition: src/tasks/task-two-frames-equality.cpp:91
tsid::math::ConstraintBase
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition: constraint-base.hpp:35
tsid::tasks::TaskTwoFramesEquality::m_v_error_masked_vec
Vector m_v_error_masked_vec
Definition: tasks/task-two-frames-equality.hpp:105
pinocchio::SE3
context::SE3 SE3
tsid::tasks::TaskTwoFramesEquality::SE3
pinocchio::SE3 SE3
Definition: tasks/task-two-frames-equality.hpp:42
setup.data
data
Definition: setup.in.py:48
tsid::tasks::TaskTwoFramesEquality::Vector
math::Vector Vector
Definition: tasks/task-two-frames-equality.hpp:37
demo_quadruped.robot
robot
Definition: demo_quadruped.py:51
tsid::tasks::TaskTwoFramesEquality::m_J1
Matrix6x m_J1
Definition: tasks/task-two-frames-equality.hpp:115
constraint-equality.hpp
tsid::tasks::TaskTwoFramesEquality::m_J1_rotated
Matrix6x m_J1_rotated
Definition: tasks/task-two-frames-equality.hpp:116
tsid::tasks::TaskTwoFramesEquality::getConstraint
const ConstraintBase & getConstraint() const override
Definition: src/tasks/task-two-frames-equality.cpp:111
tsid::tasks::TaskTwoFramesEquality::setMask
virtual void setMask(math::ConstRefVector mask) override
Definition: src/tasks/task-two-frames-equality.cpp:65
trajectory-base.hpp
tsid::tasks::TaskTwoFramesEquality::Kp
const Vector & Kp() const
Definition: src/tasks/task-two-frames-equality.cpp:77
tsid::tasks::TaskTwoFramesEquality::m_p_error_vec
Vector m_p_error_vec
Definition: tasks/task-two-frames-equality.hpp:104
tsid::tasks::TaskTwoFramesEquality::m_v_error
Motion m_v_error
Definition: tasks/task-two-frames-equality.hpp:103
demo_quadruped.q
q
Definition: demo_quadruped.py:74
tsid::tasks::TaskTwoFramesEquality::Data
pinocchio::Data Data
Definition: tasks/task-two-frames-equality.hpp:39
tsid::tasks::TaskTwoFramesEquality::m_J2
Matrix6x m_J2
Definition: tasks/task-two-frames-equality.hpp:115
tsid::tasks::TaskTwoFramesEquality::m_Kd
Vector m_Kd
Definition: tasks/task-two-frames-equality.hpp:111
tsid::math::Index
std::size_t Index
Definition: math/fwd.hpp:53
tsid::tasks::TaskTwoFramesEquality::TaskTwoFramesEquality
TaskTwoFramesEquality(const std::string &name, RobotWrapper &robot, const std::string &frameName1, const std::string &frameName2)
Definition: src/tasks/task-two-frames-equality.cpp:29
tsid::tasks::TaskTwoFramesEquality::m_p_error_masked_vec
Vector m_p_error_masked_vec
Definition: tasks/task-two-frames-equality.hpp:105
tsid::tasks::TaskTwoFramesEquality::m_wMl1
SE3 m_wMl1
Definition: tasks/task-two-frames-equality.hpp:109
tsid::tasks::TaskTwoFramesEquality::m_drift_masked
Vector m_drift_masked
Definition: tasks/task-two-frames-equality.hpp:114
tsid::tasks::TaskTwoFramesEquality::m_constraint
ConstraintEquality m_constraint
Definition: tasks/task-two-frames-equality.hpp:117
tsid::tasks::TaskTwoFramesEquality::TrajectorySample
trajectories::TrajectorySample TrajectorySample
Definition: tasks/task-two-frames-equality.hpp:36
tsid::tasks::TaskTwoFramesEquality::m_J2_rotated
Matrix6x m_J2_rotated
Definition: tasks/task-two-frames-equality.hpp:116
tsid::tasks::TaskTwoFramesEquality::ConstraintEquality
math::ConstraintEquality ConstraintEquality
Definition: tasks/task-two-frames-equality.hpp:38
tsid::tasks::TaskTwoFramesEquality::frame_id1
Index frame_id1() const
Definition: src/tasks/task-two-frames-equality.cpp:107
tsid::tasks::TaskTwoFramesEquality::m_frame_id2
Index m_frame_id2
Definition: tasks/task-two-frames-equality.hpp:102
tsid::tasks::TaskTwoFramesEquality::Motion
pinocchio::Motion Motion
Definition: tasks/task-two-frames-equality.hpp:41
tsid::tasks::TaskMotion
Definition: task-motion.hpp:26
tsid::math::ConstRefVector
const typedef Eigen::Ref< const Vector > ConstRefVector
Definition: math/fwd.hpp:48
tsid::tasks::TaskTwoFramesEquality::useLocalFrame
void useLocalFrame(bool local_frame)
Specifies if the jacobian and desired acceloration should be expressed in the local frame or the loca...
tsid::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: math/fwd.hpp:35
tsid::tasks::TaskTwoFramesEquality::getDesiredAcceleration
const Vector & getDesiredAcceleration() const override
Definition: src/tasks/task-two-frames-equality.cpp:99
tsid::tasks::TaskTwoFramesEquality::m_frame_name1
std::string m_frame_name1
Definition: tasks/task-two-frames-equality.hpp:99
tsid::tasks::TaskTwoFramesEquality::m_frame_id1
Index m_frame_id1
Definition: tasks/task-two-frames-equality.hpp:101
tsid
Definition: bindings/python/constraint/constraint-bound.cpp:21
tsid::tasks::TaskTwoFramesEquality::Index
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Index Index
Definition: tasks/task-two-frames-equality.hpp:35
tsid::tasks::TaskTwoFramesEquality::getAcceleration
Vector getAcceleration(ConstRefVector dv) const override
Definition: src/tasks/task-two-frames-equality.cpp:103
tsid::tasks::TaskTwoFramesEquality::Matrix6x
pinocchio::Data::Matrix6x Matrix6x
Definition: tasks/task-two-frames-equality.hpp:40
tsid::robots::RobotWrapper
Wrapper for a robot based on pinocchio.
Definition: robots/robot-wrapper.hpp:37
tsid::tasks::TaskTwoFramesEquality::m_v
Vector m_v
Definition: tasks/task-two-frames-equality.hpp:106
tsid::tasks::TaskBase::name
const std::string & name() const
Definition: task-base.cpp:25
pinocchio::DataTpl::Matrix6x
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > Matrix6x
tsid::tasks::TaskTwoFramesEquality::m_drift
Motion m_drift
Definition: tasks/task-two-frames-equality.hpp:113
tsid::tasks::TaskTwoFramesEquality::m_v_error_vec
Vector m_v_error_vec
Definition: tasks/task-two-frames-equality.hpp:104
tsid::tasks::TaskTwoFramesEquality::m_p_error
Motion m_p_error
Definition: tasks/task-two-frames-equality.hpp:103
tsid::tasks::TaskTwoFramesEquality::m_frame_name2
std::string m_frame_name2
Definition: tasks/task-two-frames-equality.hpp:100
tsid::tasks::TaskTwoFramesEquality::frame_id2
Index frame_id2() const
Definition: src/tasks/task-two-frames-equality.cpp:109
t
Transform3f t
pinocchio::MotionTpl
tsid::tasks::TaskTwoFramesEquality::compute
const ConstraintBase & compute(const double t, ConstRefVector q, ConstRefVector v, Data &data) override
Definition: src/tasks/task-two-frames-equality.cpp:115
tsid::tasks::TaskTwoFramesEquality::m_a_des_masked
Vector m_a_des_masked
Definition: tasks/task-two-frames-equality.hpp:112
tsid::tasks::TaskTwoFramesEquality::velocity_error
const Vector & velocity_error() const override
Definition: src/tasks/task-two-frames-equality.cpp:95
tsid::tasks::TaskTwoFramesEquality::m_wMl2
SE3 m_wMl2
Definition: tasks/task-two-frames-equality.hpp:109
tsid::tasks::TaskTwoFramesEquality::dim
int dim() const override
Return the dimension of the task. \info should be overloaded in the child class.
Definition: src/tasks/task-two-frames-equality.cpp:75
tsid::tasks::TaskBase::ConstRefVector
math::ConstRefVector ConstRefVector
Definition: task-base.hpp:39
tsid::tasks::TaskTwoFramesEquality
Definition: tasks/task-two-frames-equality.hpp:31
tsid::tasks::TaskTwoFramesEquality::m_p_ref
Vector m_p_ref
Definition: tasks/task-two-frames-equality.hpp:107


tsid
Author(s): Andrea Del Prete, Justin Carpentier
autogenerated on Thu Apr 3 2025 02:47:16