Skip to content

Commit

Permalink
return 0 in base class
Browse files Browse the repository at this point in the history
Signed-off-by: kyoichi-sugahara <[email protected]>
  • Loading branch information
kyoichi-sugahara committed Nov 2, 2023
1 parent 032b777 commit 7eab258
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class QPSolverInterface
const Eigen::VectorXd & lb, const Eigen::VectorXd & ub, const Eigen::VectorXd & lb_a,
const Eigen::VectorXd & ub_a, Eigen::VectorXd & u) = 0;

virtual int64_t getTakenIter() const = 0;
virtual double getRunTime() const = 0;
virtual double getObjVal() const = 0;
virtual int64_t getTakenIter() const {return 0;}
virtual double getRunTime() const {return 0.0;}
virtual double getObjVal() const {return 0.0;}
};
} // namespace autoware::motion::control::mpc_lateral_controller
#endif // MPC_LATERAL_CONTROLLER__QP_SOLVER__QP_SOLVER_INTERFACE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ class QPSolverEigenLeastSquareLLT : public QPSolverInterface
const Eigen::VectorXd & lb, const Eigen::VectorXd & ub, const Eigen::VectorXd & lb_a,
const Eigen::VectorXd & ub_a, Eigen::VectorXd & u) override;

int64_t getTakenIter() const override { return 0; }
double getRunTime() const override { return 0.0; }
double getObjVal() const override { return 0.0; }
int64_t getTakenIter() const override { return 1; };
// TODO(someone): calculate runtime and object value, otherwise just return 0 by base class
// double getRunTime() const override { return 0.0; }
// double getObjVal() const override { return 0.0; }

private:
};
Expand Down

0 comments on commit 7eab258

Please sign in to comment.