Skip to content

Commit 81037cb

Browse files
author
earlaud
committed
Port contact tunning in default settings
1 parent 23fa376 commit 81037cb

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

include/simple-mpc/inverse-dynamics.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ namespace simple_mpc
3838
0.01) // Min force for one foot contact (express as a multiple of the robot weight)
3939

4040
// Tasks gains
41-
DEFINE_FIELD(double, kp_posture, 10.0)
4241
DEFINE_FIELD(double, kp_base, 10.0)
42+
DEFINE_FIELD(double, kp_posture, 10.0)
4343
DEFINE_FIELD(double, kp_contact, 10.0)
4444

4545
// Tasks weights
46-
DEFINE_FIELD(double, w_posture, 10)
47-
DEFINE_FIELD(double, w_base, 10)
48-
DEFINE_FIELD(double, w_contact_force, 10)
49-
DEFINE_FIELD(double, w_contact_motion, 10)
46+
DEFINE_FIELD(double, w_base, 10.)
47+
DEFINE_FIELD(double, w_posture, 1.0)
48+
DEFINE_FIELD(double, w_contact_force, 1.0)
49+
DEFINE_FIELD(double, w_contact_motion, 1e-1)
5050

5151
static Settings Default()
5252
{

tests/inverse_dynamics.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,7 @@ BOOST_AUTO_TEST_CASE(KinodynamicsID_contact)
6161
RobotModelHandler model_handler = getSoloHandler();
6262
RobotDataHandler data_handler(model_handler);
6363

64-
KinodynamicsID solver(
65-
model_handler, KinodynamicsID::Settings::Default()
66-
.set_w_base(10.0)
67-
.set_w_posture(1.0)
68-
.set_w_contact_force(1.0)
69-
.set_w_contact_motion(1e-1));
64+
KinodynamicsID solver(model_handler);
7065

7166
const Eigen::VectorXd q_target = model_handler.getReferenceState().head(model_handler.getModel().nq);
7267
Eigen::VectorXd f_target = Eigen::VectorXd::Zero(4 * 3);

0 commit comments

Comments
 (0)