File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace simple_mpc
66 FrictionCompensation::FrictionCompensation (const Model & model, const long actuation_size)
77 {
88 corrected_torque_.resize (actuation_size);
9- dry_friction_ = model.lowerDryFrictionLimit ;
9+ dry_friction_ = model.friction ;
1010 viscuous_friction_ = model.damping ;
1111 }
1212
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ BOOST_AUTO_TEST_CASE(dry_viscuous_friction)
1616
1717 pinocchio::urdf::buildModel (urdf_path, JointModelFreeFlyer (), model);
1818 long nu = 12 ;
19- model.lowerDryFrictionLimit = Eigen::VectorXd::Constant (nu, .5 );
19+ model.friction = Eigen::VectorXd::Constant (nu, .5 );
2020 model.damping = Eigen::VectorXd::Constant (nu, .05 );
2121
2222 FrictionCompensation friction = FrictionCompensation (model, nu);
2323
24- BOOST_CHECK_EQUAL (model.lowerDryFrictionLimit , friction.dry_friction_ );
24+ BOOST_CHECK_EQUAL (model.friction , friction.dry_friction_ );
2525 BOOST_CHECK_EQUAL (model.damping , friction.viscuous_friction_ );
2626
2727 Eigen::VectorXd velocity = Eigen::VectorXd::Random (nu);
@@ -33,7 +33,7 @@ BOOST_AUTO_TEST_CASE(dry_viscuous_friction)
3333 for (long i = 0 ; i < nu; i++)
3434 {
3535 double sgn = (velocity[i] > 0 ) - (velocity[i] < 0 );
36- ctorque[i] = torque[i] + model.lowerDryFrictionLimit [i] * sgn + model.damping [i] * velocity[i];
36+ ctorque[i] = torque[i] + model.friction [i] * sgn + model.damping [i] * velocity[i];
3737 }
3838
3939 BOOST_CHECK (friction.corrected_torque_ .isApprox (ctorque));
You can’t perform that action at this time.
0 commit comments