I'm excited to see this get worked on.
I have plenty of other stuff to work on, but this whole "targeting" issue is at the heart of some other stuff in the works for the HST.
All right. I've tuned the coordinates and now making some tests.
Good news, all slight mismatches between end-effector and payload are gone, the end effector remains always perfectly centred and tangent on the grapple target once attached in all directions.
Bad news: I've found a subtle bug which needs to be fixed before Wayne can add any 3D frames on the end effector. We have forgotten a roll. What I mean is that even if you don't order a roll motion on the end effector, there is a roll induced by the motion of all the other parts of the arm onto the end effector. Look at your own arm, put and freeze your fingers perpendicular inside, and move your arm up and down with frozen elbow attitude. Your fingers roll, and we don't have that coded.
The interesting part is that this is completely invisible if you use the manual augmented mode, because all motions in this mode are at fixed attitude. But if you use the "Single" joint mode, and start changing pitch with the wrist yaw large, like 70 to 90 degrees, the payload does not roll whereas it should. I've spotted this because the camera calculations are also missing this part, and even though it remains fixed w.r.t the payload, we clearly see the 3D model of the end effector rotating. And, Wayne, since you add a 3D frame onto the 3D end effector, I need to fix this for the camera. But if I fix this for the camera, I need also to fix it for the RMS. So, still quite some work to do!