hpp-centroidal-dynamics 7.0.0
Utility classes for testing (robust) equilibrium of a system in contact with the environment, and other centroidal dynamics methods.
Loading...
Searching...
No Matches
centroidal_dynamics Namespace Reference

Classes

class  Equilibrium
class  Logger
class  Solver_LP_abstract
 Abstract interface for a Linear Program (LP) solver. More...
class  Solver_LP_qpoases

Typedefs

typedef double value_type
typedef Eigen::Matrix< value_type, 2, 1 > Vector2
typedef Eigen::Matrix< value_type, 1, 2 > RVector2
typedef Eigen::Matrix< value_type, 3, 1 > Vector3
typedef Eigen::Matrix< value_type, 1, 3 > RVector3
typedef Eigen::Matrix< value_type, 6, 1 > Vector6
typedef Eigen::Matrix< value_type, Eigen::Dynamic, 1 > VectorX
typedef Eigen::Matrix< value_type, 1, Eigen::Dynamic > RVectorX
typedef Eigen::Matrix< value_type, 3, 3, Eigen::RowMajor > Rotation
typedef Eigen::Matrix< value_type, Eigen::Dynamic, 2, Eigen::RowMajor > MatrixX2
typedef Eigen::Matrix< value_type, 3, 3, Eigen::RowMajor > Matrix3
typedef Eigen::Matrix< value_type, Eigen::Dynamic, 3, Eigen::RowMajor > MatrixX3
typedef Eigen::Matrix< value_type, 3, Eigen::Dynamic, Eigen::RowMajor > Matrix3X
typedef Eigen::Matrix< value_type, 4, 3, Eigen::RowMajor > Matrix43
typedef Eigen::Matrix< value_type, 6, Eigen::Dynamic, Eigen::RowMajor > Matrix6X
typedef Eigen::Matrix< value_type, 6, 2, Eigen::RowMajor > Matrix62
typedef Eigen::Matrix< value_type, 6, 3, Eigen::RowMajor > Matrix63
typedef Eigen::Matrix< value_type, Eigen::Dynamic, 6, Eigen::RowMajor > MatrixX6
typedef Eigen::Matrix< value_type, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixXX
typedef Eigen::Ref< Vector2Ref_vector2
typedef Eigen::Ref< Vector3Ref_vector3
typedef Eigen::Ref< VectorXRef_vectorX
typedef Eigen::Ref< RotationRef_rotation
typedef Eigen::Ref< MatrixX3Ref_matrixX3
typedef Eigen::Ref< Matrix43Ref_matrix43
typedef Eigen::Ref< Matrix6XRef_matrix6X
typedef Eigen::Ref< MatrixXXRef_matrixXX
typedef const Eigen::Ref< const Vector2 > & Cref_vector2
typedef const Eigen::Ref< const Vector3 > & Cref_vector3
typedef const Eigen::Ref< const Vector6 > & Cref_vector6
typedef const Eigen::Ref< const VectorX > & Cref_vectorX
typedef const Eigen::Ref< const Rotation > & Cref_rotation
typedef const Eigen::Ref< const MatrixX3 > & Cref_matrixX3
typedef const Eigen::Ref< const Matrix43 > & Cref_matrix43
typedef const Eigen::Ref< const Matrix6X > & Cref_matrix6X
typedef const Eigen::Ref< const Matrix63 > & Cref_matrix63
typedef const Eigen::Ref< const MatrixXX > & Cref_matrixXX
typedef Eigen::Matrix< value_type, Eigen::Dynamic, 3, Eigen::ColMajor > MatrixX3ColMajor
typedef Eigen::Matrix< value_type, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > MatrixXXColMajor
typedef const Eigen::Ref< const MatrixX3ColMajor > & Cref_matrixX3ColMajor
typedef Eigen::Ref< MatrixXXColMajor > & ref_matrixXXColMajor

Functions

