tsid 1.9.0
Efficient Task Space Inverse Dynamics for Multi-body Systems based on Pinocchio
Loading...
Searching...
No Matches
task-joint-posture.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_joint_posture_hpp__
19#define __invdyn_task_joint_posture_hpp__
20
24#include <tsid/deprecated.hh>
25
26namespace tsid {
27namespace tasks {
28
30 public:
31 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
32
38 typedef pinocchio::Data Data;
39
40 TaskJointPosture(const std::string& name, RobotWrapper& robot);
41
42 int dim() const override;
43
44 const ConstraintBase& compute(const double t, ConstRefVector q,
45 ConstRefVector v, Data& data) override;
46
47 const ConstraintBase& getConstraint() const override;
48
49 void setReference(const TrajectorySample& ref);
50 const TrajectorySample& getReference() const override;
51
52 const Vector& getDesiredAcceleration() const override;
53 Vector getAcceleration(ConstRefVector dv) const override;
54
55 TSID_DEPRECATED const Vector& mask() const; // deprecated
56 TSID_DEPRECATED void mask(const Vector& mask); // deprecated
57 void setMask(math::ConstRefVector mask) override;
58
59 const Vector& position_error() const override;
60 const Vector& velocity_error() const override;
61 const Vector& position() const override;
62 const Vector& velocity() const override;
63 const Vector& position_ref() const override;
64 const Vector& velocity_ref() const override;
65
66 const Vector& Kp();
67 const Vector& Kd();
68 void Kp(ConstRefVector Kp);
69 void Kd(ConstRefVector Kp);
70
71 protected:
81};
82
83} // namespace tasks
84} // namespace tsid
85
86#endif // ifndef __invdyn_task_joint_posture_hpp__
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
Definition constraint-base.hpp:22
Definition constraint-equality.hpp:13
robots::RobotWrapper RobotWrapper
Definition task-base.hpp:41
const TrajectorySample & getReference() const override
Definition task-joint-posture.cpp:93
Vector m_Kp
Definition task-joint-posture.hpp:72
trajectories::TrajectorySample TrajectorySample
Definition task-joint-posture.hpp:34
TrajectorySample m_ref
Definition task-joint-posture.hpp:78
int dim() const override
Return the dimension of the task. \info should be overloaded in the child class.
Definition task-joint-posture.cpp:56
void setReference(const TrajectorySample &ref)
Definition task-joint-posture.cpp:76
Vector m_p_error
Definition task-joint-posture.hpp:74
Vector m_ref_q_augmented
Definition task-joint-posture.hpp:79
const Vector & position() const override
Definition task-joint-posture.cpp:107
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Index Index
Definition task-joint-posture.hpp:33
Vector m_p
Definition task-joint-posture.hpp:75
const ConstraintBase & getConstraint() const override
Definition task-joint-posture.cpp:119
Vector getAcceleration(ConstRefVector dv) const override
Definition task-joint-posture.cpp:99
const Vector & Kd()
Definition task-joint-posture.cpp:60
const Vector & position_ref() const override
Definition task-joint-posture.cpp:111
const Vector & velocity() const override
Definition task-joint-posture.cpp:109
Vector m_v
Definition task-joint-posture.hpp:75
const Vector & velocity_error() const override
Definition task-joint-posture.cpp:105
const Vector & getDesiredAcceleration() const override
Definition task-joint-posture.cpp:95
Vector m_v_error
Definition task-joint-posture.hpp:74
TaskJointPosture(const std::string &name, RobotWrapper &robot)
Definition task-joint-posture.cpp:15
VectorXi m_activeAxes
Definition task-joint-posture.hpp:77
const Vector & Kp()
Definition task-joint-posture.cpp:58
math::Vector Vector
Definition task-joint-posture.hpp:35
ConstraintEquality m_constraint
Definition task-joint-posture.hpp:80
pinocchio::Data Data
Definition task-joint-posture.hpp:38
const ConstraintBase & compute(const double t, ConstRefVector q, ConstRefVector v, Data &data) override
Definition task-joint-posture.cpp:123
TSID_DEPRECATED const Vector & mask() const
Definition task-joint-posture.cpp:26
Vector m_a_des
Definition task-joint-posture.hpp:76
const Vector & position_error() const override
Definition task-joint-posture.cpp:103
void setMask(math::ConstRefVector mask) override
Definition task-joint-posture.cpp:34
const Vector & velocity_ref() const override
Definition task-joint-posture.cpp:115
math::ConstraintEquality ConstraintEquality
Definition task-joint-posture.hpp:37
math::VectorXi VectorXi
Definition task-joint-posture.hpp:36
Vector m_Kd
Definition task-joint-posture.hpp:73
TaskMotion(const std::string &name, RobotWrapper &robot)
Definition task-motion.cpp:13
Definition trajectory-base.hpp:33
std::string name(const LieGroupGenericTpl< LieGroupCollection > &lg)
std::size_t Index
Definition fwd.hpp:40
const Eigen::Ref< const Vector > ConstRefVector
Definition fwd.hpp:35
Eigen::VectorXi VectorXi
Definition fwd.hpp:24
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition fwd.hpp:22
Definition fwd.hpp:9
Definition constraint-bound.hpp:25