auto parseRotationMatrix ( const yarp::os::Searchable& rf,
const std::string& key,
iDynTree:: Rotation & rotation) -> bool
Takes a rotation matrix from configuration file.
auto toiDynTree ( const yarp::sig::Vector& yarpVector,
iDynTree:: Wrench & iDynTreeWrench) -> bool
Convert a yarp::sig::Vector to a iDynTree:: Wrench .
auto toYarp ( const iDynTree:: Wrench & iDynTreeWrench,
yarp::sig::Vector& yarpVector) -> bool
Convert a iDynTree:: Wrench to a yarp::sig::Vector.
auto toiDynTree ( const yarp::sig::Vector& yarpVector,
iDynTree:: Position & iDynTreePosition) -> bool
Convert a yarp::sig::Vector to a iDynTree:: Position .
auto toiDynTree ( const yarp::sig::Vector& yarpVector,
iDynTree:: Vector3 & iDynTreeVector3) -> bool
Convert a yarp::sig::Vector to a iDynTree::Vector3.
auto toYarp ( const iDynTree:: Position & iDynTreePosition,
yarp::sig::Vector& yarpVector) -> bool
Convert a iDynTree:: Position to a yarp::sig::Vector of 3 elements.
auto toiDynTree ( const yarp::sig::Vector& yarpVector,
iDynTree:: Direction & iDynTreeDirection) -> bool
Convert a yarp::sig::Vector of 3 elements to a iDynTree:: Direction .
auto toYarp ( const iDynTree:: Vector3 & iDynTreeDirection,
yarp::sig::Vector& yarpVector) -> bool
Convert a iDynTree:: Direction to a yarp::sig::Vector of 3 elements.
auto toiDynTree ( const yarp::sig::Matrix& yarpHomogeneousMatrix,
iDynTree:: Transform & iDynTreeTransform) -> bool
Convert a 4x4 yarp::sig::Matrix representing an homegeneous matrix to a iDynTree:: Transform .
auto toYarp ( const iDynTree:: Transform & iDynTreeTransform,
yarp::sig::Matrix& yarpHomogeneousMatrix) -> bool
Convert a iDynTree:: Transform to a 4x4 yarp::sig::Matrix representing an homegeneous matrix.
auto toiDynTree ( const yarp::sig::Vector& yarpVector,
iDynTree:: VectorDynSize & iDynTreeVector) -> bool
Convert a yarp::sig::Vector to a iDynTree:: VectorDynSize .
template<typename VectorType>
void toYarp ( const VectorType& iDynTreeVector,
yarp::sig::Vector& yarpVector)
Convert a iDynTree:: VectorFixSize to a yarp::sig::Vector.
template<typename MatrixType>
void toYarp ( const MatrixType& iDynTreeMatrix,
yarp::sig::Matrix& yarpMatrix)
Convert a iDynTree:: MatrixFixSize to a yarp::sig::Matrix.
template<typename VectorType>
auto toiDynTree ( const yarp::sig::Vector& yarpVector,
VectorType& iDynTreeVector) -> bool
Convert a yarp::sig::Vector to a iDynTree:: VectorFixSize .
template<typename MatrixType>
auto toiDynTree ( const yarp::sig::Matrix& yarpMatrix,
MatrixType& iDynTreeMatrix) -> bool
Convert a yarp::sig::Matrix to a iDynTree:: MatrixFixSize .
auto toEigen ( yarp::sig::Vector& yarpVector) -> Eigen::Map<Eigen::VectorXd>
Convert a yarp::sig::Vector to a Eigen::Map<Eigen::VectorXd> object.
auto toEigen ( yarp::sig::Matrix& yarpMatrix) -> Eigen::Map<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>>
Convert a yarp::sig::Matrix to a Eigen::Map< Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> > object.
auto toEigen ( const yarp::sig::Vector& yarpVector) -> Eigen::Map<const Eigen::VectorXd>
Convert a const yarp::sig::Vector to a Eigen::Map<const Eigen::VectorXd> object.
auto toEigen ( const yarp::sig::Matrix& yarpMatrix) -> Eigen::Map<const Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>>
Convert a const yarp::sig::Matrix to a Eigen::Map< const Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> > object.
auto estimateInertialParametersFromLinkBoundingBoxesAndTotalMass ( const double totalMass,
iDynTree:: Model & model,
VectorDynSize & estimatedInertialParams) -> bool
Estimate the inertial parameters of a model using link bounding boxes and the total mass.
auto computeBoundingBoxFromShape ( const SolidShape & geom,
Box & box) -> bool
Compute bounding box from a solid shape object.
auto computeBoxVertices ( const Box box) -> std::vector<Position >
Get the bounding box vertices in the link frame.
auto approximateSolidShapesWithPrimitiveShape ( const Model & inputModel,
Model & outputModel,
ApproximateSolidShapesWithPrimitiveShapeOptions options = ApproximateSolidShapesWithPrimitiveShapeOptions ()) -> bool
\function Approximate solid shapes of the input model with some primitive shapes.
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<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)
template<typename MapType>
void pseudoInverse_helper2 ( const MapType& A,
Eigen::JacobiSVD<Eigen::MatrixXd>& svdDecomposition,
MapType& Apinv,
double tolerance,
unsigned int computationOptions = Eigen::ComputeThinU|Eigen::ComputeThinV)
template<typename MapType>
void pseudoInverse_helper1 ( const MapType& A,
Eigen::JacobiSVD<Eigen::MatrixXd>& svdDecomposition,
MapType& Apinv,
double tolerance,
unsigned int computationOptions = Eigen::ComputeThinU|Eigen::ComputeThinV)
template<typename MapType>
void pseudoInverse ( const MapType A,
MapType Apinv,
double tolerance,
unsigned int computationOptions = Eigen::ComputeThinU|Eigen::ComputeThinV)
auto toEigen ( iDynTree:: SparseMatrix <iDynTree::RowMajor>& mat) -> Eigen::Map<Eigen::SparseMatrix<double, Eigen::RowMajor>>
auto toEigen ( const iDynTree:: SparseMatrix <iDynTree::RowMajor>& mat) -> Eigen::Map<const Eigen::SparseMatrix<double, Eigen::RowMajor>>
auto toEigen ( iDynTree:: SparseMatrix <iDynTree::ColumnMajor>& mat) -> Eigen::Map<Eigen::SparseMatrix<double, Eigen::ColMajor>>
auto toEigen ( const iDynTree:: SparseMatrix <iDynTree::ColumnMajor>& mat) -> Eigen::Map<const Eigen::SparseMatrix<double, Eigen::ColMajor>>
template<class ElementType>
auto make_matrix_view ( ElementType* ptr,
typename MatrixView <ElementType>::index_type rows,
typename MatrixView <ElementType>::index_type cols,
const MatrixStorageOrdering& order = MatrixStorageOrdering::RowMajor) -> IDYNTREE_CONSTEXPR MatrixView <ElementType>
template<class Container, std::enable_if_t<MatrixViewInternal::has_IsRowMajor<Container>::value||std::is_same<MatrixView<typename Container::value_type>, Container>::value, int> = 0>
auto make_matrix_view ( Container& cont) -> IDYNTREE_CONSTEXPR MatrixView <typename Container::value_type>
template<class Container, std::enable_if_t<MatrixViewInternal::has_IsRowMajor<Container>::value||std::is_same<MatrixView<const typename Container::value_type>, Container>::value, int> = 0>
auto make_matrix_view ( const Container& cont) -> IDYNTREE_CONSTEXPR MatrixView <const typename Container::value_type>
template<class Container, std::enable_if_t<!MatrixViewInternal::has_IsRowMajor<Container>::value && !std::is_same<MatrixView<typename Container::value_type>, Container>::value, int> = 0>
auto make_matrix_view ( Container& cont,
const MatrixStorageOrdering& order = MatrixStorageOrdering::RowMajor) -> IDYNTREE_CONSTEXPR MatrixView <typename Container::value_type>
template<class Container, std::enable_if_t<!MatrixViewInternal::has_IsRowMajor<Container>::value && !std::is_same<MatrixView<typename Container::value_type>, Container>::value, int> = 0>
auto make_matrix_view ( const Container& cont,
const MatrixStorageOrdering& order = MatrixStorageOrdering::RowMajor) -> IDYNTREE_CONSTEXPR MatrixView <const typename Container::value_type>
IDYNTREE_DEPRECATED_WITH_MSG ("iDynTree::PositionRaw is deprecated,
use iDynTree:: Position ") typedef Position PositionRaw
auto squareCrossProductMatrix ( const Eigen::Vector3d& v) -> Eigen::Matrix3d
Maps a 3d vector to the square of the cross product matrix: v --> (v\times)^2 or, if you prefer another notation: v --> S^2(v)
auto skew ( const Eigen::Vector3d& vec) -> Eigen::Matrix3d
Maps a 3d vector to the cross product matrix: v --> (v\times) or, if you prefer another notation: v --> S(v)
template<typename vector6d>
void efficient6dCopy ( vector6d* pthis,
const vector6d& other)
Efficient version of the copy from one 6D vector to another.
template<typename vector6d>
auto efficient6dSum ( const vector6d& op1,
const vector6d& op2) -> vector6d
Efficient version of the sum of two 6D vectors.
template<typename vector6d>
auto efficient6ddifference ( const vector6d& op1,
const vector6d& op2) -> vector6d
Efficient version of the different of two 6D vectors.
template<typename twistType, typename motionVectorType, typename resultType>
auto efficientTwistCrossTwist ( const twistType& op1,
const motionVectorType& op2) -> resultType
Efficient version of the cross product between a twist and a spatial motion vector (another twist, acceleration, ..)
template<typename twistType, typename momentumVectorType, typename resultType>
auto efficientTwistCrossMomentum ( const twistType& op1,
const momentumVectorType& op2) -> resultType
Efficient version of the cross product between a twist and a spatial force vector (momentum, wrench, ..)
IDYNTREE_DEPRECATED_WITH_MSG ("iDynTree::RotationRaw is deprecated,
use iDynTree:: Rotation ") typedef Rotation RotationRaw
IDYNTREE_DEPRECATED_WITH_MSG ("iDynTree::RotationalInertiaRaw is deprecated,
use iDynTree:: RotationalInertia ") typedef RotationalInertia RotationalInertiaRaw
auto isValidRotationMatrix ( const iDynTree:: Rotation & r) -> bool
Check if the rotation matrix is valid.
auto geodesicL2Distance ( const iDynTree:: Rotation & rotation1,
const iDynTree:: Rotation & rotation2) -> double
Computes the geodesic distance between two rotation matrices.
auto geodesicL2MeanRotation ( const std::vector<iDynTree:: Rotation >& inputRotations,
iDynTree:: Rotation & meanRotation,
const GeodesicL2MeanOptions & options = GeodesicL2MeanOptions ()) -> bool
Computes the geodesic mean amongst the provided rotations.
auto geodesicL2WeightedMeanRotation ( const std::vector<iDynTree:: Rotation >& inputRotations,
const std::vector<double>& weights,
iDynTree:: Rotation & meanRotation,
const GeodesicL2MeanOptions & options = GeodesicL2MeanOptions ()) -> bool
Computes the weighted geodesic mean amongst the provided rotations.
template<class ElementType, std::ptrdiff_t FirstExtent, std::ptrdiff_t SecondExtent>
auto operator== ( Span <ElementType, FirstExtent> l,
Span <ElementType, SecondExtent> r) -> IDYNTREE_CONSTEXPR bool
template<class ElementType, std::ptrdiff_t Extent>
auto operator!= ( Span <ElementType, Extent> l,
Span <ElementType, Extent> r) -> IDYNTREE_CONSTEXPR bool
template<class ElementType, std::ptrdiff_t Extent>
auto operator< ( Span <ElementType, Extent> l,
Span <ElementType, Extent> r) -> IDYNTREE_CONSTEXPR bool
template<class ElementType, std::ptrdiff_t Extent>
auto operator<= ( Span <ElementType, Extent> l,
Span <ElementType, Extent> r) -> IDYNTREE_CONSTEXPR bool
template<class ElementType, std::ptrdiff_t Extent>
auto operator> ( Span <ElementType, Extent> l,
Span <ElementType, Extent> r) -> IDYNTREE_CONSTEXPR bool
template<class ElementType, std::ptrdiff_t Extent>
auto operator>= ( Span <ElementType, Extent> l,
Span <ElementType, Extent> r) -> IDYNTREE_CONSTEXPR bool
template<class ElementType>
auto make_span ( ElementType* ptr,
typename Span <ElementType>::index_type count) -> IDYNTREE_CONSTEXPR Span <ElementType>
template<class ElementType>
auto make_span ( ElementType* firstElem,
ElementType* lastElem) -> IDYNTREE_CONSTEXPR Span <ElementType>
template<class ElementType, std::size_t N>
auto make_span ( ElementType(&arr)[N]) -> IDYNTREE_CONSTEXPR Span <ElementType, N> noexcept
template<class Container>
auto make_span ( Container& cont) -> IDYNTREE_CONSTEXPR Span <typename Container::value_type>
template<class Container, typename = typename std::enable_if<SpanUtils::is_value_defined<Container>::value>::type>
auto make_span ( const Container& cont) -> IDYNTREE_CONSTEXPR Span <const typename Container::value_type>
template<class Ptr>
auto make_span ( Ptr& cont,
std::ptrdiff_t count) -> IDYNTREE_CONSTEXPR Span <typename Ptr::element_type>
template<class Ptr, typename = typename std::enable_if<!SpanUtils::is_value_defined<Ptr>::value&& SpanUtils::is_element_defined<Ptr>::value>::type>
auto make_span ( Ptr& cont) -> IDYNTREE_CONSTEXPR Span <typename Ptr::element_type>
template<class Container, typename = typename std::enable_if<!SpanUtils::is_value_defined<Container>::value&& !SpanUtils::is_element_defined<Container>::value&& SpanUtils::has_data_method<Container>::value>::type>
auto make_span ( Container& cont) -> IDYNTREE_CONSTEXPR Span <typename std::remove_pointer<decltype(std::declval<Container>).data())>::type>
void assertStringAreEqual ( const std::string& val1,
const std::string& val2,
double tol = DEFAULT_TOL,
std::string file = "",
int line = -1)
void assertDoubleAreEqual ( const double& val1,
const double& val2,
double tol = DEFAULT_TOL,
std::string file = "",
int line = -1)
void assertTransformsAreEqual ( const Transform & trans1,
const Transform & trans2,
double tol = DEFAULT_TOL,
std::string file = "",
int line = -1)
Assert that two transforms are equal, and exit with EXIT_FAILURE if they are not.
void assertSpatialMotionAreEqual ( const SpatialMotionVector & t1,
const SpatialMotionVector & t2,
double tol = DEFAULT_TOL,
std::string file = "",
int line = -1)
Assert that two spatial motion vectors are equal, and exit with EXIT_FAILURE if they are not.
void assertSpatialForceAreEqual ( const SpatialForceVector & f1,
const SpatialForceVector & f2,
double tol = DEFAULT_TOL,
std::string file = "",
int line = -1)
Assert that two spatial force vectors are equal, and exit with EXIT_FAILURE if they are not.
void assertTrue ( bool prop,
std::string file = "",
int line = -1)
auto getRandomBool ( ) -> bool
Get random bool.
auto getRandomDouble ( double min = 0.0,
double max = 1.0) -> double
Get a random double between min and max .
auto getRandomInteger ( int min,
int max) -> int
Get a random integer between min and max (included).
template<typename VectorType>
void getRandomVector ( VectorType& vec,
double min = 0.0,
double max = 1.0)
Fill a vector with random double.
template<typename MatrixType>
void getRandomMatrix ( MatrixType& mat)
Fill a matrix of random doubles.
auto getRandomPosition ( ) -> Position
Get a random position.
auto getRandomRotation ( ) -> Rotation
Get a random rotation.
auto getRandomTransform ( ) -> Transform
Get a random transform.
auto getRandomAxis ( ) -> Axis
Get a random axis.
auto getRandomInertia ( ) -> SpatialInertia
Get a random (but physically consistent) inertia.
auto getRandomTwist ( ) -> SpatialMotionVector
Get a random twist-like 6D vector.
auto getRandomWrench ( ) -> SpatialForceVector
Get a random wrench-like 6D object.
template<typename VectorType>
void printVector ( std::string,
const VectorType& vec)
Helper for printing vectors.
template<typename VectorType1, typename VectorType2>
void printVectorDifference ( std::string name,
const VectorType1& vec1,
const VectorType2& vec2)
Helper for printing difference of two vectors.
void printVectorWrongElements ( std::string name,
std::vector<bool>& correctElems)
Helper for printing the patter of wrong elements in between two vectors.
void printMatrixWrongElements ( std::string name,
std::vector<std::vector<TestMatrixMismatch >>& correctElems)
Helper for printing the patter of wrong elements in between two matrix.
template<typename MatrixType1, typename MatrixType2>
void printMatrixPercentageError ( const MatrixType1& mat1,
const MatrixType2& mat2)
Helper for printing the patter of wrong elements in between two matrix.
template<typename VectorType1, typename VectorType2>
void assertVectorAreEqual ( const VectorType1& vec1,
const VectorType2& vec2,
double tol,
std::string file,
int line)
Assert that two vectors are equal, and exit with EXIT_FAILURE if they are not.
template<typename VectorType1, typename VectorType2>
void assertVectorAreEqualWithRelativeTol ( const VectorType1& vec1,
const VectorType2& vec2,
double relativeTol,
double minAbsoluteTol,
std::string file,
int line)
Assert that two vectors are equal, and exit with EXIT_FAILURE if they are not.
template<typename MatrixType1, typename MatrixType2>
void assertMatrixAreEqual ( const MatrixType1& mat1,
const MatrixType2& mat2,
double tol,
std::string file,
int line)
Assert that two matrices are equal, and exit with EXIT_FAILURE if they are not.
void assertWoAbort ( const char* semCheck,
const char* file,
const char* func,
int line)
Function embedding the semantic checks.
auto checkEqualOrUnknown ( const int op1,
const int op2) -> bool
Helper class for semantic checking.
void reportError ( const char* className,
const char* methodName,
const char* errorMessage)
Helper function for reporting error if the semantic check fails.
auto reportErrorIf ( bool condition,
const char* className_methodName,
const char* errorMessage) -> bool
Call report error if condition is true.
void reportWarning ( const char* className,
const char* methodName,
const char* errorMessage)
Helper function for reporting warnings in iDynTree.
void reportInfo ( const char* className,
const char* methodName,
const char* message)
Helper function for reporting information messages in iDynTree.
void reportDebug ( const char* className,
const char* methodName,
const char* message)
Helper function for reporting debug messages in iDynTree.
auto deg2rad ( const double valueInDeg) -> double
Convert a double from degrees to radians.
auto rad2deg ( const double valueInRad) -> double
Convert a double from radians to degree.
auto checkDoublesAreEqual ( const double& val1,
const double& val2,
double tol = DEFAULT_TOL) -> bool
Check whether two doubles are equal given a tolerance tol.
auto sizeOfRotationParametrization ( enum InverseKinematicsRotationParametrization rotationParametrization) -> int
auto DHChainFromiKinChain ( iCub::iKin::iKinChain& ikinChain,
DHChain & out) -> bool
Load a iDynTree:: DHChain object from a iCub::iKin::iKinChain .
auto modelFromiKinChain ( iCub::iKin::iKinChain& ikinChain,
Model & output) -> bool
Load a iDynTree:: Model object from a iCub::iKin::iKinChain .
auto iKinLimbFromModel ( const Model & model,
const std::string& baseFrame,
const std::string& distalFrame,
iCub::iKin::iKinLimb& ikinLimb) -> bool
Extract an iCub::iKin::iKinLimb from an iDynTree:: Model .
auto iKinLimbFromDHChain ( const DHChain & dhChain,
iCub::iKin::iKinLimb& ikinLimb) -> bool
Create a iCub::iKin::iKinLimb from an iDynTree:: DHChain .
auto iKinLink2DHLink ( const iCub::iKin::iKinLink& ikinlink) -> DHLink
auto DHLink2iKinLink ( const DHLink & dhLink) -> iCub::iKin::iKinLink
template<class contactsList>
auto fromSkinDynLibToiDynTreeHelper ( const Model & model,
const contactsList& dynList,
LinkUnknownWrenchContacts & unknowns,
const skinDynLibConversionsHelper & conversionHelper) -> bool
Templated version of fromSkinDynLibToiDynTree, useful to implement the exact same function for dynContactList and skinContactList, that have exactly the same interface, but they don't have any common ancestor in the class structure.
auto dofsListFromURDF ( const std::string& urdf_filename,
std::vector<std::string>& dofs) -> bool
Load a list of dofs names from a URDF file.
auto dofsListFromURDFString ( const std::string& urdf_string,
std::vector<std::string>& dofs) -> bool
Load a list of dofs object from a URDF string.
auto URDFFromModel ( const iDynTree:: Model & model,
const std::string& urdf_filename,
const ModelExporterOptions options = ModelExporterOptions ()) -> bool
Export a iDynTree:: Model object to a URDF file.
auto URDFStringFromModel ( const iDynTree:: Model & output,
std::string& urdf_string,
const ModelExporterOptions options = ModelExporterOptions ()) -> bool
Export a iDynTree:: Model object to a URDF string.
auto stringToDoubleWithClassicLocale ( const std::string& inStr,
double& outDouble) -> bool
auto stringToIntWithClassicLocale ( const std::string& inStr,
int& outInt) -> bool
auto stringToUnsignedIntWithClassicLocale ( const std::string& inStr,
unsigned int& outInt) -> bool
auto doubleToStringWithClassicLocale ( const double& inDouble,
std::string& outStr) -> bool
auto intToString ( const int inInt) -> std::string
auto intToString ( const size_t inInt) -> std::string
auto splitString ( const std::string& inStr,
std::vector<std::string>& pieces) -> bool
Split string along spaces.
auto vector3FromString ( const std::string& vector_str,
Vector3 & out) -> bool
template<typename iDynTreeVectorType>
auto vectorToString ( const iDynTreeVectorType& in,
std::string& out_str) -> bool
auto vector4FromString ( const std::string& vector_str,
Vector4 & out) -> bool
auto TransformFromDHCraig1989 ( double a,
double alpha,
double d,
double theta) -> Transform
auto TransformFromDH ( double a,
double alpha,
double d,
double theta) -> Transform
DH : constructs a transformationmatrix T_link(i-1)_link(i) with the Denavit-Hartenberg convention as described in the original publictation: Denavit, J.
auto ExtractDHChainFromModel ( const iDynTree:: Model & model,
const std::string baseFrame,
const std::string eeFrame,
DHChain & outputChain,
double tolerance = 1e-5) -> bool
Extract a Denavit Hartenberg Chain from a iDynTree:: Model .
auto CreateModelFromDHChain ( const DHChain & inputChain,
Model & outputModel) -> bool
Create an iDynTree:: Model from a DHChain .
auto ComputeLinearAndAngularMomentum ( const Model & model,
const LinkPositions & linkPositions,
const LinkVelArray & linkVels,
SpatialMomentum & totalMomentum) -> bool
Compute the total linear and angular momentum of a robot, expressed in the world frame.
auto ComputeLinearAndAngularMomentumDerivativeBias ( const Model & model,
const LinkPositions & linkPositions,
const LinkVelArray & linkVel,
const LinkAccArray & linkBiasAcc,
Wrench & totalMomentumBias) -> bool
Compute the total momentum derivatitive bias, i.e.
auto RNEADynamicPhase ( const iDynTree:: Model & model,
const iDynTree:: Traversal & traversal,
const iDynTree:: JointPosDoubleArray & jointPos,
const iDynTree:: LinkVelArray & linksVel,
const iDynTree:: LinkAccArray & linksProperAcc,
const iDynTree:: LinkNetExternalWrenches & linkExtForces,
iDynTree:: LinkInternalWrenches & linkIntWrenches,
iDynTree:: FreeFloatingGeneralizedTorques & baseForceAndJointTorques) -> bool
Compute the inverse dynamics, i.e.
auto CompositeRigidBodyAlgorithm ( const Model & model,
const Traversal & traversal,
const JointPosDoubleArray & jointPos,
LinkCompositeRigidBodyInertias & linkCRBs,
FreeFloatingMassMatrix & massMatrix) -> bool
Compute the floating base mass matrix, using the composite rigid body algorithm.
auto ArticulatedBodyAlgorithm ( const Model & model,
const Traversal & traversal,
const FreeFloatingPos & robotPos,
const FreeFloatingVel & robotVel,
const LinkNetExternalWrenches & linkExtWrenches,
const JointDOFsDoubleArray & jointTorques,
ArticulatedBodyAlgorithmInternalBuffers & buffers,
FreeFloatingAcc & robotAcc) -> bool
Compute the floating base acceleration of an unconstrianed robot, using as input the external forces and the joint torques.
auto InverseDynamicsInertialParametersRegressor ( const iDynTree:: Model & model,
const iDynTree:: Traversal & traversal,
const iDynTree:: LinkPositions & referenceFrame_H_link,
const iDynTree:: LinkVelArray & linksVel,
const iDynTree:: LinkAccArray & linksAcc,
iDynTree:: MatrixDynSize & baseForceAndJointTorquesRegressor) -> bool
Compute the inverse dynamics of the model as linear function of the inertial parameters.
auto ForwardDynamicsLinearization ( const Model & model,
const Traversal & traversal,
const FreeFloatingPos & robotPos,
const FreeFloatingVel & robotVel,
const LinkNetExternalWrenches & linkExtWrenches,
const JointDOFsDoubleArray & jointTorques,
ForwardDynamicsLinearizationInternalBuffers & bufs,
FreeFloatingAcc & robotAcc,
FreeFloatingStateLinearization & A) -> bool
auto operator* ( const Transform & a_X_b,
const SpatialMotionWrtMotionDerivative & op2) -> SpatialMotionWrtMotionDerivative
Equivalent to:
auto operator* ( const Transform & a_X_b,
const SpatialForceWrtMotionDerivative & op2) -> SpatialForceWrtMotionDerivative
Equivalent to:
biasWrenchVelocityDerivative (SpatialInertia M,
SpatialMotionVector V)
Given a rigid body inertia
$M$
and spatial motion vector
$V$
, the bias wrench
$B$
of rigid body is defined as:
auto ForwardPositionKinematics ( const Model & model,
const Traversal & traversal,
const Transform & worldHbase,
const VectorDynSize & jointPositions,
LinkPositions & linkPositions) -> bool
Given a robot floating base configuration (i.e.
auto ForwardPositionKinematics ( const Model & model,
const Traversal & traversal,
const FreeFloatingPos & jointPos,
LinkPositions & linkPos) -> bool
Variant of ForwardPositionKinematics that takes in input a FreeFloatingPos object instead of a separate couple of (worldHbase,jointPositions)
auto ForwardVelAccKinematics ( const iDynTree:: Model & model,
const iDynTree:: Traversal & traversal,
const iDynTree:: FreeFloatingPos & robotPos,
const iDynTree:: FreeFloatingVel & robotVel,
const iDynTree:: FreeFloatingAcc & robotAcc,
iDynTree:: LinkVelArray & linkVel,
iDynTree:: LinkAccArray & linkAcc) -> bool
Function that compute the links velocities and accelerations given the free floating robot velocities and accelerations.
auto ForwardPosVelAccKinematics ( const iDynTree:: Model & model,
const iDynTree:: Traversal & traversal,
const iDynTree:: FreeFloatingPos & robotPos,
const iDynTree:: FreeFloatingVel & robotVel,
const iDynTree:: FreeFloatingAcc & robotAcc,
iDynTree:: LinkPositions & linkPos,
iDynTree:: LinkVelArray & linkVel,
iDynTree:: LinkAccArray & linkAcc) -> bool
Function that compute the links position, velocities and accelerations given the free floating robot position, velocities and accelerations.
auto ForwardPosVelKinematics ( const iDynTree:: Model & model,
const iDynTree:: Traversal & traversal,
const iDynTree:: FreeFloatingPos & robotPos,
const iDynTree:: FreeFloatingVel & robotVel,
iDynTree:: LinkPositions & linkPos,
iDynTree:: LinkVelArray & linkVel) -> bool
Function that compute the links position and velocities and accelerations given the free floating robot position and velocities.
auto ForwardAccKinematics ( const Model & model,
const Traversal & traversal,
const FreeFloatingPos & robotPos,
const FreeFloatingVel & robotVel,
const FreeFloatingAcc & robotAcc,
const LinkVelArray & linkVel,
LinkAccArray & linkAcc) -> bool
Function that computes the links accelerations given the free floating robot velocities and accelerations.
auto ForwardBiasAccKinematics ( const Model & model,
const Traversal & traversal,
const FreeFloatingPos & robotPos,
const FreeFloatingVel & robotVel,
const SpatialAcc & baseBiasAcc,
const LinkVelArray & linkVel,
LinkAccArray & linkBiasAcc) -> bool
Function that computes the links bias accelerations given the free floating robot velocities.
auto ForwardBiasAccKinematics ( const Model & model,
const Traversal & traversal,
const FreeFloatingPos & robotPos,
const FreeFloatingVel & robotVel,
const LinkVelArray & linkVel,
LinkAccArray & linkBiasAcc) -> bool
Legacy function, will be deprecated, use the variant with an explicit baseBiasAcc value.
auto FreeFloatingJacobianUsingLinkPos ( const Model & model,
const Traversal & traversal,
const JointPosDoubleArray & jointPositions,
const LinkPositions & linkPositions,
const LinkIndex linkIndex,
const Transform & jacobFrame_X_world,
const Transform & baseFrame_X_jacobBaseFrame,
const MatrixView <double>& jacobian) -> bool
Compute a free floating jacobian.
auto createReducedModelAndSensors ( const Model & fullModel,
const SensorsList & fullSensors,
const std::vector<std::string>& jointsInReducedModel,
Model & reducedModel,
SensorsList & reducedSensors) -> bool
Variant of createReducedModel function that also process the sensorList .
auto getRandomLink ( ) -> Link
void addRandomLinkToModel ( Model & model,
std::string parentLink,
std::string newLinkName,
bool onlyRevoluteJoints = false)
Add a random link with random model.
void addRandomAdditionalFrameToModel ( Model & model,
std::string parentLink,
std::string newFrameName)
Add a random additional frame to a model model.
auto getRandomLinkIndexOfModel ( const Model & model) -> LinkIndex
auto getRandomLinkOfModel ( const Model & model) -> std::string
auto int2string ( int i) -> std::string
auto getRandomModel ( unsigned int nrOfJoints,
size_t nrOfAdditionalFrames = 10,
bool onlyRevoluteJoints = false) -> Model
auto getRandomChain ( unsigned int nrOfJoints,
size_t nrOfAdditionalFrames = 10,
bool onlyRevoluteJoints = false) -> Model
void getRandomJointPositions ( VectorDynSize & vec,
const Model & model)
Get random joint position consistently with the limits of the model.
auto getRandomInverseDynamicsInputs ( FreeFloatingPos & pos,
FreeFloatingVel & vel,
FreeFloatingAcc & acc,
LinkNetExternalWrenches & extWrenches) -> bool
Get random robot positions, velocities and accelerations and external wrenches to be given as an input to InverseDynamics.
auto removeFakeLinks ( const Model & modelWithFakeLinks,
Model & modelWithoutFakeLinks) -> bool
\function Remove all fake links in the model, transforming them in frames.
auto createReducedModel ( const Model & fullModel,
const std::vector<std::string>& jointsInReducedModel,
Model & reducedModel) -> bool
This function takes in input a iDynTree:: Model and an ordered list of joints and returns a model with just the joint specified in the list, with that exact order.
auto createReducedModel ( const Model & fullModel,
const std::vector<std::string>& jointsInReducedModel,
Model & reducedModel,
const std::unordered_map<std::string, double>& removedJointPositions) -> bool
This function takes in input a iDynTree:: Model and an ordered list of joints and returns a model with just the joint specified in the list, with that exact order.
auto createModelWithNormalizedJointNumbering ( const Model & model,
const std::string& baseForNormalizedJointNumbering,
Model & reducedModel) -> bool
Given a specified base, return a model with a "normalized" joint numbering for that base.
auto extractSubModel ( const iDynTree:: Model & fullModel,
const iDynTree:: Traversal & subModelTraversal,
iDynTree:: Model & outputSubModel) -> bool
Extract sub model from sub model traversal.
auto addValidNamesToAllSolidShapes ( const iDynTree:: Model & inputModel,
iDynTree:: Model & outputModel) -> bool
Add automatically generated names to all visual and collision solid shapes of the model.
auto moveLinkFramesToBeCompatibleWithURDFWithGivenBaseLink ( const iDynTree:: Model & inputModel,
iDynTree:: Model & outputModel) -> bool
Transform the input model in model that can be exported as URDF with the given base link.
auto predictSensorsMeasurements ( const Model & model,
const Traversal & traversal,
const FreeFloatingPos & robotPos,
const FreeFloatingVel & robotVel,
const FreeFloatingAcc & robotAcc,
const LinAcceleration & gravity,
const LinkNetExternalWrenches & externalWrenches,
FreeFloatingAcc & buf_properRobotAcc,
LinkPositions & buf_linkPos,
LinkVelArray & buf_linkVel,
LinkAccArray & buf_linkProperAcc,
LinkInternalWrenches & buf_internalWrenches,
FreeFloatingGeneralizedTorques & buf_outputTorques,
SensorsMeasurements & predictedMeasurement) -> bool
Predict the measurement of a set of sensors.
auto predictSensorsMeasurementsFromRawBuffers ( const Model & model,
const Traversal & traversal,
const LinkVelArray & buf_linkVel,
const LinkAccArray & buf_linkProperAcc,
const LinkInternalWrenches & buf_internalWrenches,
SensorsMeasurements & predictedMeasurement) -> bool
Predict the measurement of a set of sensors.
auto predictSensorsMeasurements ( const Model & model,
const SensorsList & sensorList,
const Traversal & traversal,
const FreeFloatingPos & robotPos,
const FreeFloatingVel & robotVel,
const FreeFloatingAcc & robotAcc,
const LinAcceleration & gravity,
const LinkNetExternalWrenches & externalWrenches,
FreeFloatingAcc & buf_properRobotAcc,
LinkPositions & buf_linkPos,
LinkVelArray & buf_linkVel,
LinkAccArray & buf_linkProperAcc,
LinkInternalWrenches & buf_internalWrenches,
FreeFloatingGeneralizedTorques & buf_outputTorques,
SensorsMeasurements & predictedMeasurement) -> bool
Predict the measurement of a set of sensors.
auto predictSensorsMeasurementsFromRawBuffers ( const Model & model,
const SensorsList & sensorList,
const Traversal & traversal,
const LinkVelArray & buf_linkVel,
const LinkAccArray & buf_linkProperAcc,
const LinkInternalWrenches & buf_internalWrenches,
SensorsMeasurements & predictedMeasurement) -> bool
Predict the measurement of a set of sensors.
auto isLinkSensor ( const SensorType type) -> bool
Short function to check if a SensorType is a LinkSensor .
auto isJointSensor ( const SensorType type) -> bool
Short function to check if a SensorType is.
auto getSensorTypeSize ( const SensorType type) -> std::size_t
void computeTransformToTraversalBase ( const Model & fullModel,
const Traversal & traversal,
const JointPosDoubleArray & jointPos,
LinkPositions & traversalBase_H_link)
Helper loop to compute the position of each link wrt to the frame of the subModel base.
void computeTransformToSubModelBase ( const Model & fullModel,
const SubModelDecomposition & subModelDecomposition,
const JointPosDoubleArray & jointPos,
LinkPositions & subModelBase_H_link)
Run the computeTransformToTraversalBase for all the traversal in the subModelDecomposition, and store the results in the linkPos array.
auto isLinkBerdyDynamicVariable ( const BerdyDynamicVariablesTypes dynamicVariableType) -> bool
auto isJointBerdyDynamicVariable ( const BerdyDynamicVariablesTypes dynamicVariableType) -> bool
auto isDOFBerdyDynamicVariable ( const BerdyDynamicVariablesTypes dynamicVariableType) -> bool
auto estimateExternalWrenchesWithoutInternalFT ( const Model & model,
const Traversal & traversal,
const LinkUnknownWrenchContacts & unknownWrenches,
const JointPosDoubleArray & jointPos,
const LinkVelArray & linkVel,
const LinkAccArray & linkProperAcc,
estimateExternalWrenchesBuffers & bufs,
LinkContactWrenches & outputContactWrenches) -> bool
Estimate the external contact wrenches using the MultiBody Newton-Euler equations.
auto estimateExternalWrenches ( const Model & model,
const SubModelDecomposition & subModels,
const SensorsList & sensors,
const LinkUnknownWrenchContacts & unknownWrenches,
const JointPosDoubleArray & jointPos,
const LinkVelArray & linkVel,
const LinkAccArray & linkProperAcc,
const SensorsMeasurements & ftSensorsMeasurements,
estimateExternalWrenchesBuffers & bufs,
LinkContactWrenches & outputContactWrenches) -> bool
Estimate the external wrenches trasmitted by the contacts between the model and the external environment.
auto dynamicsEstimationForwardVelAccKinematics ( const Model & model,
const Traversal & traversal,
const Vector3 & base_classicalProperAcc,
const Vector3 & base_angularVel,
const Vector3 & base_angularAcc,
const JointPosDoubleArray & jointPos,
const JointDOFsDoubleArray & jointVel,
const JointDOFsDoubleArray & jointAcc,
LinkVelArray & linkVel,
LinkAccArray & linkProperAcc) -> bool
Modified forward kinematics for torque/force estimation.
auto dynamicsEstimationForwardVelKinematics ( const Model & model,
const Traversal & traversal,
const Vector3 & base_angularVel,
const JointPosDoubleArray & jointPos,
const JointDOFsDoubleArray & jointVel,
LinkVelArray & linkVel) -> bool
Modified forward kinematics for floating basedynamics estimation.
auto computeLinkNetWrenchesWithoutGravity ( const Model & model,
const LinkVelArray & linkVel,
const LinkAccArray & linkProperAcc,
LinkNetTotalWrenchesWithoutGravity & linkNetWrenchesWithoutGravity) -> bool
Compute the net internal and external wrenches (excluding gravity forces) acting on the links.
auto estimateLinkContactWrenchesFromLinkNetExternalWrenches ( const Model & model,
const LinkUnknownWrenchContacts & unknownWrenches,
const LinkNetExternalWrenches & netExtWrenches,
LinkContactWrenches & outputContactWrenches) -> bool
Compute the link contact wrenches from the net external wrenches.