diff --git a/apps/operationalSpaceControl/Controller.cpp b/apps/operationalSpaceControl/Controller.cpp index eec06fcb86804..91736df99c0e3 100644 --- a/apps/operationalSpaceControl/Controller.cpp +++ b/apps/operationalSpaceControl/Controller.cpp @@ -50,10 +50,10 @@ Controller::Controller(dart::dynamics::Skeleton* _robot, mForces.setZero(dof); - mKp.setZero(dof, dof); - mKv.setZero(dof, dof); + mKp.setZero(); + mKv.setZero(); - for (int i = 0; i < dof; ++i) + for (int i = 0; i < 3; ++i) { mKp(i, i) = 750.0; mKv(i, i) = 250.0; diff --git a/apps/operationalSpaceControl/Controller.h b/apps/operationalSpaceControl/Controller.h index e691f8d78c992..ff3e3e493f42a 100644 --- a/apps/operationalSpaceControl/Controller.h +++ b/apps/operationalSpaceControl/Controller.h @@ -75,10 +75,10 @@ class Controller Eigen::VectorXd mForces; /// \brief Proportional gain for the virtual spring forces at the end effector - Eigen::MatrixXd mKp; + Eigen::Matrix3d mKp; /// \brief Derivative gain for the virtual spring forces at the end effector - Eigen::MatrixXd mKv; + Eigen::Matrix3d mKv; }; #endif // APPS_OPERATIONALSPACECONTROL_CONTROLLER_H_