tinyrobotics
Loading...
Searching...
No Matches
tr::model::Link< Scalar > Struct Template Reference

Represents a link in a tinyrobotics model. More...

#include <Link.hpp>

Public Member Functions

void add_child_link_idx (const int child_link_idx)
 Add a child link index to the list of child links.
 
template<typename NewScalar >
Link< NewScalar > cast ()
 Casts the link to a new scalar type.
 

Public Attributes

std::string name = ""
 Name of the link.
 
int idx = -1
 Index of the link in the model's link vector.
 
int parent = -1
 Index of the link's parent link in the model's link vector.
 
std::vector< int > child_links = {}
 Vector of child link indices in the model's link vector.
 
Eigen::Transform< Scalar, 3, Eigen::Isometry > centre_of_mass
 Center of mass of the link.
 
Eigen::Matrix< Scalar, 3, 3 > inertia = Eigen::Matrix<Scalar, 3, 3>::Zero()
 Inertia matrix of the link [kg m^2].
 
Scalar mass = 0
 Mass of the link [kg].
 
Joint< Scalar > joint
 Joint connecting the link to its parent link.
 
Eigen::Matrix< Scalar, 6, 6 > I = {}
 

Detailed Description

template<typename Scalar>
struct tr::model::Link< Scalar >

Represents a link in a tinyrobotics model.

Template Parameters
ScalarScalar type of the link.

Member Function Documentation

◆ add_child_link_idx()

template<typename Scalar >
void tr::model::Link< Scalar >::add_child_link_idx ( const int  child_link_idx)
inline

Add a child link index to the list of child links.

Parameters
child_link_idxThe index of the child link to add.

◆ cast()

template<typename Scalar >
template<typename NewScalar >
Link< NewScalar > tr::model::Link< Scalar >::cast ( )
inline

Casts the link to a new scalar type.

Template Parameters
NewScalarscalar type to cast the link to.
Returns
Link with new scalar type.

Member Data Documentation

◆ centre_of_mass

template<typename Scalar >
Eigen::Transform<Scalar, 3, Eigen::Isometry> tr::model::Link< Scalar >::centre_of_mass
Initial value:
=
Eigen::Transform<Scalar, 3, Eigen::Isometry>::Identity()

Center of mass of the link.


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