tasks/task-se3-equality.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2017 CNRS, NYU, MPI Tübingen
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_se3_equality_hpp__
19 #define __invdyn_task_se3_equality_hpp__
20 
24 
25 #include <pinocchio/multibody/model.hpp>
26 #include <pinocchio/multibody/data.hpp>
27 
28 namespace tsid {
29 namespace tasks {
30 
31 class TaskSE3Equality : public TaskMotion {
32  public:
33  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
34 
35  typedef math::Index Index;
43 
44  TaskSE3Equality(const std::string& name, RobotWrapper& robot,
45  const std::string& frameName);
46 
47  int dim() const override;
48 
49  const ConstraintBase& compute(const double t, ConstRefVector q,
50  ConstRefVector v, Data& data) override;
51 
52  const ConstraintBase& getConstraint() const override;
53 
54  void setReference(TrajectorySample& ref);
55  void setReference(const SE3& ref);
56  const TrajectorySample& getReference() const override;
57 
62  const Vector& getDesiredAcceleration() const override;
63 
68  Vector getAcceleration(ConstRefVector dv) const override;
69 
70  virtual void setMask(math::ConstRefVector mask) override;
71 
76  const Vector& position_error() const override;
77 
82  const Vector& velocity_error() const override;
83 
84  const Vector& position() const override;
85  const Vector& velocity() const override;
86  const Vector& position_ref() const override;
87  const Vector& velocity_ref() const override;
88 
89  const Vector& Kp() const;
90  const Vector& Kd() const;
91  void Kp(ConstRefVector Kp);
92  void Kd(ConstRefVector Kp);
93 
94  Index frame_id() const;
95 
103  void useLocalFrame(bool local_frame);
104 
105  protected:
106  std::string m_frame_name;
125 };
126 
127 } // namespace tasks
128 } // namespace tsid
129 
130 #endif // ifndef __invdyn_task_se3_equality_hpp__
demo_quadruped.v
v
Definition: demo_quadruped.py:80
tsid::tasks::TaskSE3Equality::m_M_ref
SE3 m_M_ref
Definition: tasks/task-se3-equality.hpp:114
tsid::tasks::TaskSE3Equality::m_p_ref
Vector m_p_ref
Definition: tasks/task-se3-equality.hpp:112
tsid::tasks::TaskSE3Equality::Matrix6x
pinocchio::Data::Matrix6x Matrix6x
Definition: tasks/task-se3-equality.hpp:40
tsid::tasks::TaskSE3Equality::position_error
const Vector & position_error() const override
Definition: src/tasks/task-se3-equality.cpp:115
tsid::tasks::TaskSE3Equality::m_v_error_masked_vec
Vector m_v_error_masked_vec
Definition: tasks/task-se3-equality.hpp:110
tsid::tasks::TaskSE3Equality::ConstraintEquality
math::ConstraintEquality ConstraintEquality
Definition: tasks/task-se3-equality.hpp:38
tsid::trajectories::TrajectorySample
Definition: trajectories/trajectory-base.hpp:33
pinocchio::DataTpl
tsid::math::ConstraintEquality
Definition: math/constraint-equality.hpp:26
tsid::tasks::TaskSE3Equality::m_a_des_masked
Vector m_a_des_masked
Definition: tasks/task-se3-equality.hpp:117
task-motion.hpp
tsid::tasks::TaskSE3Equality::setMask
virtual void setMask(math::ConstRefVector mask) override
Definition: src/tasks/task-se3-equality.cpp:63
tsid::math::ConstraintBase
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition: constraint-base.hpp:35
tsid::tasks::TaskSE3Equality::Index
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Index Index
Definition: tasks/task-se3-equality.hpp:35
pinocchio::SE3
context::SE3 SE3
tsid::tasks::TaskSE3Equality::getAcceleration
Vector getAcceleration(ConstRefVector dv) const override
Definition: src/tasks/task-se3-equality.cpp:135
tsid::tasks::TaskSE3Equality::velocity_ref
const Vector & velocity_ref() const override
Definition: src/tasks/task-se3-equality.cpp:129
setup.data
data
Definition: setup.in.py:48
tsid::tasks::TaskSE3Equality::m_p
Vector m_p
Definition: tasks/task-se3-equality.hpp:111
demo_quadruped.robot
robot
Definition: demo_quadruped.py:51
tsid::tasks::TaskSE3Equality::SE3
pinocchio::SE3 SE3
Definition: tasks/task-se3-equality.hpp:42
tsid::tasks::TaskSE3Equality::m_wMl
SE3 m_wMl
Definition: tasks/task-se3-equality.hpp:114
tsid::tasks::TaskSE3Equality::compute
const ConstraintBase & compute(const double t, ConstRefVector q, ConstRefVector v, Data &data) override
Definition: src/tasks/task-se3-equality.cpp:149
tsid::tasks::TaskSE3Equality::getConstraint
const ConstraintBase & getConstraint() const override
Definition: src/tasks/task-se3-equality.cpp:141
tsid::tasks::TaskSE3Equality::Data
pinocchio::Data Data
Definition: tasks/task-se3-equality.hpp:39
constraint-equality.hpp
tsid::tasks::TaskSE3Equality::m_ref
TrajectorySample m_ref
Definition: tasks/task-se3-equality.hpp:123
tsid::tasks::TaskSE3Equality::m_p_error
Motion m_p_error
Definition: tasks/task-se3-equality.hpp:108
tsid::tasks::TaskSE3Equality::m_a_des
Vector m_a_des
Definition: tasks/task-se3-equality.hpp:117
tsid::tasks::TaskSE3Equality::m_a_ref
Motion m_a_ref
Definition: tasks/task-se3-equality.hpp:113
trajectory-base.hpp
tsid::tasks::TaskSE3Equality::getReference
const TrajectorySample & getReference() const override
Definition: src/tasks/task-se3-equality.cpp:113
tsid::tasks::TaskSE3Equality::getDesiredAcceleration
const Vector & getDesiredAcceleration() const override
Definition: src/tasks/task-se3-equality.cpp:131
demo_quadruped.q
q
Definition: demo_quadruped.py:74
tsid::tasks::TaskSE3Equality::m_frame_id
Index m_frame_id
Definition: tasks/task-se3-equality.hpp:107
tsid::tasks::TaskSE3Equality::m_drift_masked
Vector m_drift_masked
Definition: tasks/task-se3-equality.hpp:119
tsid::tasks::TaskSE3Equality::Motion
pinocchio::Motion Motion
Definition: tasks/task-se3-equality.hpp:41
tsid::tasks::TaskSE3Equality::position
const Vector & position() const override
Definition: src/tasks/task-se3-equality.cpp:123
tsid::tasks::TaskSE3Equality::m_Kd
Vector m_Kd
Definition: tasks/task-se3-equality.hpp:116
tsid::math::Index
std::size_t Index
Definition: math/fwd.hpp:53
tsid::tasks::TaskSE3Equality::TaskSE3Equality
TaskSE3Equality(const std::string &name, RobotWrapper &robot, const std::string &frameName)
Definition: src/tasks/task-se3-equality.cpp:29
tsid::tasks::TaskSE3Equality::velocity
const Vector & velocity() const override
Definition: src/tasks/task-se3-equality.cpp:125
tsid::tasks::TaskSE3Equality::m_local_frame
bool m_local_frame
Definition: tasks/task-se3-equality.hpp:124
tsid::tasks::TaskSE3Equality::TrajectorySample
trajectories::TrajectorySample TrajectorySample
Definition: tasks/task-se3-equality.hpp:36
tsid::tasks::TaskSE3Equality::m_drift
Motion m_drift
Definition: tasks/task-se3-equality.hpp:118
tsid::tasks::TaskSE3Equality::m_v_ref
Motion m_v_ref
Definition: tasks/task-se3-equality.hpp:113
tsid::tasks::TaskSE3Equality::m_J
Matrix6x m_J
Definition: tasks/task-se3-equality.hpp:120
tsid::tasks::TaskSE3Equality::m_p_error_vec
Vector m_p_error_vec
Definition: tasks/task-se3-equality.hpp:109
tsid::tasks::TaskSE3Equality::m_Kp
Vector m_Kp
Definition: tasks/task-se3-equality.hpp:115
tsid::tasks::TaskSE3Equality::Kp
const Vector & Kp() const
Definition: src/tasks/task-se3-equality.cpp:75
tsid::tasks::TaskMotion
Definition: task-motion.hpp:26
tsid::math::ConstRefVector
const typedef Eigen::Ref< const Vector > ConstRefVector
Definition: math/fwd.hpp:48
tsid::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: math/fwd.hpp:35
tsid::tasks::TaskSE3Equality::m_constraint
ConstraintEquality m_constraint
Definition: tasks/task-se3-equality.hpp:122
tsid::tasks::TaskSE3Equality::m_v_error
Motion m_v_error
Definition: tasks/task-se3-equality.hpp:108
tsid::tasks::TaskSE3Equality::m_J_rotated
Matrix6x m_J_rotated
Definition: tasks/task-se3-equality.hpp:121
tsid::tasks::TaskSE3Equality::frame_id
Index frame_id() const
Definition: src/tasks/task-se3-equality.cpp:139
tsid::tasks::TaskSE3Equality::m_p_error_masked_vec
Vector m_p_error_masked_vec
Definition: tasks/task-se3-equality.hpp:110
tsid
Definition: bindings/python/constraint/constraint-bound.cpp:21
tsid::tasks::TaskSE3Equality::setReference
void setReference(TrajectorySample &ref)
Definition: src/tasks/task-se3-equality.cpp:91
tsid::robots::RobotWrapper
Wrapper for a robot based on pinocchio.
Definition: robots/robot-wrapper.hpp:37
tsid::tasks::TaskSE3Equality::m_v_ref_vec
Vector m_v_ref_vec
Definition: tasks/task-se3-equality.hpp:112
tsid::tasks::TaskSE3Equality::dim
int dim() const override
Return the dimension of the task. \info should be overloaded in the child class.
Definition: src/tasks/task-se3-equality.cpp:73
tsid::tasks::TaskSE3Equality::Kd
const Vector & Kd() const
Definition: src/tasks/task-se3-equality.cpp:77
tsid::tasks::TaskSE3Equality::Vector
math::Vector Vector
Definition: tasks/task-se3-equality.hpp:37
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::TaskSE3Equality::m_v
Vector m_v
Definition: tasks/task-se3-equality.hpp:111
t
Transform3f t
tsid::tasks::TaskSE3Equality
Definition: tasks/task-se3-equality.hpp:31
tsid::tasks::TaskSE3Equality::useLocalFrame
void useLocalFrame(bool local_frame)
Specifies if the jacobian and desired acceloration should be expressed in the local frame or the loca...
Definition: src/tasks/task-se3-equality.cpp:145
pinocchio::MotionTpl
tsid::tasks::TaskSE3Equality::position_ref
const Vector & position_ref() const override
Definition: src/tasks/task-se3-equality.cpp:127
test_Contact.frameName
string frameName
Definition: test_Contact.py:29
tsid::tasks::TaskBase::ConstRefVector
math::ConstRefVector ConstRefVector
Definition: task-base.hpp:39
tsid::tasks::TaskSE3Equality::velocity_error
const Vector & velocity_error() const override
Definition: src/tasks/task-se3-equality.cpp:119
tsid::tasks::TaskSE3Equality::m_v_error_vec
Vector m_v_error_vec
Definition: tasks/task-se3-equality.hpp:109
tsid::tasks::TaskSE3Equality::m_frame_name
std::string m_frame_name
Definition: tasks/task-se3-equality.hpp:106


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