Order and hide parameters from dynamic reconfigure

asked 2018-05-30 02:39:35 -0500

mherrmann gravatar image

I have a ROS kinetic node, using dynamic reconfigure with this .cfg file.

#!/usr/bin/env python  
PACKAGE='mec_transmission'
from dynamic_reconfigure.parameter_generator import *
par = ParameterGenerator()
gen = par.add_group("General")
con = par.add_group("Connection")
par.add("active", bool_t, 0, "Activates/Deactivates the node.", True)

gen.add("debug", bool_t, 0, "Activates the debug mode, which will generate debug messages from a file.", False)
gen.add("sensorID", int_t, 0, "ID of the sensor within the MEC framework", 1)

con.add("ip", str_t, 0, "IP of the MEC-server", "127.0.0.1")
con.add("port", str_t, 0, "Port of the MEC-server", "2000")

exit(par.generate(PACKAGE, "mec_sensor_node", "mec_sensor_params"))

I now have two questions:

  1. How are the parameters and the groups ordered in rqt_reconfigure? Connection is always shown above General, which is different to what I want.

  2. Is it possible to hide or gray out groups? So for example I want the sensorID parameter being fixed or unchangeable if debug mode is activated.

edit retag flag offensive close merge delete