Using groups with dynamic_reconfigure, rqt_reconfigure
Reading about and playing around the almost secret concept of using "groups" with dynamic_reconfigure.
I have the following questions:
- What is the group "state" attribute used for? rqt_reconfigure plugin does not seem to do anything with it.
- rqt_reconfigure has classes called CollapseGroup, TabGroup, etc.... Can I use "groups" in a way so that they can appear tabbed, collapsed, hidden etc...?
- Save/reload yaml from rqt_configure works fine, except when the configuration contains groups. Then the loading generates an error on the server side:
[ERROR] [1527081248.063225] [/dynamic_tutorials]: Error processing request: 'list' object has no attribute 'items' ['Traceback (most recent call last):\n', ' File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py",line 625, in _handle_request\n response = convert_return_to_response(self.handler(request), self.response_class)\n', ' File "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/server.py", line 135, in _set_callback\n return encode_config(self.update_configuration(decode_config(req.config, self.type.config_description)))\n', ' File "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/encoding.py", line 312, in decode_config\n
add_params(d[\'groups\'], description)\n', ' File "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/encoding.py", line 308, in add_params\n for nr, dr in descr[\'groups\'].items():\n', "AttributeError: 'list' object has no attribute 'items'\n"]
My cfg looks like:
#!/usr/bin/env python
PACKAGE = "dynamic_tutorials"
from dynamic_reconfigure.parameter_generator_catkin import *
gen = ParameterGenerator()
gen.add("my_int_param", int_t, 0, "An Integer parameter", 50, 0, 100)
gen.add("my_bool_param", bool_t, 0, "A Boolean parameter", True)
mygroup = gen.add_group("MyGroup")
mygroup.add("my_double_param", double_t, 0, "Some double param", 100, 0, 200)
exit(gen.generate(PACKAGE, "dynamic_tutorials", "Tutorials"))
I'm getting the same error though only when the dynamic reconfigure server is a rospy one, an identical cfg with C++ server works fine ( https://github.com/lucasw/dynamic_rec... ). My Reconfigure client (C++ ) must be doing something wrong/unexpected with the request, but it isn't clear what. https://github.com/lucasw/imgui_ros/i...
I changed the dynamic reconfigure request to only have one value in it (before it was resetting all the values when only one had changed), and the error went away. It seems like a rospy dynamic reconfigure server bug.