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:29
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
Eigen::Transform< Scalar, 3, Eigen::Isometry > center_of_mass
Center of mass of the link.
Definition: link.hpp:31
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
Link< NewScalar > cast()
Casts the link to a new scalar type.
Definition: link.hpp:60