Class ModelKDL

Class Documentation

class ModelKDL

Calculates poses of links and dynamic properties of the robot.

This implementation of ModelBase uses KDL as backend for calculating dynamic and kinematic properties of the robot.

Public Functions

ModelKDL() = default

Default constructor. Creates an empty ModelKDL object.

ModelKDL(const urdf::Model &model, const std::string &root, const std::string &tip)

Create a new implementation for the ModelBase with KDL as backend

Parameters:
  • model[in] the URDF from which to interprete the kinematic chain

  • root[in] the link name of the root of the chain

  • tip[in] the link name of the tip of the chain

Throws:

std::invalid_argument – when either root or tip cannot be found in the URDF

std::array<double, 7> gravity(const std::array<double, 7> &q, const std::array<double, 3> &gravity_earth) const

Calculates the gravity vector. Unit: [Nm].

Parameters:
  • q[in] Joint position.

  • m_total[in] Weight of the attached total load including end effector. Unit: [kg].

  • F_x_Ctotal[in] Translation from flange to center of mass of the attached total load. Unit: [m].

  • gravity_earth[in] Earth’s gravity vector. Unit: ms2.

Returns:

Gravity vector.