Skip to content

fix(autoware_qp_interface): incorrect parameter passing in delegating constructor #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@
namespace autoware::qp_interface
{
constexpr c_float OSQP_INF = 1e30;
constexpr int OSQP_MAX_ITERATION = 20000;

class OSQPInterface : public QPInterface
{
public:
/// \brief Constructor without problem formulation
OSQPInterface(
const bool enable_warm_start = false, const int max_iteration = 20000,
const bool enable_warm_start = false, const int max_iteration = OSQP_MAX_ITERATION,
const c_float eps_abs = std::numeric_limits<c_float>::epsilon(),
const c_float eps_rel = std::numeric_limits<c_float>::epsilon(), const bool polish = true,
const bool verbose = false);
Expand Down
4 changes: 2 additions & 2 deletions common/autoware_qp_interface/src/osqp_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
const Eigen::MatrixXd & P, const Eigen::MatrixXd & A, const std::vector<double> & q,
const std::vector<double> & l, const std::vector<double> & u, const bool enable_warm_start,
const c_float eps_abs)
: OSQPInterface(enable_warm_start, eps_abs)
: OSQPInterface(enable_warm_start, OSQP_MAX_ITERATION, eps_abs)

Check warning on line 55 in common/autoware_qp_interface/src/osqp_interface.cpp

View check run for this annotation

Codecov / codecov/patch

common/autoware_qp_interface/src/osqp_interface.cpp#L55

Added line #L55 was not covered by tests
{
initializeProblem(P, A, q, l, u);
}
Expand All @@ -61,7 +61,7 @@
const CSC_Matrix & P, const CSC_Matrix & A, const std::vector<double> & q,
const std::vector<double> & l, const std::vector<double> & u, const bool enable_warm_start,
const c_float eps_abs)
: OSQPInterface(enable_warm_start, eps_abs)
: OSQPInterface(enable_warm_start, OSQP_MAX_ITERATION, eps_abs)

Check warning on line 64 in common/autoware_qp_interface/src/osqp_interface.cpp

View check run for this annotation

Codecov / codecov/patch

common/autoware_qp_interface/src/osqp_interface.cpp#L64

Added line #L64 was not covered by tests
{
initializeCSCProblemImpl(P, A, q, l, u);
}
Expand Down
Loading