template<typename T>
std::string toString (const T &v)
template<typename T>
std::string toString (const std::vector< T > &v, const std::string separator=", ")
template<typename T, int n>
std::string toString (const Eigen::MatrixBase< T > &v, const std::string separator=", ")
LoggergetLogger ()
template<class Matrix>
bool writeMatrixToFile (const std::string &filename, const Matrix &matrix)
template<class Matrix>
bool readMatrixFromFile (const std::string &filename, Matrix &matrix)
dd_MatrixPtr cone_span_eigen_to_cdd (Cref_matrixXX input, const bool canonicalize=false)
Rotation crossMatrix (Cref_vector3 x)
void init_cdd_library ()
void release_cdd_library ()
void uniform3 (Cref_vector3 lower_bounds, Cref_vector3 upper_bounds, Ref_vector3 out)
void uniform (Cref_matrixXX lower_bounds, Cref_matrixXX upper_bounds, Ref_matrixXX out)
void euler_matrix (double roll, double pitch, double yaw, Ref_rotation R)
bool generate_rectangle_contacts (double lx, double ly, Cref_vector3 pos, Cref_vector3 rpy, Ref_matrix43 p, Ref_matrix43 N)
std::string getDateAndTimeAsString ()
value_type nchoosek (const int n, const int k)
template<typename DerivedV, typename DerivedU>
void doCombs (Eigen::Matrix< typename DerivedU::Scalar, 1, Eigen::Dynamic > &running, int &running_i, int &running_j, Eigen::PlainObjectBase< DerivedU > &U, const Eigen::MatrixBase< DerivedV > &V, int offset, int k)
template<typename DerivedV, typename DerivedU>
void nchoosek (const Eigen::MatrixBase< DerivedV > &V, const int k, Eigen::PlainObjectBase< DerivedU > &U)

Typedef Documentation

◆ Cref_matrix43

typedef const Eigen::Ref<const Matrix43>& centroidal_dynamics::Cref_matrix43

◆ Cref_matrix63

typedef const Eigen::Ref<const Matrix63>& centroidal_dynamics::Cref_matrix63

◆ Cref_matrix6X

typedef const Eigen::Ref<const Matrix6X>& centroidal_dynamics::Cref_matrix6X

◆ Cref_matrixX3

typedef const Eigen::Ref<const MatrixX3>& centroidal_dynamics::Cref_matrixX3

◆ Cref_matrixX3ColMajor

◆ Cref_matrixXX

typedef const Eigen::Ref<const MatrixXX>& centroidal_dynamics::Cref_matrixXX

◆ Cref_rotation

typedef const Eigen::Ref<const Rotation>& centroidal_dynamics::Cref_rotation

◆ Cref_vector2

typedef const Eigen::Ref<const Vector2>& centroidal_dynamics::Cref_vector2

◆ Cref_vector3

typedef const Eigen::Ref<const Vector3>& centroidal_dynamics::Cref_vector3

◆ Cref_vector6

typedef const Eigen::Ref<const Vector6>& centroidal_dynamics::Cref_vector6

◆ Cref_vectorX

typedef const Eigen::Ref<const VectorX>& centroidal_dynamics::Cref_vectorX

◆ Matrix3

typedef Eigen::Matrix<value_type, 3, 3, Eigen::RowMajor> centroidal_dynamics::Matrix3

◆ Matrix3X

typedef Eigen::Matrix<value_type, 3, Eigen::Dynamic, Eigen::RowMajor> centroidal_dynamics::Matrix3X

◆ Matrix43

typedef Eigen::Matrix<value_type, 4, 3, Eigen::RowMajor> centroidal_dynamics::Matrix43

◆ Matrix62

typedef Eigen::Matrix<value_type, 6, 2, Eigen::RowMajor> centroidal_dynamics::Matrix62

◆ Matrix63

typedef Eigen::Matrix<value_type, 6, 3, Eigen::RowMajor> centroidal_dynamics::Matrix63

◆ Matrix6X

typedef Eigen::Matrix<value_type, 6, Eigen::Dynamic, Eigen::RowMajor> centroidal_dynamics::Matrix6X

◆ MatrixX2

typedef Eigen::Matrix<value_type, Eigen::Dynamic, 2, Eigen::RowMajor> centroidal_dynamics::MatrixX2

◆ MatrixX3

typedef Eigen::Matrix<value_type, Eigen::Dynamic, 3, Eigen::RowMajor> centroidal_dynamics::MatrixX3

◆ MatrixX3ColMajor

typedef Eigen::Matrix<value_type, Eigen::Dynamic, 3, Eigen::ColMajor> centroidal_dynamics::MatrixX3ColMajor

Column major definitions for compatibility with classical eigen use

◆ MatrixX6

typedef Eigen::Matrix<value_type, Eigen::Dynamic, 6, Eigen::RowMajor> centroidal_dynamics::MatrixX6

◆ MatrixXX

typedef Eigen::Matrix<value_type, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> centroidal_dynamics::MatrixXX

◆ MatrixXXColMajor

typedef Eigen::Matrix<value_type, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor> centroidal_dynamics::MatrixXXColMajor

◆ Ref_matrix43

◆ Ref_matrix6X

◆ Ref_matrixX3

◆ Ref_matrixXX

◆ ref_matrixXXColMajor

◆ Ref_rotation

◆ Ref_vector2

◆ Ref_vector3

◆ Ref_vectorX

◆ Rotation

typedef Eigen::Matrix<value_type, 3, 3, Eigen::RowMajor> centroidal_dynamics::Rotation

