Skip to content
This repository has been archived by the owner on Nov 13, 2017. It is now read-only.

Commit

Permalink
Merge pull request #282 from ubi-agni/fix-revolute-angle-computation
Browse files Browse the repository at this point in the history
fixed RevoluteJointModel::computeVariablePositions
  • Loading branch information
rhaschke committed May 14, 2016
2 parents 8206cf7 + 01c44b8 commit df74f90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion robot_model/src/revolute_joint_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,5 +244,7 @@ void moveit::core::RevoluteJointModel::computeVariablePositions(const Eigen::Aff
{
Eigen::Quaterniond q(transf.rotation());
q.normalize();
joint_values[0] = acos(q.w())*2.0f;
size_t maxIdx;
axis_.array().abs().maxCoeff(&maxIdx);
joint_values[0] = 2.*atan2(q.vec()[maxIdx] / axis_[maxIdx], q.w());
}

0 comments on commit df74f90

Please sign in to comment.