tasks/task-com-equality.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2017 CNRS
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_com_equality_hpp__
19 #define __invdyn_task_com_equality_hpp__
20 
21 #include "tsid/math/fwd.hpp"
25 
26 namespace tsid {
27 namespace tasks {
28 
29 class TaskComEquality : public TaskMotion {
30  public:
31  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
32 
33  typedef math::Index Index;
38 
39  TaskComEquality(const std::string& name, RobotWrapper& robot);
40 
41  int dim() const override;
42 
44  Data& data) override;
45 
46  const ConstraintBase& getConstraint() const override;
47 
48  void setReference(const TrajectorySample& ref);
49  const TrajectorySample& getReference() const override;
50 
51  const Vector& getDesiredAcceleration() const override;
52  Vector getAcceleration(ConstRefVector dv) const override;
53  virtual void setMask(math::ConstRefVector mask) override;
54 
55  const Vector& position_error() const override;
56  const Vector& velocity_error() const override;
57  const Vector& position() const override;
58  const Vector& velocity() const override;
59  const Vector& position_ref() const override;
60  const Vector& velocity_ref() const override;
61 
62  const Vector3& Kp();
63  const Vector3& Kd();
64  void Kp(ConstRefVector Kp);
65  void Kd(ConstRefVector Kp);
66 
67  protected:
80 };
81 
82 } // namespace tasks
83 } // namespace tsid
84 
85 #endif // ifndef __invdyn_task_com_equality_hpp__
tsid::tasks::TaskComEquality::Kp
const Vector3 & Kp()
Definition: src/tasks/task-com-equality.cpp:56
tsid::tasks::TaskComEquality::dim
int dim() const override
Return the dimension of the task. \info should be overloaded in the child class.
Definition: src/tasks/task-com-equality.cpp:54
demo_quadruped.v
v
Definition: demo_quadruped.py:80
tsid::tasks::TaskComEquality::compute
const ConstraintBase & compute(double t, ConstRefVector q, ConstRefVector v, Data &data) override
Definition: src/tasks/task-com-equality.cpp:106
tsid::tasks::TaskComEquality::velocity
const Vector & velocity() const override
Definition: src/tasks/task-com-equality.cpp:94
tsid::tasks::TaskComEquality::Vector3
math::Vector3 Vector3
Definition: tasks/task-com-equality.hpp:36
tsid::tasks::TaskComEquality::ConstraintEquality
math::ConstraintEquality ConstraintEquality
Definition: tasks/task-com-equality.hpp:37
tsid::trajectories::TrajectorySample
Definition: trajectories/trajectory-base.hpp:33
pinocchio::DataTpl
tsid::math::ConstraintEquality
Definition: math/constraint-equality.hpp:26
task-motion.hpp
tsid::math::ConstraintBase
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition: constraint-base.hpp:35
tsid::tasks::TaskComEquality::TrajectorySample
trajectories::TrajectorySample TrajectorySample
Definition: tasks/task-com-equality.hpp:34
tsid::tasks::TaskComEquality::velocity_error
const Vector & velocity_error() const override
Definition: src/tasks/task-com-equality.cpp:88
tsid::tasks::TaskComEquality::setMask
virtual void setMask(math::ConstRefVector mask) override
Definition: src/tasks/task-com-equality.cpp:42
tsid::tasks::TaskComEquality::m_p_error_masked_vec
Vector m_p_error_masked_vec
Definition: tasks/task-com-equality.hpp:71
tsid::tasks::TaskComEquality::m_v_error_vec
Vector m_v_error_vec
Definition: tasks/task-com-equality.hpp:77
setup.data
data
Definition: setup.in.py:48
demo_quadruped.robot
robot
Definition: demo_quadruped.py:51
tsid::tasks::TaskComEquality::getDesiredAcceleration
const Vector & getDesiredAcceleration() const override
Definition: src/tasks/task-com-equality.cpp:76
tsid::tasks::TaskComEquality::Kd
const Vector3 & Kd()
Definition: src/tasks/task-com-equality.cpp:58
tsid::tasks::TaskComEquality::m_p_com
Vector m_p_com
Definition: tasks/task-com-equality.hpp:76
tsid::tasks::TaskComEquality::m_drift
Vector3 m_drift
Definition: tasks/task-com-equality.hpp:74
tsid::tasks::TaskComEquality::m_Kd
Vector3 m_Kd
Definition: tasks/task-com-equality.hpp:69
constraint-equality.hpp
tsid::tasks::TaskComEquality::m_v_error
Vector3 m_v_error
Definition: tasks/task-com-equality.hpp:70
tsid::tasks::TaskComEquality::m_ref
TrajectorySample m_ref
Definition: tasks/task-com-equality.hpp:78
tsid::tasks::TaskComEquality::position_ref
const Vector & position_ref() const override
Definition: src/tasks/task-com-equality.cpp:96
trajectory-base.hpp
demo_quadruped.q
q
Definition: demo_quadruped.py:74
tsid::tasks::TaskComEquality::m_a_des
Vector3 m_a_des
Definition: tasks/task-com-equality.hpp:72
tsid::tasks::TaskComEquality::setReference
void setReference(const TrajectorySample &ref)
Definition: src/tasks/task-com-equality.cpp:72
tsid::tasks::TaskComEquality::Vector
math::Vector Vector
Definition: tasks/task-com-equality.hpp:35
tsid::math::Index
std::size_t Index
Definition: math/fwd.hpp:53
tsid::tasks::TaskComEquality::m_p_error
Vector3 m_p_error
Definition: tasks/task-com-equality.hpp:70
tsid::tasks::TaskComEquality
Definition: tasks/task-com-equality.hpp:29
tsid::tasks::TaskComEquality::Index
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Index Index
Definition: tasks/task-com-equality.hpp:33
tsid::tasks::TaskComEquality::getAcceleration
Vector getAcceleration(ConstRefVector dv) const override
Definition: src/tasks/task-com-equality.cpp:80
fwd.hpp
tsid::tasks::TaskComEquality::m_a_des_masked
Vector m_a_des_masked
Definition: tasks/task-com-equality.hpp:73
tsid::tasks::TaskComEquality::position
const Vector & position() const override
Definition: src/tasks/task-com-equality.cpp:92
tsid::tasks::TaskComEquality::m_p_error_vec
Vector m_p_error_vec
Definition: tasks/task-com-equality.hpp:77
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::TaskComEquality::position_error
const Vector & position_error() const override
Definition: src/tasks/task-com-equality.cpp:84
tsid
Definition: bindings/python/constraint/constraint-bound.cpp:21
tsid::robots::RobotWrapper
Wrapper for a robot based on pinocchio.
Definition: robots/robot-wrapper.hpp:37
tsid::tasks::TaskComEquality::velocity_ref
const Vector & velocity_ref() const override
Definition: src/tasks/task-com-equality.cpp:98
tsid::tasks::TaskBase::name
const std::string & name() const
Definition: task-base.cpp:25
tsid::tasks::TaskComEquality::m_drift_masked
Vector m_drift_masked
Definition: tasks/task-com-equality.hpp:75
tsid::tasks::TaskComEquality::m_constraint
ConstraintEquality m_constraint
Definition: tasks/task-com-equality.hpp:79
tsid::tasks::TaskComEquality::getReference
const TrajectorySample & getReference() const override
Definition: src/tasks/task-com-equality.cpp:74
t
Transform3f t
tsid::tasks::TaskComEquality::m_Kp
Vector3 m_Kp
Definition: tasks/task-com-equality.hpp:68
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
tsid::tasks::TaskComEquality::m_v_com
Vector m_v_com
Definition: tasks/task-com-equality.hpp:76
tsid::tasks::TaskComEquality::getConstraint
const ConstraintBase & getConstraint() const override
Definition: src/tasks/task-com-equality.cpp:102
tsid::tasks::TaskComEquality::m_a_des_vec
Vector m_a_des_vec
Definition: tasks/task-com-equality.hpp:73
tsid::tasks::TaskComEquality::TaskComEquality
TaskComEquality(const std::string &name, RobotWrapper &robot)
Definition: src/tasks/task-com-equality.cpp:27
tsid::tasks::TaskComEquality::m_v_error_masked_vec
Vector m_v_error_masked_vec
Definition: tasks/task-com-equality.hpp:71


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