diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b2d2dbdab2195a73907d3965305b97766fcaf91..c24e9ebe310fb54e4a475a8c461231317790c0ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,7 @@ MESSAGE( STATUS "CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS} ) OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" OFF) OPTION (USE_GLPK "Use sparse lp solver" OFF) +OPTION (PRINT_QHULL_INEQ "generate text file containing last inequality computed" OFF) IF(BUILD_PYTHON_INTERFACE) # search for python diff --git a/src/computeCOMTraj.cpp b/src/computeCOMTraj.cpp index 77eee815f1f7b79e4eaba9243ec562186629fb52..656a25cb72a1d8c4b23fdbc58628d3e62be74504 100644 --- a/src/computeCOMTraj.cpp +++ b/src/computeCOMTraj.cpp @@ -15,10 +15,6 @@ #include <limits> #include <algorithm> -#ifndef QHULL -#define QHULL 0 -#endif - static const int dimVarX = 3; static const int numRowsForce = 6; @@ -488,7 +484,7 @@ ResultDataCOMTraj computeCOMTrajFixedSize(const ProblemData& pData, const Vector std::pair<MatrixXX, VectorX> Hg = genCostFunction(pData,Ts,T,timeArray, dimVarX); VectorX x = VectorX::Zero(dimVarX); ResultData resQp = solve(Ab,Hg, x); -#if QHULL +#if PRINT_QHULL_INEQ if (resQp.success_) printQHullFile(Ab,resQp.x, "bezier_wp.txt"); #endif return genTraj(resQp, pData, T); @@ -518,7 +514,7 @@ ResultDataCOMTraj computeCOMTraj(const ProblemData& pData, const VectorX& Ts, std::pair<MatrixXX, VectorX> Hg = genCostFunction(pData,Ts,T,timeArray,Ab.first.cols()); VectorX x = VectorX::Zero(Ab.first.cols()); ResultData resQp = solve(Ab,Dd,Hg, minBounds, maxBounds, x, solver); -#if QHULL +#if PRINT_QHULL_INEQ if (resQp.success_) printQHullFile(Ab,resQp.x, "bezier_wp.txt"); #endif return genTraj(resQp, pData, T);