Skip to content
Snippets Groups Projects
Commit a56d01bf authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Fix computation of WaistWorldPositionSOUT.

    * src/angle-estimator.cpp: previous implementation did not take into account
      contactWorldPositionSIN and returned position of the waist in contact
      joint frame.
      New implementation returns position of the waist in the global frame.
parent d24b151e
No related branches found
No related tags found
1 merge request!1[major][cpp] starting point to integrate pinocchio
......@@ -289,18 +289,20 @@ computeWaistWorldPosition( MatrixHomogeneous& res,
sotDEBUGIN(15);
const MatrixHomogeneous & waistMleg = contactEmbeddedPositionSIN( time );
const MatrixHomogeneous& contactPos = contactWorldPositionSIN( time );
MatrixHomogeneous legMwaist; waistMleg.inverse( legMwaist );
MatrixHomogeneous tmpRes;
if( fromSensor_ )
{
const MatrixRotation & Rflex = flexibilitySOUT( time ); // footRleg
ml::Vector zero(3); zero.fill(0.);
MatrixHomogeneous footMleg; footMleg.buildFrom( Rflex,zero );
footMleg.multiply( legMwaist,res );
footMleg.multiply( legMwaist,tmpRes );
}
else { res = legMwaist; }
else { tmpRes = legMwaist; }
contactPos.multiply( tmpRes, res );
sotDEBUGOUT(15);
return res;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment