Skip to content

Commit

Permalink
Fixed corner cases for ProjectToSO3(), and added a reference in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
HuanWeng committed Jan 31, 2023
1 parent c849e4b commit 36f0f1b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Some unofficial versions in other languages are being developed:

Some libraries built on ours:
* [KinematicsFromDescriptionTool](https://github.com/Interbotix/kinematics_from_description), which calculates the kinematics input parameters from a robot's URDF or robot_description parameter using ROS and Python3.
* [mr_urdf_loader](https://github.com/tjdalsckd/mr_urdf_loader), which generates `M`, `Slist`, `Blist`, `Mlist` and `Glist` parameters for kinematics and dynamics. It also provides UR5 simulation using `PyBullet`.
* [tf_rbdl](https://github.com/junhyeokahn/tf_rbdl#tf_rbdl), which refactors the Python version using the package `tensorflow`.

Any contribution is welcomed but the maintenance team for this library here doesn't vouch for the reliability of those projects.
4 changes: 2 additions & 2 deletions packages/MATLAB/mr/ProjectToSO3.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
R = U * V';
if det(R) < 0
% In this case the result may be far from mat.
R = [R(:, 1: 2); -R(:, 3)];
R = [R(:, 1: 2), -R(:, 3)];
end
end
end
2 changes: 1 addition & 1 deletion packages/Python/modern_robotics/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def ProjectToSO3(mat):
R = np.dot(U, Vh)
if np.linalg.det(R) < 0:
# In this case the result may be far from mat.
R[:, s[2, 2]] = -R[:, s[2, 2]]
R[:, 2] = -R[:, 2]
return R

def ProjectToSE3(mat):
Expand Down

0 comments on commit 36f0f1b

Please sign in to comment.