tsid 1.9.0
Efficient Task Space Inverse Dynamics for Multi-body Systems based on Pinocchio
Loading...
Searching...
No Matches
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
27namespace tsid {
28namespace tasks {
29
31 public:
32 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
33
39 typedef pinocchio::SE3 SE3;
40
41 TaskCopEquality(const std::string& name, RobotWrapper& robot);
42
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
54 double t, ConstRefVector q, ConstRefVector v, Data& data,
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__
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition constraint-base.hpp:22
Definition constraint-equality.hpp:13
pinocchio::Data Data
Definition task-base.hpp:40
robots::RobotWrapper RobotWrapper
Definition task-base.hpp:41
EIGEN_MAKE_ALIGNED_OPERATOR_NEW TaskContactForce(const std::string &name, RobotWrapper &robot)
Definition task-contact-force.cpp:11
math::Vector Vector
Definition task-cop-equality.hpp:36
Vector3 m_normal
Definition task-cop-equality.hpp:70
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Index Index
Definition task-cop-equality.hpp:34
const std::vector< std::shared_ptr< ContactLevel > > * m_contacts
Definition task-cop-equality.hpp:68
const ConstraintBase & getConstraint() const override
Definition task-cop-equality.cpp:73
const Vector3 & getContactNormal() const
Definition task-cop-equality.cpp:87
ConstraintEquality m_constraint
Definition task-cop-equality.hpp:72
int dim() const override
Return the dimension of the task. \info should be overloaded in the child class.
Definition task-cop-equality.cpp:26
void setContactList(const std::vector< std::shared_ptr< ContactLevel > > *contacts)
Definition task-cop-equality.cpp:21
math::ConstraintEquality ConstraintEquality
Definition task-cop-equality.hpp:38
void setReference(const Vector3 &ref)
Definition task-cop-equality.cpp:77
TaskCopEquality(const std::string &name, RobotWrapper &robot)
Definition task-cop-equality.cpp:13
math::Vector3 Vector3
Definition task-cop-equality.hpp:37
Vector3 m_ref
Definition task-cop-equality.hpp:71
std::string m_contact_name
Definition task-cop-equality.hpp:69
void setContactNormal(const Vector3 &n)
Definition task-cop-equality.cpp:85
trajectories::TrajectorySample TrajectorySample
Definition task-cop-equality.hpp:35
pinocchio::SE3 SE3
Definition task-cop-equality.hpp:39
const std::string & getAssociatedContactName() override
Definition task-cop-equality.cpp:28
const ConstraintBase & compute(double t, ConstRefVector q, ConstRefVector v, Data &data) override
Definition task-cop-equality.cpp:38
const Vector3 & getReference() const
Definition task-cop-equality.cpp:83
Definition trajectory-base.hpp:33
std::string name(const LieGroupGenericTpl< LieGroupCollection > &lg)
Definition contact-6d.hpp:15
std::size_t Index
Definition fwd.hpp:40
Eigen::Matrix< Scalar, 3, 1 > Vector3
Definition fwd.hpp:27
const Eigen::Ref< const Vector > ConstRefVector
Definition fwd.hpp:35
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition fwd.hpp:22
Definition fwd.hpp:9
Definition constraint-bound.hpp:25