Crocoddyl
 
Loading...
Searching...
No Matches
cop-support.hpp
1
2// BSD 3-Clause License
3//
4// Copyright (C) 2021, University of Edinburgh, University of Oxford
5// Copyright note valid unless otherwise stated in individual files.
6// All rights reserved.
8
9#ifndef CROCODDYL_MULTIBODY_COP_SUPPORT_HPP_
10#define CROCODDYL_MULTIBODY_COP_SUPPORT_HPP_
11
12#include "crocoddyl/core/mathbase.hpp"
13#include "crocoddyl/multibody/fwd.hpp"
14
15namespace crocoddyl {
16
25template <typename _Scalar>
27 public:
28 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29
30 typedef _Scalar Scalar;
32 typedef typename MathBase::Vector2s Vector2s;
33 typedef typename MathBase::Vector3s Vector3s;
34 typedef typename MathBase::Vector4s Vector4s;
35 typedef typename MathBase::Matrix3s Matrix3s;
36 typedef typename MathBase::Matrix46s Matrix46s;
37 typedef typename MathBase::Quaternions Quaternions;
38
42 explicit CoPSupportTpl();
43
51 CoPSupportTpl(const Matrix3s& R, const Vector2s& box);
52
59
67
78 void update();
79
83 const Matrix46s& get_A() const;
84
88 const Vector4s& get_ub() const;
89
93 const Vector4s& get_lb() const;
94
98 const Vector2s& get_box() const;
99
104 const Matrix3s& get_R() const;
105
113 void set_R(const Matrix3s& R);
114
121 void set_box(const Vector2s& box);
122
123 CoPSupportTpl<Scalar>& operator=(const CoPSupportTpl<Scalar>& other);
124
125 template <class Scalar>
126 friend std::ostream& operator<<(std::ostream& os,
127 const CoPSupportTpl<Scalar>& X);
128
129 private:
130 Matrix46s A_;
131 Vector4s ub_;
132 Vector4s lb_;
133 Matrix3s R_;
134 Vector2s box_;
135};
136
137} // namespace crocoddyl
138
139#include "crocoddyl/multibody/cop-support.hxx"
140
141#endif // CROCODDYL_MULTIBODY_COP_SUPPORT_HPP_
This class encapsulates a center of pressure support of a 6d contact.
const Vector2s & get_box() const
Return dimension of the center of pressure support (length, width)
const Vector4s & get_lb() const
Return the lower bound of the center of pressure support.
const Matrix3s & get_R() const
Return the rotation matrix that defines the support orientation w.r.t. the inertial frame.
void set_box(const Vector2s &box)
Modify dimension of the center of pressure support (length, width)
CoPSupportTpl(const CoPSupportTpl< Scalar > &support)
Initialize the center of pressure support.
CoPSupportTpl(const Matrix3s &R, const Vector2s &box)
Initialize the center of pressure support.
const Matrix46s & get_A() const
Return the matrix of center of pressure support.
void set_R(const Matrix3s &R)
Modify the rotation matrix that defines the support orientation w.r.t. the inertial frame.
CoPSupportTpl()
Initialize the center of pressure support.
CoPSupportTpl(const WrenchConeTpl< Scalar > &support)
Initialize the center of pressure support.
void update()
Update the matrix of center of pressure inequalities in the world frame.
const Vector4s & get_ub() const
Return the upper bound of the center of pressure support.
This class encapsulates a wrench cone.