Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dimension Error in org.firstinspires.ftc.robotcore.external.matrices.MatrixF.inverted() method #316

Closed
ftcteam8397 opened this issue Apr 22, 2022 · 3 comments

Comments

@ftcteam8397
Copy link

For a 4x4 input matrix, this method returns a 4x4 matrix as expected. Likewise, for a 3x3 input matrix, it returns a 3x3 matrix. But for input matrices that are 2x2 or 1x1, this method returns a 4x4 matrix (filling in only the upper left 2x2 or 1x1 entries).

This causes a problem when one needs to continue with matrix math operations on the result. For example, if P and R are both 2x2 matrices, the following will throw an exception:

MatrixF K = P.multiplied(P.added(R).inverted);

@NoahAndrews
Copy link
Member

Good catch, thank you.

@NoahAndrews
Copy link
Member

This will be fixed in the next release.

@Windwoes
Copy link
Member

Fixed in v7.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants