Open croesmann opened 4 years ago
Hi @croesmann @amakarow, any plans to do it? If no, could you please elaborate more what is the idea of sharing distances computation?
Ok, I think I got where's the problem of sharing computations. We'd like to share the computations in both update() functions in StageCost and in InequalityConstraints. I guess we have to modify NlpFunctions::update(). I will start with implementing independent update for penalty cost and then if succeded to move common computations to NlpFunctions::update()? @croesmann @amakarow, if you've got any guidelines, please share :)
Currently, the mpc_local_planner considers obstacles only by hard-constraints. This allows the planner to pass obstacles very close by without even trying to increase the distance. The DWA planner tackles this problem by taking an inflation layer from costmap_2d into account. The teb_local_planner also provides an inflation concept based on penalty cost functions.
It is also possible to add an inflation concept to the mpc_local_planner, however, an efficient implementation that shares distance computations for both penalty costs and hard-constraints is a bit difficult (but not impossible ;-)) with the current API. So before I start working on this, I would like to wait for some test reports and user experiences.