File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -133,10 +133,11 @@ void KinodynamicsID::setTarget(
133133 postureTask_->setReference (samplePosture_);
134134
135135 // Base task
136- tsid::math::SE3ToVector (data_handler_.getBaseFramePose (), sampleBase_.pos );
137- sampleBase_.setDerivative (v_target.head <6 >());
138- sampleBase_.setSecondDerivative (a_target.head <6 >());
139- baseTask_->setReference (sampleBase_);
136+ const pinocchio::SE3 oMb{data_handler_.getBaseFramePose ()};
137+ const pinocchio::SE3 oMb_rotation (oMb.rotation (), Eigen::Vector3d::Zero ());
138+ const pinocchio::Motion v_world_aligned{oMb_rotation.act (pinocchio::Motion (v_target.head <6 >()))};
139+ const pinocchio::Motion a_world_aligned{oMb_rotation.act (pinocchio::Motion (a_target.head <6 >()))};
140+ baseTask_->setReference (oMb, v_world_aligned, a_world_aligned);
140141
141142 // Foot contacts
142143 for (std::size_t foot_nb = 0 ; foot_nb < model_handler_.getFeetNb (); foot_nb++)
You can’t perform that action at this time.
0 commit comments