threed_odometry
Public Member Functions | Public Attributes | Protected Attributes | List of all members
threed_odometry::KinematicKDL Class Reference

#include <KinematicKDL.hpp>

Public Member Functions

 KinematicKDL (const std::string &urdf_file, const std::vector< std::string > &_contact_points, const std::vector< std::string > &contact_angles, const int _number_robot_joints, const int _number_slip_joints, const int _number_contact_joints)
 
 ~KinematicKDL ()
 
std::string getName ()
 
void fkSolver (const std::vector< double > &positions, const std::vector< std::string > &tip_names, std::vector< Eigen::Affine3d > &fkTrans, std::vector< base::Matrix6d > &fkCov)
 
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > jacobianSolver (const std::vector< std::string > &names, const std::vector< double > &positions)
 
void unpackJoints (const std::vector< std::string > &joint_names, const std::vector< double > &joint_positions, const std::vector< std::string > &involved_joints, KDL::JntArray &joint_array)
 
void organizeJacobian (const int chainidx, const std::vector< std::string > &joint_names, const std::vector< std::string > &involved_joints, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &jacobian, Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &J)
 

Public Attributes

unsigned int model_dof
 

Protected Attributes

KDL::Tree tree
 
std::string model_name
 
std::vector< KDL::Chain > ichains
 
std::vector< std::vector< std::string > > ichains_joint_names
 
std::vector< std::string > contact_point_segments
 
std::vector< std::string > contact_angle_segments
 
int number_robot_joints
 
int number_slip_joints
 
int number_contact_joints
 

Constructor & Destructor Documentation

KinematicKDL::KinematicKDL ( const std::string &  urdf_file,
const std::vector< std::string > &  _contact_points,
const std::vector< std::string > &  contact_angles,
const int  _number_robot_joints,
const int  _number_slip_joints,
const int  _number_contact_joints 
)

Complete robot model DoF

Read URDF file

Assign an information string name and complete model DoF

Resize vectors of chains

Get root link

Extract the chains in inverse order for the Motion Model Jacobian matrix

Extract the joint names for the chains in inverse order

KinematicKDL::~KinematicKDL ( )

Member Function Documentation

void KinematicKDL::fkSolver ( const std::vector< double > &  positions,
const std::vector< std::string > &  tip_names,
std::vector< Eigen::Affine3d > &  fkTrans,
std::vector< base::Matrix6d > &  fkCov 
)

Check if the number of values is correct

Resize the vectors

Forward kinematic solver of the robot tree

Create joint array

Fill the Joint Array with the position values

Calculate the Forward Kinematics for all the chains of the robot

Create the frame that will contain the results

Calculate forward position kinematics

Store the solution in the arguments

No uncertainty provided

std::string KinematicKDL::getName ( )
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > KinematicKDL::jacobianSolver ( const std::vector< std::string > &  names,
const std::vector< double > &  positions 
)

Check if the number of values is correct

Get Forward Kinematics of all contact points

Calculate the Jacobian for all the inverse chains of the robot

Jacobian solver of the robot tree

Create joint array

Fill the Joint Array with the position values

Create KDL Jacobian

Solver for the Jacobian

Get the Jacobian in Eigen Matrix class

Jacobian of inverse chain with respect to the root frame (Multiple by FK Transformations)

void KinematicKDL::organizeJacobian ( const int  chainidx,
const std::vector< std::string > &  joint_names,
const std::vector< std::string > &  involved_joints,
const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &  jacobian,
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &  J 
)
void KinematicKDL::unpackJoints ( const std::vector< std::string > &  joint_names,
const std::vector< double > &  joint_positions,
const std::vector< std::string > &  involved_joints,
KDL::JntArray &  joint_array 
)

Member Data Documentation

std::vector<std::string> threed_odometry::KinematicKDL::contact_angle_segments
protected

Number and segment names of contact points

std::vector<std::string> threed_odometry::KinematicKDL::contact_point_segments
protected

Kinematics chains

std::vector<KDL::Chain> threed_odometry::KinematicKDL::ichains
protected

Name of the model class

std::vector< std::vector<std::string> > threed_odometry::KinematicKDL::ichains_joint_names
protected

Kinematics chains

unsigned int threed_odometry::KinematicKDL::model_dof

Number of joints per each type

std::string threed_odometry::KinematicKDL::model_name
protected

There are as many chains in the tree as number of contact points

int threed_odometry::KinematicKDL::number_contact_joints
protected
int threed_odometry::KinematicKDL::number_robot_joints
protected

Number and segment names of contact angles

int threed_odometry::KinematicKDL::number_slip_joints
protected
KDL::Tree threed_odometry::KinematicKDL::tree
protected

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