loco-3d / sl1m

Implementation of the sl1m solver for multi contact planning
BSD 2-Clause "Simplified" License
15 stars 15 forks source link

[Fix] getSurfacesFromGuide adding wrong surfaces to sequence. #21

Closed JasonChmn closed 2 years ago

JasonChmn commented 2 years ago

[Fix] getSurfacesFromGuide and continuous functions not adding the right surfaces to the sequence, as step_contacts and step_contacts_names are not in the same order. On two different runs, the functions return the lists in random orders.

Fix : find the surface associated to each intersection and reorder these lists.

Problem can be reproduced on the previous version : https://github.com/loco-3d/sl1m/blob/devel/sl1m/planner_scenarios/talos/stairs.py set USE_MIP=False and add print("last 2 right foot pos : ",result.all_feet_pos[0][-2:]) at line 60. Run test file two or three times ipython3 stairs.py, the foot positions printed should be the same, but it's not.

This needs to be fixed in rbprm-corba. These two functions needs to return the intersections and the names of the corresponding surfaces in the same order : https://github.com/humanoid-path-planner/hpp-rbprm-corba/blob/3a39a6b3e5ffaebd19fc346144e52aa504cdcf88/src/rbprmbuilder.impl.cc#L1360 https://github.com/humanoid-path-planner/hpp-rbprm-corba/blob/3a39a6b3e5ffaebd19fc346144e52aa504cdcf88/src/rbprmbuilder.impl.cc#L1315

List of surfaces were not sorted. Problem with MIP for which the order of surfaces for each phase impacts the exploration (number of nodes explored, computation time).