template<typename _Scalar, int _RobotTrees, int _RobotJointDoF, int _SlipDoF, int _ContactDoF>
class odometry::KinematicModel< _Scalar, _RobotTrees, _RobotJointDoF, _SlipDoF, _ContactDoF >
Kinematic Model Abtsract class
- Parameters
-
| _Scalar | is the typename of your desired implementation (float, double, etc..) |
| _RobotTrees | is 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. |
| _RobotJointDoF | Complete 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. |
| _SlipDoF | The 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) |
| _ContactDoF | This 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).
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] | contactPoints | the 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] | chainIdx | Identifier(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] | positions | vector 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] | homogeneus | transformation 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] | positions | vector 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>
| 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] | pointsInContact | vector of size number of Trees with the point in contact per each Tree |