File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#include " systems/controllers/osc/operational_space_control.h"
22
3+ #include < cmath>
34#include < iostream>
45
56#include < drake/multibody/plant/multibody_plant.h>
@@ -474,7 +475,7 @@ void OperationalSpaceControl::Build() {
474475 .get ();
475476 }
476477 // 3. external force cost
477- for (auto & force_tracking_data : *force_tracking_data_vec_) {
478+ for ([[maybe_unused]] auto & force_tracking_data : *force_tracking_data_vec_) {
478479 lambda_ext_cost_ =
479480 prog_
480481 ->AddQuadraticCost (MatrixXd::Zero (n_lambda_ext_, n_lambda_ext_),
@@ -1220,7 +1221,8 @@ void OperationalSpaceControl::CheckTracking(
12201221 if (soft_constraint_cost_ != nullptr ) {
12211222 soft_constraint_cost_->Eval (*epsilon_sol_, &y_soft_constraint_cost);
12221223 }
1223- if (y_soft_constraint_cost[0 ] > 1e5 || isnan (y_soft_constraint_cost[0 ])) {
1224+ if (y_soft_constraint_cost[0 ] > 1e5 ||
1225+ std::isnan (y_soft_constraint_cost[0 ])) {
12241226 output->get_mutable_value ()(0 ) = 1.0 ;
12251227 }
12261228}
You can’t perform that action at this time.
0 commit comments