lagadic / visp_ros

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

What is cMo_vec[0] and why are the coordinates of the desired points set like this? #17

Closed allbluelai closed 3 years ago

allbluelai commented 3 years ago

I run the tutorial-franka-coppeliasim-ibvs-apriltag.cpp. Tthe definition of the 4 3D points corresponding to the CAD model of the Apriltag

point[0].setWorldCoordinates( -opt_tagSize / 2., -opt_tagSize / 2., 0 );
point[1].setWorldCoordinates( opt_tagSize / 2., -opt_tagSize / 2., 0 );
point[2].setWorldCoordinates( opt_tagSize / 2., opt_tagSize / 2., 0 );
point[3].setWorldCoordinates( -opt_tagSize / 2., opt_tagSize / 2., 0 );

It seems that the ponit[0] is at x<0 and y>0(as shown below). Why are the coordinates in the code(x<0 and y<0) different? Picture1

Besides, I calculate the cMo(= fMc.inverse() fMe eMo) and compare with cMo_vec[0]. It seems that cMo ≠ cMo_vec[0]. Why cMo ≠ cMo_vec[0]? fMc : the homogeneous transformation between the robot base frame and the camera frame eMo : the homogeneous transformation between the end-effector frame and the object(AprilTag) frame. fMe = robot.get_fMe() the homogeneous transformation between the robot base frame and the robot end-effector frame cMo : the homogeneous transformation between the camera frame and the object(AprilTag) frame I set fMc and eMo by reading the value in CoppeliaSim(as shown below). Picture2

allbluelai commented 3 years ago

According to the tutorial, I think the object (AprilTag) frame is wrong. Re-establish the object (AprilTag) frame, we can get the correct cMo(=cMo_vec[0]).