robotology / unicycle-footstep-planner

Repository for the Unicycle-based FootStep Planner.
BSD 3-Clause "New" or "Revised" License
20 stars 11 forks source link

Add the possibility to disable the pause condition #21

Closed GiulioRomualdi closed 5 years ago

GiulioRomualdi commented 5 years ago

It would be nice to add the possibility to disable the pause condition

In https://github.com/robotology/unicycle-footstep-planner/pull/20/commits/dadc9927bf8af5f06e1ccd2bee65fd16ec9c41e9 , the problem was faced by adding a flag in the setPauseConditions() method. However, if I have to tell the truth I don't like this approach. What do you think to create a new function for enabling or disabling this feature? (i.e. something similar to addTerminalStep())

cc @S-Dafarra

S-Dafarra commented 5 years ago

Actually the flag pauseActive is by default false (https://github.com/robotology/unicycle-footstep-planner/blob/22d6d767d4f07ed5aeffe50c64f9b85bab7847fb/src/UnicycleGenerator.cpp#L33) and set to true when calling the setPauseConditions method. It should be enough not to call this method.

traversaro commented 5 years ago

I do not have a strong opinion on this particular case, but this article may be interesting: https://abseil.io/tips/94 .

GiulioRomualdi commented 5 years ago

As @S-Dafarra explained in https://github.com/robotology/unicycle-footstep-planner/issues/21#issuecomment-480206882 it is already possible to disable the pause condition. Thus we can close this issue.

S-Dafarra commented 5 years ago

Feel free to propose a better way to do that anyway :wink: