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

Represents a joint in a tinyrobotics model which connects two links. More...

#include <Joint.hpp>

Public Member Functions

std::string get_type () const
 Get joint type as a string.
 
Eigen::Transform< Scalar, 3, Eigen::Isometry > get_joint_transform (const Scalar &q) const
 Compute the joint transform.
 
Eigen::Transform< Scalar, 3, Eigen::Isometry > get_parent_to_child_transform (const Scalar &q)
 Compute the transform from parent to child.
 
template<typename NewScalar >
Joint< NewScalar > cast () const
 Casts the joint to a new scalar type.
 

Public Attributes

int joint_id = -1
 Index of the joint in the tinyrobotics model's joint vector.
 
int idx = -1
 Index of the joint in the tinyrobotics model's configuration vector.
 
std::string name = ""
 Name of the joint.
 
JointType type = JointType::UNKNOWN
 Type of the joint.
 
Eigen::Matrix< Scalar, 3, 1 > axis = Eigen::Matrix<Scalar, 3, 1>::Zero()
 Axis of motion for the joint.
 
Eigen::Transform< Scalar, 3, Eigen::Isometry > parent_transform
 Homogeneous transform to the parent link.
 
Eigen::Transform< Scalar, 3, Eigen::Isometry > child_transform
 Homogeneous transform to the child link.
 
std::string parent_link_name = ""
 Name of the joints parent link.
 
std::string child_link_name = ""
 Name of the joints child link.
 
Eigen::Matrix< Scalar, 6, 6 > X = Eigen::Matrix<Scalar, 6, 6>::Identity()
 Spatial transformation matrix from the parent to the child link.
 
Eigen::Matrix< Scalar, 6, 1 > S = Eigen::Matrix<Scalar, 6, 1>::Zero()
 Spatial axis.
 

Detailed Description

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

Represents a joint in a tinyrobotics model which connects two links.

Template Parameters
ScalarThe scalar type of the joint

Member Function Documentation

◆ cast()

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

Casts the joint to a new scalar type.

Template Parameters
NewScalarScalar type to cast the joint to.
Returns
Joint with new scalar type.

◆ get_joint_transform()

template<typename Scalar >
Eigen::Transform< Scalar, 3, Eigen::Isometry > tr::model::Joint< Scalar >::get_joint_transform ( const Scalar &  q) const
inline

Compute the joint transform.

Parameters
qThe joint position variable.
Returns
Homogeneous transform of the joint from its home position to its transformed position.

◆ get_parent_to_child_transform()

template<typename Scalar >
Eigen::Transform< Scalar, 3, Eigen::Isometry > tr::model::Joint< Scalar >::get_parent_to_child_transform ( const Scalar &  q)
inline

Compute the transform from parent to child.

Parameters
qThe joint position variable.
Returns
Homogeneous transform from parent to child.

◆ get_type()

template<typename Scalar >
std::string tr::model::Joint< Scalar >::get_type ( ) const
inline

Get joint type as a string.

Parameters
joint_typeThe joint type to convert to a string.
Returns
String representation of the joint type.

Member Data Documentation

◆ child_transform

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

Homogeneous transform to the child link.

◆ parent_transform

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

Homogeneous transform to the parent link.


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