fixed incorrect conversion from rotation matrix to quaternion #73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
assigning signs to
x
,y
,z
andw
was executed multiple times in functionquat_from_rotation_matrix
, which is inconsistent with that was described in reference (http://www.cg.info.hiroshima-cu.ac.jp/~miyazaki/knowledge/teche52.html). And it made the conversion incorrect.For example, for rotation matrix
[[-0.87, -0.50, 0.00], [0.00, 0.00, 1.00], [-0.50, 0.87, 0.00]]
, the corresponding quatenion is[0.18, 0.68, 0.68, -0.18]
([w, x, y, z]), while the function gives[0.18, 0.68, 0.68, 0.18]
.