computer-graphics-kinematics
computer-graphics-kinematics copied to clipboard
What is the output of forward_kinematics()?
forward_kinematics returns T, which is a vector with 2 components. std::vector<Eigen::Affine3d,Eigen::aligned_allocatorEigen::Affine3d > & T); What is the meaning of these 2 components? Intuitively, I think the first component is the rotation and the 2nd one is the translation for each bone, but I'm not sure.
The second component of the template specifies the allocator that std::vector
uses whenever it creates a new element. It's not usually required but Eigen requires its vectors to be aligned a certain way, so that allocator is required to use it with std::vector
or any other STL container. The behaviour of the allocator doesn't affect the rest of the API though, so think of it as just a std::vector<Eigen::Affine3d>
.
Since you said you think the first is rotation and second is translation, I would add some more detail here:
An object of type Eigen::Affine3d
is a 3D affine transformation, that is, just a 4x4 matrix.