Ask Your Question

level value in dynamic reconfigure

asked 2015-05-29 06:34:04 -0500

Hello everyone, I am learning about creating a dynamic reconfigure server and I just do not understand what the level value is and how it is useful. Could you please briefly explain it and give a simple example?

Thank you!

edit retag flag offensive close merge delete


Nobody can tell just a bit about this? Thanks!

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-06-25 10:36:06 -0500 )edit

Any update?

achmad_fathoni gravatar image achmad_fathoni  ( 2018-07-24 08:36:47 -0500 )edit

No update at all :(

Javier V. Gómez gravatar image Javier V. Gómez  ( 2018-10-09 07:09:50 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2020-01-09 05:44:55 -0500

imranlivt gravatar image

I did not find a satisfying answer in other threads. So i am writing one here if somebody still requires it.

So the "level" parameter is a int variable, where each bit can be representing a reconfigurable parameter. For example if i have 3 parameters, level value can be set to "0,1,2" for the 3 parameters in the cfg the 0,1,2 bits of variable "level" will be set depending on what parameter has been changed in rqt reconfigure. If parameter1 has been changed, the corresponding bit in the "level" will be set to 1.

This variable "level" is passed in the reconfigure callback. So we know which variable is changed, and update accordingly, instead of updating all of them. Hope this explains it. If any improvements to be made please comment.

edit flag offensive delete link more

answered 2018-11-09 13:28:20 -0500

tryan gravatar image

This tutorial provides a short description. Another short discussion is here. To summarize, the level is just a bit mask that allows you to group reconfigurable parameters for your own use in the service callback. For posterity, I found this tidbit (from the second link) useful for understanding:

I had this discussion with Blaise Gassend a year or so ago. He said the level parameter is just a bit mask. It can be used to classify sets of parameters in any way that is convenient to the package defining the server. The bits for all parameter classes that have changed will be ORed together for the service callback.

One useful classification scheme is suggested by the driver_base states:

  1. Parameters that can only be changed while the device is closed.
  2. Parameters that can be changed while the device is not streaming.
  3. Parameters that can be changed while the device is open and streaming.

But, servers are free to classify their parameters any way they like.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-05-29 06:34:04 -0500

Seen: 370 times

Last updated: Jan 09