crocoddyl 1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (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/multibody/fwd.hpp"
13#include "crocoddyl/core/mathbase.hpp"
14
15namespace crocoddyl {
16
24template <typename _Scalar>
26 public:
27 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
28
29 typedef _Scalar Scalar;
31 typedef typename MathBase::Vector2s Vector2s;
32 typedef typename MathBase::Vector3s Vector3s;
33 typedef typename MathBase::Vector4s Vector4s;
34 typedef typename MathBase::Matrix3s Matrix3s;
35 typedef typename MathBase::Matrix46s Matrix46s;
36 typedef typename MathBase::Quaternions Quaternions;
37
41 explicit CoPSupportTpl();
42
49 CoPSupportTpl(const Matrix3s& R, const Vector2s& box);
50
57
65
75 void update();
76
80 const Matrix46s& get_A() const;
81
85 const Vector4s& get_ub() const;
86
90 const Vector4s& get_lb() const;
91
95 const Vector2s& get_box() const;
96
100 const Matrix3s& get_R() const;
101
107 void set_R(const Matrix3s& R);
108
114 void set_box(const Vector2s& box);
115
116 CoPSupportTpl<Scalar>& operator=(const CoPSupportTpl<Scalar>& other);
117
118 template <class Scalar>
119 friend std::ostream& operator<<(std::ostream& os, const CoPSupportTpl<Scalar>& X);
120
121 private:
122 Matrix46s A_;
123 Vector4s ub_;
124 Vector4s lb_;
125 Matrix3s R_;
126 Vector2s box_;
127};
128
129} // namespace crocoddyl
130
131#include "crocoddyl/multibody/cop-support.hxx"
132
133#endif // CROCODDYL_MULTIBODY_COP_SUPPORT_HPP_
This class encapsulates a center of pressure support of a 6d contact.
Definition: cop-support.hpp:25
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.
Definition: wrench-cone.hpp:30