sim.invertMatrix function doesn't seem to be working

Report crashes, strange behaviour, or apparent bugs
Post Reply
atoz
Posts: 57
Joined: 18 Oct 2013, 09:02

sim.invertMatrix function doesn't seem to be working

Post by atoz »

Hi,

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

Code: Select all

print(sim.invertMatrix(sim.buildIdentityMatrix()))
gives 1 as the answer although the matrix is invertible.

Is this a bug?

*EDIT* Just to add to this, the

Code: Select all

sim.getEulerAnglesFromMatrix()
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.

Cheers

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

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

Post by coppelia »

Hello,

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

Cheers

Post Reply