Skip to content

Commit 87b06be

Browse files
Move logging to debug instead of info
1 parent 3cd6714 commit 87b06be

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

trajopt_ext/osqp_eigen/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ if(NOT ${OsqpEigen_FOUND} AND NOT TRAJOPT_OSQP_DISABLED)
2828
SOURCE_DIR ${CMAKE_BINARY_DIR}-src
2929
BINARY_DIR ${CMAKE_BINARY_DIR}-build
3030
CMAKE_CACHE_ARGS
31-
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
3231
-DCMAKE_BUILD_TYPE:STRING=Release
32+
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
3333
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
34-
-DVCPKG_TARGET_TRIPLET:STRING=${VCPKG_TARGET_TRIPLET})
34+
-DVCPKG_TARGET_TRIPLET:STRING=${VCPKG_TARGET_TRIPLET}
35+
-DOSQP_EIGEN_DEBUG_OUTPUT=OFF
36+
)
3537

3638
if(TRAJOPT_PACKAGE)
3739
find_package(ros_industrial_cmake_boilerplate REQUIRED)

trajopt_optimizers/trajopt_sqp/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<depend>trajopt_ifopt</depend>
2020
<depend>trajopt_common</depend>
2121
<depend>tesseract_common</depend>
22+
<depend>tesseract_state_solver</depend>
2223
<depend>tesseract_visualization</depend>
2324

2425
<test_depend>gtest</test_depend>

trajopt_optimizers/trajopt_sqp/src/trust_region_sqp_solver.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ void TrustRegionSQPSolver::solve(const QPProblem::Ptr& qp_problem)
105105
const double elapsed_time = std::chrono::duration<double, std::milli>(Clock::now() - start_time).count() / 1000.0;
106106
if (elapsed_time > params.max_time)
107107
{
108-
CONSOLE_BRIDGE_logInform("Elapsed time %f has exceeded max time %f", elapsed_time, params.max_time);
108+
CONSOLE_BRIDGE_logDebug("Elapsed time %f has exceeded max time %f", elapsed_time, params.max_time);
109109
status_ = SQPStatus::OPT_TIME_LIMIT;
110110
break;
111111
}
112112

113113
if (results_.overall_iteration >= params.max_iterations)
114114
{
115-
CONSOLE_BRIDGE_logInform("Iteration limit");
115+
CONSOLE_BRIDGE_logDebug("Iteration limit");
116116
status_ = SQPStatus::ITERATION_LIMIT;
117117
break;
118118
}
@@ -146,7 +146,7 @@ void TrustRegionSQPSolver::solve(const QPProblem::Ptr& qp_problem)
146146
if (status_ == SQPStatus::RUNNING)
147147
{
148148
status_ = SQPStatus::PENALTY_ITERATION_LIMIT;
149-
CONSOLE_BRIDGE_logInform("Penalty iteration limit, optimization couldn't satisfy all constraints");
149+
CONSOLE_BRIDGE_logDebug("Penalty iteration limit, optimization couldn't satisfy all constraints");
150150
}
151151

152152
// Final Cleanup
@@ -161,13 +161,13 @@ bool TrustRegionSQPSolver::verifySQPSolverConvergence()
161161
// Check if constraints are satisfied
162162
if (results_.best_constraint_violations.size() == 0)
163163
{
164-
CONSOLE_BRIDGE_logInform("Optimization has converged and there are no constraints");
164+
CONSOLE_BRIDGE_logDebug("Optimization has converged and there are no constraints");
165165
return true;
166166
}
167167

168168
if (results_.best_constraint_violations.maxCoeff() < params.cnt_tolerance)
169169
{
170-
CONSOLE_BRIDGE_logInform("woo-hoo! constraints are satisfied (to tolerance %.2e)", params.cnt_tolerance);
170+
CONSOLE_BRIDGE_logDebug("woo-hoo! constraints are satisfied (to tolerance %.2e)", params.cnt_tolerance);
171171
return true;
172172
}
173173

@@ -183,14 +183,14 @@ void TrustRegionSQPSolver::adjustPenalty()
183183
{
184184
if (results_.best_constraint_violations[idx] > params.cnt_tolerance)
185185
{
186-
CONSOLE_BRIDGE_logInform("Not all constraints are satisfied. Increasing constraint penalties for %d", idx);
186+
CONSOLE_BRIDGE_logDebug("Not all constraints are satisfied. Increasing constraint penalties for %d", idx);
187187
results_.merit_error_coeffs[idx] *= params.merit_coeff_increase_ratio;
188188
}
189189
}
190190
}
191191
else
192192
{
193-
CONSOLE_BRIDGE_logInform("Not all constraints are satisfied. Increasing constraint penalties uniformly");
193+
CONSOLE_BRIDGE_logDebug("Not all constraints are satisfied. Increasing constraint penalties uniformly");
194194
results_.merit_error_coeffs *= params.merit_coeff_increase_ratio;
195195
}
196196
setBoxSize(fmax(results_.box_size[0], params.min_trust_box_size / params.trust_shrink_ratio * 1.5));
@@ -222,7 +222,7 @@ bool TrustRegionSQPSolver::stepSQPSolver()
222222

223223
if (results_.box_size.maxCoeff() < params.min_trust_box_size)
224224
{
225-
CONSOLE_BRIDGE_logInform("Converged because trust region is tiny");
225+
CONSOLE_BRIDGE_logDebug("Converged because trust region is tiny");
226226
status_ = SQPStatus::NLP_CONVERGED;
227227
return true;
228228
}

trajopt_sco/src/optimizers.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -924,18 +924,19 @@ OptStatus BasicTrustRegionSQP::optimize()
924924
{
925925
if (results_.cnt_viols[idx] > param_.cnt_tolerance)
926926
{
927-
LOG_INFO("Not all constraints are satisfied. Increasing constraint penalties for %s", CSTR(cnt_names[idx]));
927+
LOG_DEBUG("Not all constraints are satisfied. Increasing constraint penalties for %s",
928+
CSTR(cnt_names[idx]));
928929
merit_error_coeffs[idx] *= param_.merit_coeff_increase_ratio;
929930
}
930931
}
931932
}
932933
else
933934
{
934-
LOG_INFO("Not all constraints are satisfied. Increasing constraint penalties uniformly");
935+
LOG_DEBUG("Not all constraints are satisfied. Increasing constraint penalties uniformly");
935936
for (auto& merit_error_coeff : merit_error_coeffs)
936937
merit_error_coeff *= param_.merit_coeff_increase_ratio;
937938
}
938-
LOG_INFO("New merit_error_coeffs: %s", CSTR(merit_error_coeffs));
939+
LOG_DEBUG("New merit_error_coeffs: %s", CSTR(merit_error_coeffs));
939940
param_.trust_box_size = fmax(param_.trust_box_size, param_.min_trust_box_size / param_.trust_shrink_ratio * 1.5);
940941
}
941942
} /* merit adjustment loop */

0 commit comments

Comments
 (0)