Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 8d6251c

Browse files
committed
[sot-dynamic-pinocchio] fix getFrameJacobian
1 parent 54f27d2 commit 8d6251c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/sot-dynamic-pinocchio.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,8 @@ computeGenericJacobian(const bool isFrame, const int jointId, dg::Matrix& res,co
745745

746746
//Computes Jacobian in world coordinates.
747747
if(isFrame){
748-
se3::framesForwardKinematics(*m_model,*m_data);
749-
se3::getFrameJacobian(*m_model,*m_data,(se3::Model::Index)jointId,tmp);
748+
se3::getJacobian<se3::WORLD>(*m_model,*m_data,
749+
m_model->frames[(se3::Model::Index)jointId].parent,tmp);
750750
}
751751
else
752752
se3::getJacobian<se3::WORLD>(*m_model,*m_data,(se3::Model::Index)jointId,tmp);
@@ -768,6 +768,7 @@ computeGenericEndeffJacobian(const bool isFrame, const int jointId,dg::Matrix& r
768768
//TODO: Find a way to remove tmp object
769769
se3::Data::Matrix6x tmp = Eigen::MatrixXd::Zero(6,m_model->nv);
770770
//std::string temp;
771+
//Computes Jacobian in end-eff coordinates.
771772
if(isFrame){
772773
se3::framesForwardKinematics(*m_model,*m_data);
773774
se3::getFrameJacobian(*m_model,*m_data,(se3::Model::Index)jointId,tmp);
@@ -777,7 +778,7 @@ computeGenericEndeffJacobian(const bool isFrame, const int jointId,dg::Matrix& r
777778
}
778779
else {
779780
//temp = m_model->getJointName((se3::Model::Index)jointId);
780-
se3::getJacobian<se3::WORLD>
781+
se3::getJacobian<se3::LOCAL>
781782
(*m_model,*m_data,(se3::Model::Index)jointId,tmp);
782783
sotDEBUG(25) << "EndEffJacobian for "
783784
<< m_model->getJointName((se3::Model::Index)jointId)

0 commit comments

Comments
 (0)