Open jkenney2 opened 4 years ago
What phone are you using?
Moto G4 Play (XT1609). BTW, the getRobotLocation() / getFtcFieldFromRobot() methods (which don't rely on getPoseCorrectionMatrix) work fine.
Our team (4100) also gets this result.
And the annotation says that the getPose() / getFtcCameraFromTarget() returns the pose of the object in the FTC Camera Coordinate System
. Here the FTC Camera Coordinate System isn't clearly explained.
The best solution here might just be return the pose of the object in the FTC Robot Coordinate System
instead.
The getPose() method (used with the BACK camera) returns x and y values that are the negative of what would be expected. That is, with the phone in portrait orientation, the x and y values are negative when the target is in the upper right of the screen. I believe this is the result of an error in the getPoseCorrectionMatrix() method: shouldn't the line
case BACK: return phoneFromFtcCameraBack;
instead read
case BACK: return phoneFromVuforiaCameraBack; //??
An unrelated aside: upon inspecting this class, I'm also wondering if the phoneFromVuforiaCameraFront matrix is incorrect. I think the correct matrix would be:
0 1 0 0 -1 0 0 0 0 0 1 0 0 0 0 1
But because OpenGLMatrix is Column-Major, I think it is the transposition of that matrix that has been used.