Skip to content
Snippets Groups Projects
Commit 5a0720b3 authored by fvalenza's avatar fvalenza
Browse files

Merge pull request #42 from jcarpent/topic/log3

[Fix Bug] Check norm of the vector to exponentiate
parents c9a9d80b 17773d47
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,10 @@ namespace se3
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(D,3);
typename D::Scalar nv = v.norm();
return Eigen::AngleAxis<typename D::Scalar>(nv, v / nv).matrix();
if (nv > 1e-14)
return Eigen::AngleAxis<typename D::Scalar>(nv, v / nv).matrix();
else
return Eigen::Matrix<typename D::Scalar,3,3,D::Options>::Identity();
}
/// \brief Log: SO3 -> so3.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment