Skip to content

Commit 33a1cdd

Browse files
author
earlaud
committed
Remove pose_base_ member
1 parent 68dc872 commit 33a1cdd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

include/simple-mpc/inverse-dynamics.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ namespace simple_mpc
154154
postureTask_->setReference(samplePosture_);
155155

156156
// Base task
157-
pose_base_.rotation() = pinocchio::SE3::Quaternion(q_target[6], q_target[3], q_target[4], q_target[5]).matrix();
158-
pose_base_.translation() = q_target.head(3);
159-
tsid::math::SE3ToVector(pose_base_, sampleBase_.pos);
157+
const pinocchio::SE3 base_pose(
158+
pinocchio::SE3::Quaternion(q_target[6], q_target[3], q_target[4], q_target[5]), q_target.head<3>());
159+
tsid::math::SE3ToVector(base_pose, sampleBase_.pos);
160160
sampleBase_.setDerivative(v_target.head(6));
161161
sampleBase_.setSecondDerivative(a_target.head(6));
162162
baseTask_->setReference(sampleBase_);
@@ -229,7 +229,6 @@ namespace simple_mpc
229229
tsid::solvers::HQPOutput last_solution_;
230230
tsid::trajectories::TrajectorySample samplePosture_; // TODO: no need to store it
231231
tsid::trajectories::TrajectorySample sampleBase_; // TODO: no need to store it
232-
pinocchio::SE3 pose_base_;
233232
};
234233

235234
} // namespace simple_mpc

0 commit comments

Comments
 (0)