◆ RVector2

typedef Eigen::Matrix<value_type, 1, 2> centroidal_dynamics::RVector2

◆ RVector3

typedef Eigen::Matrix<value_type, 1, 3> centroidal_dynamics::RVector3

◆ RVectorX

typedef Eigen::Matrix<value_type, 1, Eigen::Dynamic> centroidal_dynamics::RVectorX

◆ value_type

◆ Vector2

typedef Eigen::Matrix<value_type, 2, 1> centroidal_dynamics::Vector2

◆ Vector3

typedef Eigen::Matrix<value_type, 3, 1> centroidal_dynamics::Vector3

◆ Vector6

typedef Eigen::Matrix<value_type, 6, 1> centroidal_dynamics::Vector6

◆ VectorX

typedef Eigen::Matrix<value_type, Eigen::Dynamic, 1> centroidal_dynamics::VectorX

Function Documentation

◆ cone_span_eigen_to_cdd()

dd_MatrixPtr centroidal_dynamics::cone_span_eigen_to_cdd(Cref_matrixXXinput,
const boolcanonicalize = false )

Convert the specified list of rays from Eigen to cdd format.

Parameters
inputThe mXn input Eigen matrix contains m rays of dimension n.
boolwhether to remove redundant inequalities
Returns
The mX(n+1) output cdd matrix, which contains an additional column, the first one, with all zeros.

◆ crossMatrix()

Rotation centroidal_dynamics::crossMatrix(Cref_vector3x)

Compute the cross-product skew-symmetric matrix associated to the specified vector.

◆ doCombs()

template<typename DerivedV, typename DerivedU>
void centroidal_dynamics::doCombs(Eigen::Matrix< typename DerivedU::Scalar, 1, Eigen::Dynamic > &running,
int &running_i,
int &running_j,
Eigen::PlainObjectBase< DerivedU > &U,
const Eigen::MatrixBase< DerivedV > &V,
intoffset,
intk )

◆ euler_matrix()

void centroidal_dynamics::euler_matrix(doubleroll,
doublepitch,
doubleyaw,
Ref_rotationR )

◆ generate_rectangle_contacts()

bool centroidal_dynamics::generate_rectangle_contacts(doublelx,
doublely,
Cref_vector3pos,
Cref_vector3rpy,
Ref_matrix43p,
Ref_matrix43N )

◆ getDateAndTimeAsString()

std::string centroidal_dynamics::getDateAndTimeAsString()

◆ getLogger()

Logger & centroidal_dynamics::getLogger()

Method to get the logger (singleton).

◆ init_cdd_library()

void centroidal_dynamics::init_cdd_library()

◆ nchoosek() [1/2]

template<typename DerivedV, typename DerivedU>
void centroidal_dynamics::nchoosek(const Eigen::MatrixBase< DerivedV > &V,
const intk,
Eigen::PlainObjectBase< DerivedU > &U )

Computes a matrix C containing all possible combinations of the elements of vector v taken k at a time. Matrix C has k columns and n!/((n–k)! k!) rows, where n is length(v).

Parameters
Vn-long vector of elements
ksize of sub-set to consider
Uresult matrix
Returns
nchoosek by k long matrix where each row is a unique k-size the first one, with all zeros.

◆ nchoosek() [2/2]

value_type centroidal_dynamics::nchoosek(const intn,
const intk )

Computes a binomal coefficient

Returns
n!/((n–k)! k!).

◆ readMatrixFromFile()

template<class Matrix>
bool centroidal_dynamics::readMatrixFromFile(const std::string &filename,
Matrix &matrix )

Read a matrix from the specified input binary file.

◆ release_cdd_library()

void centroidal_dynamics::release_cdd_library()

◆ toString() [1/3]

template<typename T, int n>
std::string centroidal_dynamics::toString(const Eigen::MatrixBase< T > &v,
const std::stringseparator = ", " )

◆ toString() [2/3]

template<typename T>
std::string centroidal_dynamics::toString(const std::vector< T > &v,
const std::stringseparator = ", " )

◆ toString() [3/3]

template<typename T>
std::string centroidal_dynamics::toString(const T &v)

◆ uniform()

void centroidal_dynamics::uniform(Cref_matrixXXlower_bounds,
Cref_matrixXXupper_bounds,
Ref_matrixXXout )

◆ uniform3()

void centroidal_dynamics::uniform3(Cref_vector3lower_bounds,
Cref_vector3upper_bounds,
Ref_vector3out )

◆ writeMatrixToFile()

template<class Matrix>
bool centroidal_dynamics::writeMatrixToFile(const std::string &filename,
const Matrix &matrix )

Write the specified matrix to a binary file with the specified name.