bit-bots / bitbots_main

This git contains all RoboCup code from the Hamburg Bit-Bots.
https://bit-bots.de
MIT License
30 stars 11 forks source link

Predeclare and validate parameters by YAML #177

Open texhnolyze opened 1 year ago

texhnolyze commented 1 year ago

As in ros2 parameters have to be predeclared we want to configure them by YAML configuration while allowing validation and bounds, by utilizing: https://github.com/PickNikRobotics/generate_parameter_library

While the library generates C++ classes for python we need to implement our own approach, by potentially generating a class/object at runtime.

The follwoing steps must be done:

jaagut commented 9 months ago

From our meeting notes: Use only one YAML file if only one parameter set exists

Originally posted: https://github.com/bit-bots/bitbots_meta/issues/204#issue-1880466698

jaagut commented 9 months ago

This tool has already been introduced in the bitbots_template_repository. However the following parameter-files need to be replaced:

84 files:

The following files need to be adapted too:

Originally posted: https://github.com/bit-bots/bitbots_meta/issues/204#issuecomment-1719456764

Flova commented 9 months ago

This tool has already been introduced in the bitbots_template_repository. However the following parameter-files need to be replaced:

Not all parameter files need to be replaced tho! Only one template is needed for a given parameter set. If two (e.g.) sim and real or different robots (like here https://github.com/bit-bots/bitbots_motion/pull/423) are present a single template can be used to declare parameters whose values are loaded the normal way from the old style parameter file. Normally both files would be needed ether way (one for the template and one for the actual parameter set), but this can be simplified into one file if we utilize the default value option in the declaration process. This is also possible if params are declared by code (the way without the lib). But by including them in the template only a single file is needed. Normal parameters files are still needed if multiple sets are present.