Page 1 of 1

sim.invertMatrix function doesn't seem to be working

Posted: 22 Sep 2018, 19:59
by atoz

The above mentioned function always gives 1 as a result of an inversion. Even this simple code:

Code: Select all

gives 1 as the answer although the matrix is invertible.

Is this a bug?

*EDIT* Just to add to this, the

Code: Select all

function is also buggy as the values for the second angle (y-axis) jump around. Whereas, when I used the method in this pdf, I get a continous range.


Re: sim.invertMatrix function doesn't seem to be working

Posted: 01 Oct 2018, 07:29
by coppelia

from the documentation of the sim.invertMatrix, it clearly states:
return value: -1 if operation was not successful. In a future release, a more differentiated return value might be available
Did you check if your provided matrix was inverted or not? THe function return value just gives an information about whether it was successfully inverted or not.

About the Euler angles remark: jumping values in Euler angles are normal, since at some point you lose one degree of freedom (gimbal lock).