ADVRHumanoids / cartesio_planning

Package for whole body sampling based planning
1 stars 0 forks source link

CentroidalStatics->init() function must be handled differently #19

Open lucarossini-iit opened 3 years ago

lucarossini-iit commented 3 years ago

So far, we moved the init() function from setContactLinks() and setContactRotationMatrix functions to a public class member function in order to minimize its number of calls and OpenSoT problem generation as well.

At the moment, the procedure should be:

If the init() is called after setting the rotation matrices, they will be re-initialized as identity matrices leading to an error. In my opinion this procedure is not intuitive and the init() function should be put again inside the setContactLinks(), setOptimizeTorque(), setFrictionCoefficien() functions.

EnricoMingo commented 3 years ago

If I remember well we moved out to avoid re-initialization of the problem every time a new one setter is called. We could eventually handle the initialization internally in the solve. Something like: every time a setter is called an internal (to_initi) flag is set to true. When solved, if to_init is true, init() is called and the flag is set to false.