lagadic / visp_ros

A basket of generic ros nodes based on ViSP library
GNU General Public License v2.0
38 stars 31 forks source link

The Homogeneous Matrix flMe maybe wrong. #32

Open allbluelai opened 1 year ago

allbluelai commented 1 year ago

The Homogeneous Matrix flMe maybe wrong. According to Franka Emika Robot’s Instruction Handbook [see Page 164 of the handbook], the corrected one is: vpHomogeneousMatrix flMe( vpTranslationVector( 0, 0, 0.1034 ), vpRotationMatrix( { std::cos( vpMath::rad( 45 ) ), std::sin( vpMath::rad( 45 ) ), 0, -std::sin( vpMath::rad( 45 ) ), std::cos( vpMath::rad( 45 ) ), 0, 0, 0, 1 } ) );

aaoliva commented 1 year ago

Hi allbluelai,

The homogeneous matrix you are mentioning on the manufacturer's documentation is indeed correct; The orientation of the end-effector with respect to the flange has a rotation about the z-axis of -45 deg. In the example you are mentioning though, we are showing a way to manually set the pose of the end-effector (for any arbitrary gripper you may want to use, even the Franka gripper with a different definition of the ee pose). So this transformation was written on purpose this way to showcase this feature. As you can see from the example, this part of the code is not executed, since it is inside a if( 0 ) condition. The simulator by default, takes the pose of the frame EE on the CoppeliaSim scene and uses it as the ee pose (w.r.t. the flange) as flMe.

Hope this clarifies.