Skip to content

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

Closed

Description

@ftcteam8397

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);

Activity

  1. ItsHarper commented on Jun 15, 2022

    @ItsHarper
    Member

    Good catch, thank you.

  2. ItsHarper commented on Jun 23, 2022

    @ItsHarper
    Member

    This will be fixed in the next release.

  3. Windwoes commented on Jul 25, 2022

    @Windwoes
    Member

    Fixed in v7.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions