odometry
Public Member Functions | Static Public Attributes | List of all members
odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF > Class Template Referenceabstract

#include <KinematicModel.hpp>

Public Member Functions

int getNumberOfTrees ()
 return the number of Trees More...
 
int getRobotJointDoF (void)
 return the complete robot number of Joints More...
 
int getSlipDoF (void)
 return the dimension of the slip model. More...
 
int getContactDoF ()
 return the dimension of the contact angle model More...
 
unsigned int getMaxChainDoF ()
 return . Equivalent to the number of columns in teh Jacobian. More...
 
unsigned int getModelDOF ()
 return . More...
 
virtual std::string name ()=0
 The name of the Kinematic Model. More...
 
virtual void contactPointsPerTree (std::vector< unsigned int > &contactPoints)=0
 Number of contact points per Tree. More...
 
virtual void setPointsInContact (const std::vector< int > &pointsInContact)=0
 Assign the current point in contact. More...
 
virtual void fkBody2ContactPointt (const int chainIdx, const std::vector< _Scalar > &positions, Eigen::Affine3d &fkTrans, base::Matrix6d &fkCov)=0
 Forward Kinematic. More...
 
virtual void fkSolver (const std::vector< _Scalar > &positions, std::vector< Eigen::Affine3d > &fkRobot, std::vector< base::Matrix6d > &fkCov)=0
 Forward Kinematics Solver. More...
 
virtual Eigen::Matrix< _Scalar,
6 *_RobotTrees, MODEL_DOF
jacobianSolver (const std::vector< _Scalar > &positions)=0
 Computes the Robot Jacobian. More...
 

Static Public Attributes

static const unsigned int MAX_CHAIN_DOF = _RobotJointDoF+_SlipDoF+_ContactDoF
 
static const unsigned int MODEL_DOF = _RobotJointDoF+_RobotTrees*(_SlipDoF+_ContactDoF)
 

Detailed Description

template<typename _Scalar, int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
class odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >

Kinematic Model Abtsract class

Parameters
_Scalaris the typename of your desired implementation (float, double, etc..)
_RobotTreesis the number of independent Trees connected to your desired Body Center. Trees is understood as connection of kinematics chains. As an example: Asguard hybrid wheels model as Trees. Therefore Asguard has 4 Trees. Each Tree has 5 open kinematics chains, one per each foot which are potential points in contact with the ground.
_RobotJointDoFComplete number of DoF in the Joint Space of your robot.This is every joint passive or active that your robot (or the part of your robot related to odometry) has. This is required to teh Jacobian in a a general form. Therefore, this would be the part of th enumber of columns in the Kinematic Model Jacobian.
_SlipDoFThe number of DoF than you want to model the slip of the contact point. If you are not interested to model slip velocity/displacement set it to zero. Otherwise, a common slip model has 3DoF (in X an Y direction and Z rotation)
_ContactDoFThis is the angle of contact between the ground and the contact point. If it is not interesting for you model (i.e: the robot moves in indoor environment) set it to zero. Otherwise in uneven terrains normally is modeled as 1DoF along th pitch axis. For walking robots it could have 2DoF one along the Y axis/Pitch at the feet frame (dominant when moving forward) and another along the X axis/Roll at the feet frame (dominant when moving sideways).

Note that it is very important how you especify the number of Trees according to the contact points. It is assumed that one Tree can only have one single point of contact with the ground at the same time. Therefore, if your real/physical kinematic Tree can have more than one contact point at a time (e.g: two) the Tree needs to be split according to it (e.g: two Trees).

For example, taking Asguard wheel as an example. If we want to model the wheel as two feet can have point in contact, two Trees needs to be created in the wheel (virtualy increasing the number of Trees).

Member Function Documentation

template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
virtual void odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::contactPointsPerTree ( std::vector< unsigned int > &  contactPoints)
pure virtual

Number of contact points per Tree.

Candidate points in contact with the groudn. For example in the case of Asguard all the Trees have the same number of contact poins (5).

Parameters
[out]contactPointsthe vector of size number of Trees with the number of contact points
template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
virtual void odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::fkBody2ContactPointt ( const int  chainIdx,
const std::vector< _Scalar > &  positions,
Eigen::Affine3d &  fkTrans,
base::Matrix6d &  fkCov 
)
pure virtual

Forward Kinematic.

Computes the Forward Kinematics. It is computed for a chain, between one coordinate frame (the base) to another coordinate frame in the chain (the tip).

Parameters
[in]chainIdxIdentifier(idx) per chain. If one robot has four Trees with for example five kinematics chains per each Tree. The idx of the first chain in the first Tree is 0. The idx for the second chain of the second Tree is 6 and so on.
[in]positionsvector with the joint position of the kinematic chain. Since a priori is not possible to know the number of DoF of the chain, the vector could have dimension MAX_CHAIN_DOF
[out]homogeneustransformation of the Forward Kinematics ,[out] noise covariance of the transformation.
template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
virtual void odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::fkSolver ( const std::vector< _Scalar > &  positions,
std::vector< Eigen::Affine3d > &  fkRobot,
std::vector< base::Matrix6d > &  fkCov 
)
pure virtual

Forward Kinematics Solver.

Compute the Forward Kinematics per each Tree of teh robot. Since Forwadr Kinematics only makse sense in chains and not in Tree. The selected chain per each Tree is that one with the current point in contact

See Also
{setPointsInContact}
Parameters
[in]positionsvector of size
See Also
{MODEL_DOF} with the joint position values of the complete robot.
Parameters
[out]Eigen::Affine3d>&fkRobot, vector of homogeneus transformation of the FK per Tree.
[out]std::vector<base::Matrix6d>&fkCov, vector of noise covariance associated to each transformation.
template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
int odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::getContactDoF ( )
inline

return the dimension of the contact angle model

template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
unsigned int odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::getMaxChainDoF ( )
inline

return . Equivalent to the number of columns in teh Jacobian.

template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
unsigned int odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::getModelDOF ( )
inline

return .

template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
int odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::getNumberOfTrees ( )
inline

return the number of Trees

template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
int odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::getRobotJointDoF ( void  )
inline

return the complete robot number of Joints

template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
int odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::getSlipDoF ( void  )
inline

return the dimension of the slip model.

template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
virtual Eigen::Matrix<_Scalar, 6*_RobotTrees, MODEL_DOF> odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::jacobianSolver ( const std::vector< _Scalar > &  positions)
pure virtual

Computes the Robot Jacobian.

Computes the robot Jacobian. Dimension 6*

See Also
{_RobotTrees} x
{MODEL_DOF}
Parameters
[in]positionswith the current values joints values
Returns
the robot jacobian matrix.
template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
virtual std::string odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::name ( )
pure virtual

The name of the Kinematic Model.

template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
virtual void odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::setPointsInContact ( const std::vector< int > &  pointsInContact)
pure virtual

Assign the current point in contact.

Point in contact among the number of contact points.

Parameters
[in]pointsInContactvector of size number of Trees with the point in contact per each Tree

Member Data Documentation

template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
const unsigned int odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::MAX_CHAIN_DOF = _RobotJointDoF+_SlipDoF+_ContactDoF
static

The maximum number of DoF that the robot has in the Joint Space (Joints + Slip + Contact angle

template<typename _Scalar , int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
const unsigned int odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >::MODEL_DOF = _RobotJointDoF+_RobotTrees*(_SlipDoF+_ContactDoF)
static

The complete number of DoF of the Robot Model. This is compute for the whole Robot Jacobian Matrix


The documentation for this class was generated from the following file: