ADVRHumanoids / OpenSoT

An Open Source Task Solving library with Constraints
GNU General Public License v3.0
70 stars 5 forks source link

Reducing the amount of outputs to the terminal #111

Closed lothas closed 6 years ago

lothas commented 6 years ago

Would it be possible to add a simple setting for OpenSoT to make it stop printing so much outputs to the terminal? Or even better, to write those outputs to a desired savefile instead of the terminal?

I'm talking about these outputs:

INFO:  Iteration 0 ...
INFO:   Stepsize is 1.000000000000000e+00!
INFO:  Optimal solution of neighbouring QP found
INFO:  Initialisation done
ERROR:  At least one of the arguments is invalid
->ERROR:  Failed to setup auxiliary QP for initialised homotopy
  ->WARNING:  QProblem has already been initialised

and also these:

[INFO]   Particle position task initialized
[info] PilerHelper: expanding to 2 x 1 
[info] PilerHelper: expanding to 2 x 1 
[info] PilerHelper: expanding to 2 x 1 
[info] PilerHelper: expanding to 2 x 1 
[info] Solver Default Options: 

###################   qpOASES  --  QP OPTIONS   ##################

printLevel                     =  PL_NONE

enableRamping                  =  BT_FALSE
enableFarBounds                =  BT_TRUE
enableFlippingBounds           =  BT_TRUE
enableRegularisation           =  BT_TRUE
enableFullLITests              =  BT_FALSE
enableNZCTests                 =  BT_FALSE
enableDriftCorrection          =  0
enableCholeskyRefactorisation  =  0
enableEqualities               =  BT_TRUE

terminationTolerance           =  2.221000e-07
boundTolerance                 =  2.221000e-10
boundRelaxation                =  1.000000e+04
epsNum                         =  -2.221000e-13
epsDen                         =  2.221000e-13
maxPrimalJump                  =  1.000000e+08
maxDualJump                    =  1.000000e+08

initialRamping                 =  5.000000e-01
finalRamping                   =  1.000000e+00
initialFarBounds               =  1.000000e+06
growFarBounds                  =  1.000000e+03
initialStatusBounds            =  ST_INACTIVE
epsFlipping                    =  2.221000e-13
numRegularisationSteps         =  2
epsRegularisation              =  2.221000e-11
numRefinementSteps             =  1
epsIterRef                     =  2.221000e-14
epsLITests                     =  2.221000e-11
epsNZCTests                    =  6.663000e-13

PROBLEM 0 ID: particle
eps Regularisation factor: 2.221e-11
CONSTRAINTS ID: AGGR_
     # OF CONSTRAINTS: 0
BOUNDS ID: AGGR_joint_limitsplusvelocity_limits
     # OF BOUNDS: 2
# OF VARIABLES: 2
EnricoMingo commented 6 years ago

Hi @lothas, I am going to check into the code why this happen...probably we should reset the default options when the solver is reset...

EnricoMingo commented 6 years ago

So...this is quite strange but from a test that I pushed in the last devel, the problem does not arise if you first add a solver.reset() before recreating the object. Basicallly:

solver.reset();
solver.reset(new QPOases_sot(...));

This should be related to the fact that the internal counter of the shared_ptr is set to 0 then the pointer is relased?

For now I'll close.