tud-amr / localPlannerBench

Local Planner Bench
https://tud-amr.github.io/localPlannerBench/
GNU General Public License v3.0
50 stars 5 forks source link

Simplify the process of adding a new metric #5

Open niketagrawal opened 2 years ago

maxspahn commented 2 years ago

Currently, if a new metric needs to be added, the name of the metric must be added at various places in the code. This process can be made simpler.

https://github.com/maxspahn/localPlannerBench/blob/d2e5f47acd8ddcb2bdca362f04c3258991510d31/plannerbenchmark/exec/postProcessor#L30

https://github.com/maxspahn/localPlannerBench/blob/d2e5f47acd8ddcb2bdca362f04c3258991510d31/plannerbenchmark/exec/postProcessor#L180

niketagrawal commented 2 years ago

Developer notes on the current implementation:

niketagrawal commented 2 years ago

Expected functionality (tentative): A metric class should be instantiated for a particular type of robot based on the arguments passed in the postprocessor command. Currently, all metric class are being instantiated for all types of robots in advance.

maxspahn commented 2 years ago

This could be done with the registry pattern. Similar to #25 for planners.