9namespace tinyrobotics {
15 template <
typename Scalar>
32 Eigen::Transform<Scalar, 3, Eigen::Isometry>::Identity();
35 Eigen::Matrix<Scalar, 3, 3>
inertia = Eigen::Matrix<Scalar, 3, 3>::Zero();
44 Eigen::Matrix<Scalar, 6, 6> I = {};
59 template <
typename NewScalar>
69 new_link.
joint =
joint.template cast<NewScalar>();
70 new_link.I = I.template cast<NewScalar>();
Contains struct for representing a joint in a tinyrobotics model.
Represents a joint in a tinyrobotics model which connects two links.
Definition: Joint.hpp:28
Represents a link in a tinyrobotics model.
Definition: Link.hpp:16
std::string name
Name of the link.
Definition: Link.hpp:19
int idx
Index of the link in the model's link vector.
Definition: Link.hpp:22
Scalar mass
Mass of the link [kg].
Definition: Link.hpp:38
Eigen::Matrix< Scalar, 3, 3 > inertia
Inertia matrix of the link [kg m^2].
Definition: Link.hpp:35
Joint< Scalar > joint
Joint connecting the link to its parent link.
Definition: Link.hpp:41
std::vector< int > child_links
Vector of child link indices in the model's link vector.
Definition: Link.hpp:28
int parent
Index of the link's parent link in the model's link vector.
Definition: Link.hpp:25
void add_child_link_idx(const int child_link_idx)
Add a child link index to the list of child links.
Definition: Link.hpp:50
Eigen::Transform< Scalar, 3, Eigen::Isometry > centre_of_mass
Center of mass of the link.
Definition: Link.hpp:31
Link< NewScalar > cast()
Casts the link to a new scalar type.
Definition: Link.hpp:60