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

Commit 33d7cce

Browse files
committed
[sot-dynamic-pinocchio][BUG] fix bug from prev pr. frameJacobian is already in world frame
1 parent 5732aad commit 33d7cce

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/sot-dynamic-pinocchio.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -742,12 +742,14 @@ computeGenericJacobian(const bool isFrame, const int jointId, dg::Matrix& res,co
742742

743743
//TODO: Find a way to remove tmp object
744744
se3::Data::Matrix6x tmp = Eigen::MatrixXd::Zero(6,m_model->nv);
745+
745746
//Computes Jacobian in world coordinates.
746747
if(isFrame){
747-
//se3::framesForwardKinematics(*m_model,*m_data);
748-
se3::getJacobian<se3::LOCAL>(*m_model,*m_data,(se3::Model::Index)jointId,tmp);
748+
se3::framesForwardKinematics(*m_model,*m_data);
749+
se3::getFrameJacobian(*m_model,*m_data,(se3::Model::Index)jointId,tmp);
749750
}
750-
else se3::getJacobian<se3::WORLD>(*m_model,*m_data,(se3::Model::Index)jointId,tmp);
751+
else
752+
se3::getJacobian<se3::WORLD>(*m_model,*m_data,(se3::Model::Index)jointId,tmp);
751753
res = tmp;
752754
sotDEBUGOUT(25);
753755
return res;
@@ -767,8 +769,8 @@ computeGenericEndeffJacobian(const bool isFrame, const int jointId,dg::Matrix& r
767769
se3::Data::Matrix6x tmp = Eigen::MatrixXd::Zero(6,m_model->nv);
768770
//std::string temp;
769771
if(isFrame){
770-
//se3::framesForwardKinematics(*m_model,*m_data);
771-
se3::getJacobian<se3::LOCAL>(*m_model,*m_data,(se3::Model::Index)jointId,tmp);
772+
se3::framesForwardKinematics(*m_model,*m_data);
773+
se3::getFrameJacobian(*m_model,*m_data,(se3::Model::Index)jointId,tmp);
772774
sotDEBUG(25) << "EndEffJacobian for "
773775
<< m_model->frames.at((se3::Model::Index)jointId).name
774776
<<" is "<<tmp<<std::endl;

0 commit comments

Comments
 (0)