tasks/task-cop-equality.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2021 University of Trento
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_cop_equality_hpp__
19 #define __invdyn_task_cop_equality_hpp__
20 
21 #include "tsid/math/fwd.hpp"
26 
27 namespace tsid {
28 namespace tasks {
29 
31  public:
32  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
33 
34  typedef math::Index Index;
40 
41  TaskCopEquality(const std::string& name, RobotWrapper& robot);
42 
43  void setContactList(
44  const std::vector<std::shared_ptr<ContactLevel> >* contacts);
45 
46  int dim() const override;
47 
48  const std::string& getAssociatedContactName() override;
49 
51  Data& data) override;
52 
53  const ConstraintBase& compute(
55  const std::vector<std::shared_ptr<ContactLevel> >* contacts) override;
56 
57  const ConstraintBase& getConstraint() const override;
58 
59  void setReference(const Vector3& ref);
60 
61  const Vector3& getReference() const;
62 
63  void setContactNormal(const Vector3& n);
64 
65  const Vector3& getContactNormal() const;
66 
67  protected:
68  const std::vector<std::shared_ptr<ContactLevel> >* m_contacts;
69  std::string m_contact_name; // an empty string
70  Vector3 m_normal; // normal direction to the ground expressed in world frame
71  Vector3 m_ref; // reference CoP in world frame
73 };
74 
75 } // namespace tasks
76 } // namespace tsid
77 
78 #endif // ifndef __invdyn_task_com_equality_hpp__
demo_quadruped.v
v
Definition: demo_quadruped.py:80
tsid::tasks::TaskCopEquality::m_contacts
const std::vector< std::shared_ptr< ContactLevel > > * m_contacts
Definition: tasks/task-cop-equality.hpp:68
tsid::tasks::TaskCopEquality::TrajectorySample
trajectories::TrajectorySample TrajectorySample
Definition: tasks/task-cop-equality.hpp:35
tsid::tasks::TaskCopEquality::m_normal
Vector3 m_normal
Definition: tasks/task-cop-equality.hpp:70
tsid::tasks::TaskCopEquality::m_constraint
ConstraintEquality m_constraint
Definition: tasks/task-cop-equality.hpp:72
tsid::trajectories::TrajectorySample
Definition: trajectories/trajectory-base.hpp:33
pinocchio::DataTpl
tsid::tasks::TaskCopEquality::TaskCopEquality
TaskCopEquality(const std::string &name, RobotWrapper &robot)
Definition: src/tasks/task-cop-equality.cpp:26
tsid::math::ConstraintEquality
Definition: math/constraint-equality.hpp:26
tsid::tasks::TaskCopEquality::setContactNormal
void setContactNormal(const Vector3 &n)
Definition: src/tasks/task-cop-equality.cpp:98
tsid::math::ConstraintBase
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition: constraint-base.hpp:35
pinocchio::SE3
context::SE3 SE3
tsid::tasks::TaskContactForce
Definition: task-contact-force.hpp:28
setup.data
data
Definition: setup.in.py:48
tsid::tasks::TaskCopEquality::setContactList
void setContactList(const std::vector< std::shared_ptr< ContactLevel > > *contacts)
Definition: src/tasks/task-cop-equality.cpp:34
demo_quadruped.robot
robot
Definition: demo_quadruped.py:51
constraint-equality.hpp
trajectory-base.hpp
tsid::tasks::TaskCopEquality::m_contact_name
std::string m_contact_name
Definition: tasks/task-cop-equality.hpp:69
demo_quadruped.q
q
Definition: demo_quadruped.py:74
tsid::tasks::TaskCopEquality::compute
const ConstraintBase & compute(double t, ConstRefVector q, ConstRefVector v, Data &data) override
Definition: src/tasks/task-cop-equality.cpp:51
tsid::math::Index
std::size_t Index
Definition: math/fwd.hpp:53
tsid::tasks::TaskCopEquality
Definition: tasks/task-cop-equality.hpp:30
tsid::tasks::TaskCopEquality::getAssociatedContactName
const std::string & getAssociatedContactName() override
Definition: src/tasks/task-cop-equality.cpp:41
fwd.hpp
demo_quadruped.vector
vector
Definition: demo_quadruped.py:49
demo_quadruped.contacts
int contacts
Definition: demo_quadruped.py:98
tsid::tasks::TaskCopEquality::getReference
const Vector3 & getReference() const
Definition: src/tasks/task-cop-equality.cpp:96
tsid::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: math/fwd.hpp:35
tsid::tasks::TaskCopEquality::m_ref
Vector3 m_ref
Definition: tasks/task-cop-equality.hpp:71
inverse-dynamics-formulation-base.hpp
tsid::tasks::TaskCopEquality::getConstraint
const ConstraintBase & getConstraint() const override
Definition: src/tasks/task-cop-equality.cpp:86
tsid::tasks::TaskCopEquality::setReference
void setReference(const Vector3 &ref)
Definition: src/tasks/task-cop-equality.cpp:90
tsid::tasks::TaskCopEquality::Index
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Index Index
Definition: tasks/task-cop-equality.hpp:34
tsid
Definition: bindings/python/constraint/constraint-bound.cpp:21
task-contact-force.hpp
tsid::tasks::TaskCopEquality::getContactNormal
const Vector3 & getContactNormal() const
Definition: src/tasks/task-cop-equality.cpp:100
tsid::robots::RobotWrapper
Wrapper for a robot based on pinocchio.
Definition: robots/robot-wrapper.hpp:37
tsid::tasks::TaskBase::name
const std::string & name() const
Definition: task-base.cpp:25
tsid::tasks::TaskCopEquality::Vector3
math::Vector3 Vector3
Definition: tasks/task-cop-equality.hpp:37
tsid::tasks::TaskCopEquality::SE3
pinocchio::SE3 SE3
Definition: tasks/task-cop-equality.hpp:39
t
Transform3f t
tsid::tasks::TaskCopEquality::ConstraintEquality
math::ConstraintEquality ConstraintEquality
Definition: tasks/task-cop-equality.hpp:38
tsid::tasks::TaskCopEquality::dim
int dim() const override
Return the dimension of the task. \info should be overloaded in the child class.
Definition: src/tasks/task-cop-equality.cpp:39
tsid::tasks::TaskBase::ConstRefVector
math::ConstRefVector ConstRefVector
Definition: task-base.hpp:39
tsid::math::Vector3
Eigen::Matrix< Scalar, 3, 1 > Vector3
Definition: math/fwd.hpp:40
n
Vec3f n
tsid::tasks::TaskCopEquality::Vector
math::Vector Vector
Definition: tasks/task-cop-equality.hpp:36


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