iDynTree/EigenHelpers.h file

Namespaces

namespace iDynTree

Classes

template<typename>
struct iDynTree::is_sparsematrix
template<iDynTree::MatrixStorageOrdering ordering>
struct iDynTree::is_sparsematrix<iDynTree::SparseMatrix<ordering>>

Typedefs

using iDynTreeEigenVector = Eigen::Map<Eigen::VectorXd>
using iDynTreeEigenConstVector = Eigen::Map<const Eigen::VectorXd>
using iDynTreeEigenMatrix = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
using iDynTreeEigenConstMatrix = const Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
using iDynTreeEigenMatrixMap = Eigen::Map<iDynTreeEigenMatrix>
using iDynTreeEigenConstMatrixMap = Eigen::Map<iDynTreeEigenConstMatrix>

Functions

auto toEigen(VectorDynSize& vec) -> Eigen::Map<Eigen::VectorXd>
auto toEigen(MatrixDynSize& mat) -> Eigen::Map<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>>
auto toEigen(const VectorDynSize& vec) -> Eigen::Map<const Eigen::VectorXd>
auto toEigen(Span<const double> vec) -> Eigen::Map<const Eigen::VectorXd>
auto toEigen(const MatrixView<const double>& mat) -> Eigen::Map<const Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>, 0, Eigen::Stride<Eigen::Dynamic, Eigen::Dynamic>>
auto toEigen(const MatrixView<double>& mat) -> Eigen::Map<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>, 0, Eigen::Stride<Eigen::Dynamic, Eigen::Dynamic>>
auto toEigen(const MatrixDynSize& mat) -> Eigen::Map<const Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>>
template<unsigned int VecSize>
auto toEigen(VectorFixSize<VecSize>& vec) -> Eigen::Map<Eigen::Matrix<double, VecSize, 1>>
template<unsigned int VecSize>
auto toEigen(const VectorFixSize<VecSize>& vec) -> Eigen::Map<const Eigen::Matrix<double, VecSize, 1>>
template<unsigned int nRows, unsigned int nCols>
auto toEigen(MatrixFixSize<nRows, nCols>& mat) -> Eigen::Map<Eigen::Matrix<double, nRows, nCols, Eigen::RowMajor>>
template<unsigned int nRows>
auto toEigen(MatrixFixSize<nRows, 1>& mat) -> Eigen::Map<Eigen::Matrix<double, nRows, 1>>
template<unsigned int nCols>
auto toEigen(MatrixFixSize<1, nCols>& mat) -> Eigen::Map<Eigen::Matrix<double, 1, nCols>>
template<unsigned int nRows, unsigned int nCols>
auto toEigen(const MatrixFixSize<nRows, nCols>& mat) -> Eigen::Map<const Eigen::Matrix<double, nRows, nCols, Eigen::RowMajor>>
auto toEigen(const SpatialMotionVector& vec) -> const Eigen::Matrix<double, 6, 1>
auto toEigen(const SpatialForceVector& vec) -> const Eigen::Matrix<double, 6, 1>
void fromEigen(SpatialMotionVector& vec, const Eigen::Matrix<double, 6, 1>& eigVec)
void fromEigen(SpatialForceVector& vec, const Eigen::Matrix<double, 6, 1>& eigVec)
void fromEigen(Transform& trans, const Eigen::Matrix4d& eigMat)
template<class Derived>
auto skew(const Eigen::MatrixBase<Derived>& vec) -> Eigen::Matrix<typename Derived::Scalar, 3, 3, Eigen::RowMajor>
template<class Derived>
auto unskew(const Eigen::MatrixBase<Derived>& mat) -> Eigen::Matrix<typename Derived::Scalar, 3, 1>
template<class Derived>
auto wedge6dTo4x4d(const Eigen::MatrixBase<Derived>& vec) -> Eigen::Matrix<typename Derived::Scalar, 4, 4, Eigen::RowMajor>
Convert a spatial motion vector to its 4x4 matrix representation (wedge operator) For a spatial motion vector [v; ω], the wedge is [ω^, v; 0, 0].
template<class Derived>
auto vee4x4dTo6d(const Eigen::MatrixBase<Derived>& mat) -> Eigen::Matrix<typename Derived::Scalar, 6, 1>
Convert a 4x4 matrix to a spatial motion vector (vee operator) This is the inverse of the wedge operator For a 4x4 matrix [ω^, v; 0, 0], the vee is [v; ω].
template<unsigned int nRows, unsigned int nCols, typename iDynTreeMatrixType>
void setSubMatrix(iDynTreeMatrixType& mat, const IndexRange rowRange, const IndexRange colRange, const MatrixFixSize<nRows, nCols>& subMat)
Submatrix helpers.
template<typename iDynTreeMatrixType, typename EigMatType>
void setSubMatrix(iDynTreeMatrixType& mat, const IndexRange rowRange, const IndexRange colRange, const EigMatType& subMat)
template<typename iDynTreeMatrixType>
void setSubMatrix(iDynTreeMatrixType& mat, const IndexRange rowRange, const IndexRange colRange, const double subMat)
template<typename iDynTreeMatrixType>
void setSubMatrixToIdentity(iDynTreeMatrixType& mat, const IndexRange rowRange, const IndexRange colRange)
template<typename iDynTreeMatrixType>
void setSubMatrixToMinusIdentity(iDynTreeMatrixType& mat, const IndexRange rowRange, const IndexRange colRange)
template<unsigned int size>
void setSubVector(VectorDynSize& vec, const IndexRange range, const VectorFixSize<size>& subVec)
void setSubVector(VectorDynSize& vec, const IndexRange range, double subVec)
void setSubVector(VectorDynSize& vec, const IndexRange range, const SpatialMotionVector& twist)
void setSubVector(VectorDynSize& vec, const IndexRange range, const SpatialForceVector& wrench)
template<typename T>
void setSubVector(VectorDynSize& vec, const IndexRange range, const T& subVec)