Skip to content

Commit

Permalink
Merge pull request #344 from dartsim/utilize_world_jacobian
Browse files Browse the repository at this point in the history
Utilize cached world Jacobian more in Jacobian getters
  • Loading branch information
jslee02 committed Mar 6, 2015
2 parents 6c31aee + 4e937be commit 7d8be94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dart/dynamics/BodyNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ math::Jacobian BodyNode::getJacobian(const Eigen::Vector3d& _offset,
{
if(this == _inCoordinatesOf)
return getJacobian(_offset);
if(_inCoordinatesOf->isWorld())
else if(_inCoordinatesOf->isWorld())
return getWorldJacobian(_offset);

Eigen::Isometry3d T = getTransform(_inCoordinatesOf);
Expand Down Expand Up @@ -787,6 +787,8 @@ math::LinearJacobian BodyNode::getLinearJacobian(
{
if(this == _inCoordinatesOf)
return getJacobian().bottomRows<3>();
else if(_inCoordinatesOf->isWorld())
return getWorldJacobian().bottomRows<3>();

return getTransform(_inCoordinatesOf).linear() * getJacobian().bottomRows<3>();
}
Expand All @@ -811,6 +813,8 @@ math::AngularJacobian BodyNode::getAngularJacobian(
{
if(this == _inCoordinatesOf)
return getJacobian().topRows<3>();
else if(_inCoordinatesOf->isWorld())
return getWorldJacobian().topRows<3>();

return getTransform(_inCoordinatesOf).linear() * getJacobian().topRows<3>();
}
Expand Down

0 comments on commit 7d8be94

Please sign in to comment.