Skip to content

Commit

Permalink
mod car model method so returns nonthing
Browse files Browse the repository at this point in the history
  • Loading branch information
vSebas committed Feb 1, 2025
1 parent 56e2dc8 commit cdd6b9c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ double PIDLin::calculateManipulations(double chi1, double chi1_d, double chi1_do
chiX_dot_d_ = chi1_dot_d;
u_aux_ = -control_law_.update(chi1, chi1_d);
updateControlSignal();

return u_;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ void VTEC_SDC1_1DOF_PID::updateNonLinearFunctions() {
PIDLin::g_x_ = sdc1_model_->g_(0);
}

double VTEC_SDC1_1DOF_PID::calculateControlSignals(double chi1, double chi1_d, double chi1_dot_d) {
void VTEC_SDC1_1DOF_PID::calculateControlSignals(double chi1, double chi1_d, double chi1_dot_d) {
// Only in the case of the car, the next condition must be considered, as
// achieving reverse is not done by computing negative control signals. This
// must not be programed in any of the base controllers classes, as in the
// case of the boat and submarine, reverse is straightforward
return std::max(calculateManipulations(chi1, chi1_d, chi1_dot_d), 0.);
PIDLin::u_ = std::max(calculateManipulations(chi1, chi1_d, chi1_dot_d), 0.);
}

void VTEC_SDC1_1DOF_PID::updateControlSignals() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class VTEC_SDC1_1DOF_PID : public PIDLin {

void updateNonLinearFunctions();

double calculateControlSignals(double chi1, double chi1_d, double chi1_dot_d);
void calculateControlSignals(double chi1, double chi1_d, double chi1_dot_d);

void updateControlSignals();

Expand Down

0 comments on commit cdd6b9c

Please sign in to comment.