Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nested parameters #54

Open
ahoarau opened this issue May 16, 2018 · 5 comments
Open

nested parameters #54

ahoarau opened this issue May 16, 2018 · 5 comments

Comments

@ahoarau
Copy link
Contributor

ahoarau commented May 16, 2018

It would be awesome if we could do :

some_group:
   a_param: 0
   b_param: 0
some_other_group:
   a_param: 0
   b_param: 0
   c_param: 0

I though it was the purpose of 'groups', but it's only a dynamic reconfigure goodie.

@artivis
Copy link
Collaborator

artivis commented Jun 6, 2018

Hi, thanks for the comment. What would you expect some_group to be ? A nested namespace ?
Cheers.

@ahoarau
Copy link
Contributor Author

ahoarau commented Jun 6, 2018

Yes exactly. Practical example : a pid controller. The param yaml would be something like :

controller_name : test
some_other_param : 2
pid:
    p: [ 1, 2, 3 ]
    i:  [ 1, 2, 3 ]
    d: [ 1, 2, 3 ]

But for that I would have to define a config for each 'level' ( the level that contains controller_name and some_other_param and another for the pid alone)

@artivis
Copy link
Collaborator

artivis commented Jun 6, 2018

I definitely see the interest in this feature, but it would be a little tricky to implement. Since a nested namespace could be provided for each parameter, one as to keep tracks of the associated namespaces.

I'll have a look but I can't make it a priority right now, I'm open to discussion if you want to tackle it yourself ;) .

@ahoarau
Copy link
Contributor Author

ahoarau commented Jun 6, 2018

I can add that in the end I'd like to have :

    ros::NodeHandle nh("~");
    ParamType testParams(nh);
    testParams.fromParamServer();
    testParams.pid().p; // --> vector of double or eigen vector

I'll have a look but I can't make it a priority right now, I'm open to discussion if you want to tackle it yourself ;)

I was counting on you guys :) But i'll definitely have a look.

@artivis
Copy link
Collaborator

artivis commented Jun 7, 2018

You actually expect a nested struct from the cpp implementation. That 's a different story. It is even more complicated to implement and I don't know if it is actually desirable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants