computer-graphics-kinematics icon indicating copy to clipboard operation
computer-graphics-kinematics copied to clipboard

What is the output of forward_kinematics()?

Open CalinArdelean opened this issue 5 years ago • 2 comments

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.

CalinArdelean avatar Nov 17 '19 23:11 CalinArdelean

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>.

abhimadan avatar Nov 17 '19 23:11 abhimadan

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.

rarora7777 avatar Nov 18 '19 02:11 rarora7777