ros / dynamic_reconfigure

BSD 3-Clause "New" or "Revised" License
47 stars 112 forks source link

Default value and group reconfigurable variable #172

Open Teusner opened 3 years ago

Teusner commented 3 years ago

Hi,

I recently had an issue with using default values of variables in groups.

The problem is visible in the shell below. When we want to set a default value for a parameter belonging to a group, the initialization of this parameter is not possible if we try to access the default value with:

config.groups.my_group.double_param

But it is quite possible to access this default value via:

config.double_param
$> rosrun dynamic_reconfigure_group_issue dynamic_reconfigure_server
[ INFO] [1616676590.655748709]: Reconfigure Request: 3.200000
[ INFO] [1616676590.656599822]: Reconfigure Request via groups: 0.000000
[ INFO] [1616676590.657117207]: Spinning node
[ INFO] [1616676614.801760980]: Reconfigure Request: 4.000000
[ INFO] [1616676614.801850468]: Reconfigure Request via groups: 4.000000

This inconsistency is only present at initialization because we notice that once the value to be reconfigured has been modified, both methods provide the same (and good) value.

I propose a minimal functional example presenting the problem encountered on a repository on my Github

YoushaaMurhij commented 3 years ago

same here!