Closed lucasw closed 6 years ago
It looks like this is a problem with C++ getParam and nothing to do with dynamic reconfigure.
My current workaround is to use an int type for the dynamic reconfigure value and converting it back to a string inside the reconfigure callback, though this risks a inexact string match in the case of leading zeros (fortunately I'm not dealing with floats).
(type="str"
is fine for roslaunch params, but having to remember different conventions depending on command line vs. roslaunch is error prone)
Glad you found a workaround.
Thanks for providing the link to the upstream issue :+1: , that'll be helpful for people running into the some issue and landing on this ticket.
https://github.com/lucasw/dynamic_reconfigure_tools/tree/master/dynamic_reconfigure_example is an example C++ server with a str_t param that it prints out when reconfigured:
Alphanumeric strings work as expected:
But an int or float string gets dropped entirely in favor of the default "" value:
The server also happens to be a nodelet, I don't think that is related but I'll create a non-nodelet example server later.
The same thing works fine with a python server (the server prints out the entire config on reconfigure):