cbandera / rosparam_handler

An easy wrapper for using parameters in ROS
Other
47 stars 26 forks source link

Feature load from another package #36

Open awesomebytes opened 6 years ago

awesomebytes commented 6 years ago

@artivis asked me to take a look into how to expand one .params file with another one. The easiest way I found after tinkering a bit was to load from another .params file from another package, and then you can add your additional parameters.

As the documentation says, there is an example package: https://github.com/awesomebytes/imported_rosparam_handler_test that imports from https://github.com/cbandera/rosparam_handler_tutorial and adds a couple of parameters extra.

I needed to do a few hacky things for the sake of not touching any already written .params file but it works nicely (as far as I've tried).

As improvements, instead of initializing, we could add a way of just expanding the parameters, and even remove some... but if that's not a real use case, there is no reason to implement it.

Also with this change one can test it's writing the .params file correctly by using an python (ipython please?) console as I needed to move to the generation step the error about having != 5 arguments.

artivis commented 6 years ago

Hi @awesomebytes,
would it be possible for you to rebase your branch on top of branch feature/parameters_base ?? Those two branches are going toward the same goal and are plained for an eventual 0.2 version.
Thanks !

awesomebytes commented 6 years ago

@artivis I clicked on Update, would that be enough? (CI is pending).

artivis commented 6 years ago

I actually meant that your branch is based on branch develop while it would be better based on branch feature/parameters_base. I will have a look see how much work does that actually implies.