Closed eacousineau closed 7 years ago
Saw the scope of the library. Closing the issue.
This code is imported from: http://www.lfd.uci.edu/~gohlke/code/transformations.py.html
I'd recommend checking out transforms3d: https://github.com/matthew-brett/transforms3d and https://pypi.python.org/pypi/transforms3d as an updated fork.
Also there's been some work toward packaging it for ROS too: https://github.com/ros/rosdistro/pull/12437
It appears that there may be an out of index bug with
rotation_from_matrix
(L319):The fix is to change the offending line to:That being said, it isn't really clear as to:
What is special aboutdirection
versuspoint
whenR
itself is a 3x3 rotation matrix. It also is not clear as to why a larger matrix is permitted.Why it is dividing by the last element. I'm a little rusty on linear algebra, but I believe this should be normalized withnumpy.linalg.norm
, but even that seems redundant.Should this code be trimmed?Tried
git blame
, but it appears that this code hunk hasn't been touched since it's first relevant commit back in 2009 (cf65bfc
).EDIT: Just looked at the example and at
rotation_matrix
, and it shows that this is a homogeneous matrix, oops lol :P