Giter Site home page Giter Site logo

rqt_reconfigure's People

Contributors

130s avatar ablasdel avatar ahcorde avatar arne48 avatar augustinmanecy avatar cottsay avatar dirk-thomas avatar flova avatar furushchev avatar jacquelinekay avatar jbohren avatar jksrecko avatar k-okada avatar kalectro avatar kinddragon avatar matthijsburgh avatar mikaelarguedas avatar mjeronimo avatar mrdanbrooks avatar ojura avatar prarobo avatar quarkytale avatar rolaechea avatar timonegk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rqt_reconfigure's Issues

Crash when value not in enum list

Example:

The pid package https://bitbucket.org/AndyZe/pid has an enum

...
K_scale_enum = gen.enum([ gen.const("scale_tenth", double_t, 0.1, "Scale by 0.1"),
                           gen.const("scale_unity",   double_t, 1.0, "No scaling"),
                           gen.const("scale_ten",  double_t, 10.0, "Scale by 10"),
                           gen.const("scale_hundred", double_t, 100.0, "Scale by 100")],
                           "Scale factor for K setting")

gen.add("Kp_scale", double_t, 0, "Kp scale", 10, 0.1, 100, edit_method = K_scale_enum)
...

If I ignore the fact it is an enum and set it to some other value the rqt plugin crashes:

roslaunch pid servo_sim.launch
rosrun dynamic_reconfigure dynparam set /left_wheel_pid Kp_scale 2.7

Then click on /left_wheel_pid in rqt_reconfigure:

  File "/opt/ros/kinetic/lib/python2.7/dist-packages/dynamic_reconfigure/client.py", line 271, in set_config_callback
    self._config_callback(self.config)
  File "/home/lucasw/tmp_catkin_ws/src/rqt_reconfigure/src/rqt_reconfigure/dynreconf_client_widget.py", line 113, in config_callback
    widget.update_value(config[widget.param_name])
  File "/home/lucasw/tmp_catkin_ws/src/rqt_reconfigure/src/rqt_reconfigure/param_editors.py", line 439, in update_value
    self._update_signal.emit(self.values.index(value))
ValueError: 2.7 is not in list

The obvious fix is to check self.values.index before doing this:

self._update_signal.emit(self.values.index(value))

It could find the nearest legitimate value and set it to that instead, or just reject it with a warning.
(and I can pr a fix later)

And perhaps dynamic reconfigure itself shouldn't have let me set that value in the first place.

Clearly see if the parameter value is different from the default value

It is very useful to be able to see if a parameter value has changed from it's default value.

This could be presented in the form of a filter; for example "display only parameters whose value currently matches the default" and/or "display only parameters whose value is different from the default value".

Or this could be simply be done by changing the background color of the parameter value or the font color.

[ROS2] Listen for parameter events

When a parameter is changed externally (for example by using ros2 param set), the rqt_reconfigure does not update the values, unless the node is reselected. Similarly, the plugin does not react when a node declare a new parameter or undeclares one.

This can be easily improved by subscribing to the global /parameter_events topic, filtering the messages for only the selected nodes and updating the UI according to the events.

[ROS2] Tool does not list any nodes and params

After build and run the latest Dashing branch the GUI does not list any information at all. Is it a known issue?

What is the pending work to be done in order to have it working?
I'm open to contribute if you can give some directions how I could help...

Qt platform plugin "xcb"

Dear team,
I am getting the following error:

$ rosrun rqt_gui rqt_gui
This application failed to start because it could not find or load the Qt platform plugin "xcb".

Reinstalling the application may fix this problem.

Details:
Ubuntu 18.04 LTS x64
ROS Melodic

Issues with PyQt5

I'm on an Ubuntu 20.04 system with galactic binary of this package version 1.0.8-1focal.20220430.131618

Running ros2 run rqt_reconfigure rqt_reconfigure throws the following exception

Traceback (most recent call last):
  File "/opt/ros/galactic/lib/rqt_reconfigure/rqt_reconfigure", line 11, in <module>
    load_entry_point('rqt-reconfigure==1.0.8', 'console_scripts', 'rqt_reconfigure')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/ros/galactic/lib/python3.8/site-packages/rqt_reconfigure/__main__.py", line 36, in <module>
    from rqt_reconfigure.param_plugin import ParamPlugin
  File "/opt/ros/galactic/lib/python3.8/site-packages/rqt_reconfigure/param_plugin.py", line 35, in <module>
    from rqt_gui_py.plugin import Plugin
  File "/opt/ros/galactic/lib/python3.8/site-packages/rqt_gui_py/plugin.py", line 33, in <module>
    from qt_gui.plugin import Plugin as Base
  File "/opt/ros/galactic/lib/python3.8/site-packages/qt_gui/plugin.py", line 31, in <module>
    from python_qt_binding.QtCore import QObject
  File "/opt/ros/galactic/lib/python3.8/site-packages/python_qt_binding/__init__.py", line 56, in <module>
    from python_qt_binding.binding_helper import loadUi  # noqa: F401
  File "/opt/ros/galactic/lib/python3.8/site-packages/python_qt_binding/binding_helper.py", line 277, in <module>
    _select_qt_binding(
  File "/opt/ros/galactic/lib/python3.8/site-packages/python_qt_binding/binding_helper.py", line 108, in _select_qt_binding
    QT_BINDING_VERSION = binding_loader(required_modules, optional_modules)
  File "/opt/ros/galactic/lib/python3.8/site-packages/python_qt_binding/binding_helper.py", line 155, in _load_pyqt
    _named_optional_import('PyQt5.%s' % module_name)
  File "/opt/ros/galactic/lib/python3.8/site-packages/python_qt_binding/binding_helper.py", line 142, in _named_optional_import
    _named_import(name)
  File "/opt/ros/galactic/lib/python3.8/site-packages/python_qt_binding/binding_helper.py", line 133, in _named_import
    module = builtins.__import__(name)
ValueError: PyCapsule_GetPointer called with incorrect name

From what I understand this is due to having a mismatch in the PyQt5 version on my system.
So I manually installed PyQt5-5.10.1 with python3 -m pip install PyQt5==5.10.1.

Then upon launching, I get this error below

Could not import "pyqt" bindings of qt_gui_cpp library - so C++ plugins will not be available:
Traceback (most recent call last):
  File "/opt/ros/galactic/lib/python3.8/site-packages/qt_gui_cpp/cpp_binding_helper.py", line 43, in <module>
    from . import libqt_gui_cpp_sip
ImportError: /home/yadu/.local/lib/python3.8/site-packages/PyQt5/Qt/lib/libQt5Core.so.5: version `Qt_5.12' not found (required by /opt/ros/galactic/lib/python3.8/site-packages/qt_gui_cpp/libqt_gui_cpp_sip.so)

Then I installed python3 -m pip install PyQt5==5.12 following the hint from the ImportError. But now I'm experiencing

RosPluginProvider.load(qt_gui_cpp/CppPluginProvider) exception raised in __builtin__.__import__(qt_gui_cpp.cpp_plugin_provider, [CppPluginProvider]):
Traceback (most recent call last):
  File "/opt/ros/galactic/lib/python3.8/site-packages/rqt_gui/ros_plugin_provider.py", line 80, in load
    module = __builtin__.__import__(
  File "/opt/ros/galactic/lib/python3.8/site-packages/qt_gui_cpp/cpp_plugin_provider.py", line 33, in <module>
    from .cpp_binding_helper import qt_gui_cpp
  File "/opt/ros/galactic/lib/python3.8/site-packages/qt_gui_cpp/cpp_binding_helper.py", line 43, in <module>
    from . import libqt_gui_cpp_sip
ValueError: PyCapsule_GetPointer called with incorrect name

RecursivePluginProvider.discover() loading plugin "qt_gui_cpp/CppPluginProvider" failed:
Traceback (most recent call last):
  File "/opt/ros/galactic/lib/python3.8/site-packages/qt_gui/recursive_plugin_provider.py", line 60, in discover
    instance = self._plugin_provider.load(plugin_descriptor.plugin_id(), None)
  File "/opt/ros/galactic/lib/python3.8/site-packages/rqt_gui/ros_plugin_provider.py", line 91, in load
    raise e
  File "/opt/ros/galactic/lib/python3.8/site-packages/rqt_gui/ros_plugin_provider.py", line 80, in load
    module = __builtin__.__import__(
  File "/opt/ros/galactic/lib/python3.8/site-packages/qt_gui_cpp/cpp_plugin_provider.py", line 33, in <module>
    from .cpp_binding_helper import qt_gui_cpp
  File "/opt/ros/galactic/lib/python3.8/site-packages/qt_gui_cpp/cpp_binding_helper.py", line 43, in <module>
    from . import libqt_gui_cpp_sip
ValueError: PyCapsule_GetPointer called with incorrect name

What am I missing?

Feature request: make the vector/list easier?

Hi,

I wonder if it's possible to support the type of cpp vector or python list? Currently, I'm using the string and parser to input those types, but it would be really helpful if rqt_reconfigure can support this type of input!

Thanks a lot!

Mouse wheel button unintuitively moves slide bar

Current behavior

As per title. The slide bar that has a focus moves, when a mouse's wheel rolls.

Expected behavior

I think it's more intuitive if the vertical scroll bar moves.

(I've seen my coworkers keep complaining, without filing a ticket.)

Version

$ apt-cache policy ros-indigo-rqt-reconfigure
ros-indigo-rqt-reconfigure:
  Installed: 0.4.10-0trusty-20181006-073800-0800
  Candidate: 0.4.10-0trusty-20181006-073800-0800
  Version table:
 *** 0.4.10-0trusty-20181006-073800-0800 0
        500 http://packages.ros.org/ros-shadow-fixed/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

rqt_reconfigure: the layout is pretty broken

From @dirk-thomas on August 16, 2013 22:10

  • left column takes all the space, right column has only minimum width, should be the other way around
  • the configuration block per node and vertically spread, should have spacing at the bottom
  • each edit row is horizontally spread, should make use of the full width instead
  • the row label is overlapping with the controls when the window is small

Copied from original issue: ros-visualization/rqt_common_plugins#150

Cannot get or set parameters with the type of PARAMETER_INTEGER_ARRAY

I have several parameters whose type are PARAMETER_INTEGER_ARRAY. It seems that rqt_reconfigure hasn't support this type yet, since I was trying to launch rqt_reconfigure, it failed with the following error messages:

Traceback (most recent call last):
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/node_selector_widget.py", line 277, in _selection_changed_slot
self._selection_selected(index_current, rosnode_name_selected)
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/node_selector_widget.py", line 228, in _selection_selected
raise e
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/node_selector_widget.py", line 226, in _selection_selected
item_widget = item_child.get_param_client_widget()
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/treenode_qstditem.py", line 94, in get_param_client_widget
self._context, self.raw_param_name
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/param_client_widget.py", line 116, in init
self.param_client.get_parameters(param_names),
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/param_api.py", line 89, in get_parameters
for name, value in zip(names, get_params_response.values)
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/param_api.py", line 89, in
for name, value in zip(names, get_params_response.values)
File "/home/intel/workspace/ros2_ws/install/rclpy/lib/python3.6/site-packages/rclpy/parameter.py", line 121, in from_parameter_msg
return cls(param_msg.name, type
, value)
File "/home/intel/workspace/ros2_ws/install/rclpy/lib/python3.6/site-packages/rclpy/parameter.py", line 132, in init
raise ValueError("Type '{}' and value '{}' do not agree".format(type
, value))
ValueError: Type 'Type.INTEGER_ARRAY' and value 'array('q', [640, 480])' do not agree
[INFO] [PluginContainerWidget]: Connection to node=/realsense failed:
Type 'Type.INTEGER_ARRAY' and value 'array('q', [640, 480])' do not agree
[ERROR] [rqt_reconfigure]: Connection to node=/realsense failed:
Type 'Type.INTEGER_ARRAY' and value 'array('q', [640, 480])' do not agree

On the other hand, I was trying to get/set parameters by ros2 param. Everything works well.

$ros2 param set my_node my_param [640,480]
Set parameter successful
$ros2 param get my_node my_param
Integer values are: array('q', [640, 480])

rqt_reconfigure GUI not brought to the foreground

System information
OS: Ubuntu 18.04
ROS version: Melodic
RQT_gui version: 0.5.0
Dynamic_Reconfigure version: 1.6.0

Problem
When opening the dynamic_reconfigure GUI, some strange behaviour occurs (See image below). First of all, it opens not only the GUI window but also a smaller req_reconfigure__Param - rqt window. Second, this second window is set as the active window. As a result, when clicking the rqt_reconfigure icon in the taskbar, this small window is brought to the foreground instead of the actual dynamic_reconfigure window. To get the dynamic_reconfigure window, I have to minimise all my other windows.

What I tried

  • Using different launch commands
    • <node pkg="rqt_gui" type="rqt_gui" name="dyn_reconf_gui" args="-s reconfigure" output="log"/>
    • <node pkg="rqt_reconfigure" type="rqt_reconfigure" name="dyn_reconf_gui" output="log"/>
    • rosrun rqt_gui rqt_gui -s reconfigure
    • rosrun rqt_reconfigure rqt_reconfigure.

Pictures

image

ApplyGroup with subgroups: uncaught exception on any update

With a configuration where an apply group has a subgroup, cfg example:

mygroup = gen.add_group("MyGroup", type="apply")
mygroup.add("my_double_param", double_t, 0, "Some double param", 100,  0, 200)

subgroup = mygroup.add_group("MySubGroup")
subgroup.add("zzz_in_subgroup", int_t, 0, "some zzz key", 100,  0, 200)

Then with rqt_reconfigure gui launched:
When editing any parameter in the group or subgroup, the updater fails with an exception:

Traceback (most recent call last):
  File "xxx/rqt_reconfigure/src/rqt_reconfigure/param_editors.py", line 354, in _text_changed
    self._update_paramserver(float(self._paramval_lineEdit.text()))
  File "xxx/rqt_reconfigure/src/rqt_reconfigure/param_editors.py", line 99, in _update_paramserver
    self.update_configuration(value)
  File "xxx/rqt_reconfigure/src/rqt_reconfigure/param_editors.py", line 115, in update_configuration
    self._updater.update({self.param_name: value})
  File "xxx/rqt_reconfigure/src/rqt_reconfigure/param_groups.py", line 331, in update
    self.loopback(config)
  File "xxx/rqt_reconfigure/src/rqt_reconfigure/param_groups.py", line 244, in update_group
    widget.update_group(cfg)
  File "xxx/rqt_reconfigure/src/rqt_reconfigure/param_groups.py", line 228, in update_group
    if 'state' in config:
TypeError: argument of type 'NoneType' is not iterable

rqt_reconfigure does not display any parameters

When I execute "rosrun rqt_reconfigure rqt_reconfigure", the gui window pops up, but I see no parameters to change. Am I missing some installation or configuration to do this? This is what appears when I execute the command:
rqt_reconfigure

Cannot select any node if many nodes are running

Hi, I'm a user of PR2 and have a problem to set params with rqt_reconfigure.
When clicking any node in the tree view, the GUI often (really often!) hangs and goes black, and the only thing I can do is to reboot rqt_reconfigure node.

I can also see a lot of errors when this node is started like as follows:

Exception in thread Thread-114:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/home/furushchev/ros/kinetic/src/ros-visualization/rqt_reconfigure/src/rqt_reconfigure/treenode_qstditem.py", line 67, in run
    self._param_name_raw))
ROSException: timeout exceeded while waiting for service /kinect_head_external/rgb_rectify_mono/set_parametersTreenodeQstdItem. Couldn't connect to /kinect_head_external/rgb_rectify_mono

rqt_dead

rqt_reconfigure) to be capable of showing only certain parameters

From @130s on March 19, 2013 7:29

In the cases where the users know that the parameters they need to interact with, loading the parameters of all available nodes might just drop the usability. Either or all of the following is useful:

  1. Save the nodes selected in the previous run.
  2. Allow the developers who make rqt plugin that depends on rqt_reconfigure to pre-select certain nodes

Particularly, I now start having an impression that the majority of the reconfigure users might already know which nodes & parameters they need.

Copied from original issue: ros-visualization/rqt_common_plugins#49

Clicking refresh freezes rqt

Opening rqt and then opening parameter reconfigure and hitting Refresh freezes whole rqt and it needs to be force shutdown.
Info: Ros2 Foxy, built by source. rqt_reconfigure dashing branch. Ubuntu 20.04.

float parameter ranges not working in humble

I switched from galactic to humble and now get the error:

[WARN] [1653783508.027148631] [rqt_reconfigure]: Failed to retrieve parameters from node: setSingleStep(self, int): argument 1 has unexpected type 'float'

I can reproduce this with a float parameter:

rcl_interfaces::msg::ParameterDescriptor param_descr;
rcl_interfaces::msg::FloatingPointRange range_float;
range_float.from_value = 10;
range_float.to_value = 20;
param_descr.floating_point_range = {range_float};
declare_parameter("test", 15.0, param_descr);

Release into Melodic

It looks like all of the dependencies for this package are available in Melodic, so it would be great to get it released there. Thanks in advance.

Failed to retrieve parameters from node for large IntegerRange

ROS2 Foxy, Ubuntu 20.04

I declared a parameter using a descriptor and an IntegerRange of the following:

  Constraints:
    Min value: 0
    Max value: 4294967295
    Step: 1

When I run rqt_reconfigure it lists a few parameters, then stops and prints the following error:

WARN] [1638567416.039450550] [rqt_reconfigure]: Failed to retrieve parameters from node: argument 2 overflowed: value must be in the range -2147483648 to 2147483647

The parameter itself is set to "0".

It seems like rqt_reconfigure is unhappy with the fact that the to_value from IntegerRange is 4294967295 which is higher than 2147483647.

This raises two thoughts:

  1. Why can't the to_value be higher? in ROS2, integer parameters are 64-bit ints, so why limit it to 32-bits?
  2. If rqt_reconfigure fails to retrieve a parameter, would it be possible to skip this parameter and continue trying to list the rest of the parameters? At the moment it fails to display all the rest of the node parameters due to only one tricky parameter.

Thanks!

Text form (on the right) does not set the value

In kinetic (Ubuntu 16.04), the use of the text form on the right side does not set the value. In particular, it works only once, after the use of the bar.
I am not totally sure, but in the past, this bug did not show up.

Qt platform plugin "windows"

Dear team,
I am getting the following error:

> rosrun rqt_reconfigure rqt_reconfigure
This application failed to start because it could not find or load the Qt platform plugin "windows"
in "".

Reinstalling the application may fix this problem.

Details:
Windows 10 (x64) build 19042.1165
ROS Melodic

[To make other gui work (e.g. rqt_bag, rviz), I copied the content of C:\opt\rosdeps\x64\plugins\platforms to C:\opt\ros\melodic\x64\bin]

Crashes when displaying node contains param type=int, min=-1, max=None

Description

rqt_reconfigure node crashes when clicking a node that contains a parameter of type int, minimum value is -1 and maximum value is None (= INT_MAX).
I confirmed the error occurs on ROS noetic.

How to reproduce

For instance, if the parameter definition like below is contained, rqt_reconfigure crashes.

gen.add("param_key", int_t, 0, "description", -1, -1, None)
$ rqt_reconfigure
Floating point exception (core dumped)

I investigated using gdb and it looks there may be a bug in Qt.

$ gdb -ex run --args /usr/bin/python -v /opt/ros/noetic/lib/rqt_reconfigure/rqt_reconfigure
Thread 1 "python" received signal SIGFPE, Arithmetic exception.
0x00007ffff001f0b7 in QStyle::sliderPositionFromValue(int, int, int, int, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5

Cannot set parameters around 1e-10 or lower on the UI

I need to modify some very small parameters related to a covariance matrix. From the UI, I cannot change to very small values.
So far the WA is to do it by command line like this

rosrun dynamic_reconfigure dynparam set /somenode somevalue 1.0e-12

Grouping parameters

Hello!

I am looking for a way to separate parameters in certain node to several groups, in a way similar to ROS1 functionality.

Defining the parameters in YAML file allows nesting parameters in subgroups, and these groups can be defined using dot in parameter names, e.g: node.declare_parameter("group_a.param_b")

I have created the example node to demonstrate the issue. https://gist.github.com/yossioo/c20d2966c9e27e57a3153d9ec176e896

I can see the declared parameters:

$ ros2 param list
/node_w_params:
  group_a.param_b
  group_a.param_c
  param_a
  use_sim_time

Checking the list of parameters shows that the prefixes are indeed recognized by ROS2:

$ ros2 service call /node_w_params/list_parameters rcl_interfaces/srv/ListParameters 
waiting for service to become available...
requester: making request: rcl_interfaces.srv.ListParameters_Request(prefixes=[], depth=0)

response:
rcl_interfaces.srv.ListParameters_Response(result=rcl_interfaces.msg.ListParametersResult(names=['use_sim_time', 'param_a', 'group_a.param_b', 'group_a.param_c'], prefixes=['group_a']))

And yet, the parameters are not grouped in the rqt_reconfigure interface and are simply presented in a single alphabetically ordered list.

Is there a proper way to define parameters so they will be displayed in groups?

widget selection is using the wrong type

The selection of the matching widget per parameter type in

def add_editor_widgets(self, parameters, descriptors):
for parameter, descriptor in zip(parameters, descriptors):
if parameter.type_ not in EDITOR_TYPES:
continue
logging.debug('Adding editor widget for {}'.format(parameter.name))
editor_widget = EDITOR_TYPES[parameter.type_](
self._param_client, parameter, descriptor
)
self._editor_widgets[parameter.name] = editor_widget
editor_widget.display(self.grid)

is using the type of the default parameter instead of the type from the parameter description. This means that typed parameters without a default value do not get a configuration widget.

As en example, the new array configuration from #108 will not work with parameters where ros2 param describe returns

  Type: double array

Editing boolean array makes the plugin crash

Hi there,

I am extensively using the array edition from rqt_reconfigure, and I have noticed that editing an array of booleans makes the plugin crash. This is due to the json parser, which expects booleans to be written as true and false (i.e. lower case), while the bool arrays are by default written as True and False (i.e. the python way).

Adding the following lines in the edit_finished() method in the param_editors.py file solves the problem:

if Parameter.Type.from_parameter_value(self.parameter.value) == Parameter.Type.BOOL_ARRAY:
  params_list = json.loads(params_string.lower())
else:
  params_list = json.loads(params_string)

System: Ubuntu 22.04
Ros2 humble
Local build of rqt_reconfigure on the rolling branch, no modifications.

rqt_reconfigure: After filtering, node selection gets reset even though some nodes were selected

From @130s on January 27, 2013 20:22

Possible bad situation: node boxes are shown on right-hand side but their item on left-hand is not selected. When user selects a node on LH, the corresponding box disappears from RH.


I described the problematic phenomenon in the question on stackoverflow (satisfactory responses from there can help solving this issue too).

Related to issue #17.

Copied from original issue: ros-visualization/rqt_common_plugins#18

Convert synchronous/blocking calls to parameter services to async

Rqt_reconfigure should be updated to use async calls to the parameter service(s). First, it is (incorrectly) assuming that every node supports the parameter services. However, if one creates a parameter client for a node which doesn't provide the corresponding services and then invoke it, the synchronous call will hang. Next, even if a node does support the parameter services, the node may not be spinning (for example, a node created just to make a service call). In this latter case, using a synchronous call to a parameter service will also hang the calling app.

rqt_reconfigure crashes with IndexError

I encounter the following error logs when I create a unique pointer to a dynamic_reconfigure::Server and a nodehandle as a param.

PluginManager._load_plugin() could not load plugin "rqt_reconfigure/Param":
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/plugin_handler.py", line 99, in load
    self._load()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/plugin_handler_direct.py", line 54, in _load
    self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui_py/ros_py_plugin_provider.py", line 60, in load
    return super(RosPyPluginProvider, self).load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 101, in load
    return class_ref(plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/param_plugin.py", line 51, in __init__
    self._plugin_widget = ParamWidget(context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/param_widget.py", line 100, in __init__
    self._nodesel_widget = NodeSelectorWidget(self, rp, self.sig_sysmsg)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/node_selector_widget.py", line 97, in __init__
    self._update_nodetree_pernode()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/node_selector_widget.py", line 332, in _update_nodetree_pernode
    node_name_grn, TreenodeQstdItem.NODE_FULLPATH)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/treenode_qstditem.py", line 87, in __init__
    self._set_param_name(grn_current_treenode)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/treenode_qstditem.py", line 235, in _set_param_name
    self._toplevel_treenode_name = self._list_treenode_names[0]
IndexError: list index out of range

[ROS2]rqt_reconfigre UI hangs

ROS2 rqt_reconfigure is not stable. Either UI hangs or can not launched successfully.
Some error logs as follows:
[ERROR] [rqt_reconfigure]: Reconfigure GUI cannot connect to master.
Traceback (most recent call last):
File "/home/intel/workspace/ros2_rqt_ws/build/rqt_gui_py/src/rqt_gui_py/rclpy_spinner.py", line 32, in run
Traceback (most recent call last):
executor.spin_once(timeout_sec=1.0)
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/node_selector_widget.py", line 444, in _refresh_nodes
File "/home/intel/workspace/ros2_ws/install/rclpy/lib/python3.6/site-packages/rclpy/executors.py", line 695, in spin_once
handler, entity, node = self.wait_for_ready_callbacks(timeout_sec=timeout_sec)
File "/home/intel/workspace/ros2_ws/install/rclpy/lib/python3.6/site-packages/rclpy/executors.py", line 649, in wait_for_ready_callbacks
return next(self._cb_iter)
File "/home/intel/workspace/ros2_ws/install/rclpy/lib/python3.6/site-packages/rclpy/executors.py", line 532, in _wait_for_ready_callbacks
self._prune_nodetree_pernode()
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/node_selector_widget.py", line 431, in _prune_nodetree_pernode
self._context.handle)
RuntimeError: Failed to initialize wait set: the given context is not valid, either rcl_init() was not called or rcl_shutdown() was called., at /home/intel/workspace/ros2_ws/src/ros2/rcl/rcl/src/rcl/wait.c:130
raise e # TODO Make sure 'raise' here returns or finalizes func.
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/node_selector_widget.py", line 428, in _prune_nodetree_pernode
nodes = find_nodes_with_params(self._context.node)
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/param_api.py", line 133, in find_nodes_with_params
for node_name, ns in node.get_node_names_and_namespaces()
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/param_api.py", line 130, in
filter(lambda node_name: _has_params(node, node_name),
File "/home/intel/workspace/ros2_other_ws/build/rqt_reconfigure/src/rqt_reconfigure/param_api.py", line 122, in _has_params
client.wait_for_service()
File "/home/intel/workspace/ros2_ws/install/rclpy/lib/python3.6/site-packages/rclpy/client.py", line 164, in wait_for_service
return self.service_is_ready()
File "/home/intel/workspace/ros2_ws/install/rclpy/lib/python3.6/site-packages/rclpy/client.py", line 144, in service_is_ready
return _rclpy.rclpy_service_server_is_available(capsule)
RuntimeError: Failed to check service availability: rcl node's context is invalid, at /home/intel/workspace/ros2_ws/src/ros2/rcl/rcl/src/rcl/node.c:476

The above exception was the direct cause of the following exception:

SystemError: <class 'PyQt5.QtCore.QChildEvent'> returned a result with an error set

The above exception was the direct cause of the following exception:

SystemError: <class 'PyQt5.QtCore.QChildEvent'> returned a result with an error set

The above exception was the direct cause of the following exception:

SystemError: <class 'PyQt5.QtCore.QChildEvent'> returned a result with an error set

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/intel/workspace/ros2_rqt_ws/install/qt_gui/lib/python3.6/site-packages/qt_gui/plugin_handler.py", line 425, in _check_close
if len(self._widgets) + len(self._toolbars) == 0:
SystemError: returned a result with an error set

The above exception was the direct cause of the following exception:

SystemError: <class 'PyQt5.QtCore.QEvent'> returned a result with an error set

The above exception was the direct cause of the following exception:

SystemError: <class 'PyQt5.QtWidgets.QWidget'> returned a result with an error set

The above exception was the direct cause of the following exception:

SystemError: <class 'PyQt5.QtGui.QCloseEvent'> returned a result with an error set

The above exception was the direct cause of the following exception:

SystemError: PyEval_EvalFrameEx returned a result with an error set

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/intel/workspace/ros2_other_ws/install/rqt_reconfigure/lib/rqt_reconfigure/rqt_reconfigure", line 10, in
sys.exit(main.main(sys.argv, standalone=plugin, plugin_argument_provider=ParamPlugin.add_arguments))
File "/home/intel/workspace/ros2_rqt_ws/build/rqt_gui/src/rqt_gui/main.py", line 59, in main
plugin_argument_provider=plugin_argument_provider)
File "/home/intel/workspace/ros2_rqt_ws/install/qt_gui/lib/python3.6/site-packages/qt_gui/main.py", line 646, in main
return app.exec_()
SystemError: <built-in method exec_ of QApplication object at 0x7f1f7ca7f168> returned a result with an error set

Floating point value parameter update is not notified from rqt_reconfigure but works from the command line in ROS2 foxy ?

Hello,

I'm using ROS2 foxy and facing the issue that a floating point value parameter changed in rqt_reconfigure does not get notified to the node which is declaring the parameter for specific values.

By default, I set the parameter to "0.5" . If I change it to "0.9", the change is not notified. If I change it to "1" , the change is notified.

Interestingly, the "." decimal point is not allowed (I cannot add it to the field although I strike the key) in the rqt reconfigure field, although it is the separator initially used to display the initial value.

Changing the value of the parameter from the command line works, e.g. ros2 param set param_issue linear_vel 1.5 from the code provided below.

Below is a minimal example for reproducing the issue :

import rclpy
from rclpy.node import Node
from rcl_interfaces.msg import SetParametersResult
from rcl_interfaces.msg import ParameterDescriptor
from example_interfaces.msg import Float32  # std_msgs.msg.Float32 is deprecated


class ParamIssue(Node):
    def __init__(self):
        super().__init__("param_issue")

        self.linear_vel = 0.5  # m/s
        self.declare_parameter(
            "linear_vel",
            self.linear_vel,
            ParameterDescriptor(description="The maximal linear velocity"),
        )
        self.add_on_set_parameters_callback(self.cb_params)

        self.vp_offset_sub = self.create_subscription(
            Float32, "vp_offset", self.on_vp_offset, 1
        )

    def cb_params(self, data):
        for p in data:
            name = p.name
            value = p.value
            setattr(self, name, value)
        self.get_logger().info(f"Parameter change notified : {self.linear_vel}")
        return SetParametersResult(successful=True)

    def on_vp_offset(self, msg):
        self.vp_offset = msg.data


def main(args=None):
    rclpy.init(args=args)

    paramissue = ParamIssue()
    rclpy.spin(paramissue)

    paramissue.destroy_node()
    rclpy.shutdown()

If you now start rqt_reconfigure , changing the value will either succeed or fail.

If you change it from the command line, this will always work .

Best;

Jeremy.

Tooltip / description not visible for enum entries in dropdown

Hi all,

When setting up dynamic_reconfigure we came across an issue. We are setting up some dynamic_reconfigure servers with our custom config(issue occurs in example config as well found here: https://github.com/ros/dynamic_reconfigure/blob/noetic-devel/cfg/Test.cfg).

The problem is as follows; when adding parameters to your config file, you can supply a description to inform the user with more information about the parameter in question. When in rqt_reconfigure you hover over the parameter this description is shown in a tooltip.

However, when using an enum, it never shows the description of the underlying enum options. When using Test.cfg linked above, a snipped of the config looks like this:

PACKAGE='dynamic_reconfigure_test'

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()
gen.const("int_const", int_t, 5, "An int constant.")
gen.const("double_const", double_t, 5.6, "A double constant.")
gen.const("str_const", str_t, "foo", "A string constant.")
gen.const("bool_const", bool_t, True, "A bool constant.")

enum = gen.enum([ gen.const("Small", int_t, 0, "A small constant"),
gen.const("Medium", int_t, 1, "A medium value"),
gen.const("Large", int_t, 2, "A large value"),
gen.const("ExtraLarge", int_t, 3, "An extra large value") ], "An enum to set the size.")

gen.add("int_enum_", int_t, 1, "Int enum",0, 0, 3, edit_method = enum)

When hovering over de dropdown (when folded and expanded) it just shows the description attached to "int_enum".
I imagine it should be possible for the individual descriptions to be shown when hovering over the options in the dropdown.

Parameter list missing in reconfigure/dynamic if any parameter was declared without a default value under ROS2

System: Ubuntu 22.04
Version: ROS 2 Iron Irwini - Patch Release 4

Following the parameter tutorial on the ROS2 docs, I can see the following result in rqt/ rqt_reconfigure
image

However, if I add a parameter without default value using the type-specifying version of the declare_parameter() API, the entire parameter list for the node will disappear without any error message:

this->declare_parameter("an_int_param", 0); // The original demo
this->declare_parameter("an_int_param_without_val", rclcpp::PARAMETER_INTEGER);  // THIS CAUSE PROBLEMS

image

This problem disappears if that specific parameter is supplied with the command line:

ros2 run cpp_parameter_event_handler parameter_event_handler --ros-args -p an_int_param_without_val:=22

image

I should add that all other ros2 param and ros2 service command line tools are fine as far as I've tested.
This behavior is not mentioned anywhere in the documentation and I also couldn't find any similar problems on the internet. It took me a few hours of trial-and-error to figure-out the pattern.

Failed to run the executable

Hello

I am trying to launch the rqt_reconfigure node and it does not show up.

To examine it I have installed fresh copy of Ubuntu 18.04.4 on virtual machine, and installed ros-eloquent-desktop according to the latest instructions, everything is updated to this date (March 3, 2020).

Executing ros2 run rqt_reconfigure rqt_reconfigure shows no output and no window opens.

Executing ros2 run rqt_reconfigure rqt_reconfigure --ros-args --log-level debug shows some debug info, with repeating lines:

[DEBUG] [rcl]: Initializing timer with period: 1000000000ns
[DEBUG] [rcl]: Updated timer period from '1000000000ns' to '1000000000ns'
[DEBUG] [rcl]: Initializing wait set with '0' subscriptions, '2' guard conditions, '1' timers, '1' clients, '6' services
[DEBUG] [rcl]: Waiting with timeout: 0s + 999878540ns
[DEBUG] [rcl]: Timeout calculated based on next scheduled timer: true
[DEBUG] [rmw_fastrtps_shared_cpp]: looking for subscriber topic: /_ros2cli_daemon_0/list_parametersRequest, number of matches: 0
[DEBUG] [rmw_fastrtps_shared_cpp]: looking for subscriber topic: /_ros2cli_daemon_0/list_parametersRequest, number of matches: 0
[DEBUG] [rmw_fastrtps_shared_cpp]: looking for subscriber topic: /_ros2cli_daemon_0/list_parametersRequest, number of matches: 0
[DEBUG] [rmw_fastrtps_shared_cpp]: looking for subscriber topic: /_ros2cli_daemon_0/list_parametersRequest, number of matches: 0
[DEBUG] [rcl]: Timer in wait set is ready
[DEBUG] [rcl]: Timer canceled
[DEBUG] [rcl]: Initializing timer with period: 1000000000ns
[DEBUG] [rcl]: Updated timer period from '1000000000ns' to '1000000000ns'
[DEBUG] [rcl]: Initializing wait set with '0' subscriptions, '2' guard conditions, '1' timers, '1' clients, '6' services
[DEBUG] [rcl]: Waiting with timeout: 0s + 999847316ns
[DEBUG] [rcl]: Timeout calculated based on next scheduled timer: true
[DEBUG] [rmw_fastrtps_shared_cpp]: looking for subscriber topic: /_ros2cli_daemon_0/list_parametersRequest, number of matches: 0
[DEBUG] [rmw_fastrtps_shared_cpp]: looking for subscriber topic: /_ros2cli_daemon_0/list_parametersRequest, number of matches: 0
[DEBUG] [rmw_fastrtps_shared_cpp]: looking for subscriber topic: /_ros2cli_daemon_0/list_parametersRequest, number of matches: 0
[DEBUG] [rmw_fastrtps_shared_cpp]: looking for subscriber topic: /_ros2cli_daemon_0/list_parametersRequest, number of matches: 0
[DEBUG] [rcl]: Timer in wait set is ready
[DEBUG] [rcl]: Timer canceled

This happens both if there nodes running and if there are not.

Any ideas what could cause this behavior?
I am experiencing similar behavior on 18.04.4 with ROS2 Dashing as well...

Display the wrong value after a parameter result was false

I have a node that does not allow some parameters to be updated. If you try to update them, the set param is rejected and you get a false parameter result with an error description as described on https://docs.ros.org/en/rolling/Concepts/About-ROS-2-Parameters.html#parameter-callbacks. If I try to update the value using ros2 param set node parameter value, I correctly see the error message. However, In rqt_reconfigure I can change the value in the UI and press enter. I can see that my node has rejected setting the parameter. The UI does not reflect this. It shows that latest value that I typed in, so it looks like everything was fine. If I deselect and select the node again, I see the correct (the original) value again.

Summary: when the UI tries to set a value, it should look at the response from the node, to check whether the set action was accepted or not.

rqt_reconfigure not displaying any param

From @fw-timku on February 23, 2017 4:2

Ubuntu 16.04
Realsense R200 camera

Hi all, I am trying to change the realsense r200 camera settings (lr_gain, lr_exposure etc.) in the r200_params file located in the realsense_camera/cfg folder. I did launch the camera driver through the rgbd nodelet and after which I type the following command 'rosrun rqt_reconfigure rqt_reconfigure' to launch the rqt reconfig window. However, there is nothing shown in the window. Anyone knows what is the problem?

rqt

Copied from original issue: ros-visualization/rqt_common_plugins#435

Support drop-down menu in ROS2

Due to the ROS2 parameter descriptor, I think it is not easy to migrate the drop-down menu in ROS1.
My current workaround is to utilize the field additional_constraints in rcl_interfaces/msg/ParameterDescriptor.
We can add rules such as Options: a b c.

  • Benefit: Enable drop-down menu for GUI
  • Drawback: Restrict the usage of additional_constraints and users should know to edit it

I wonder how do you think of this workaround.

maintain group order (workaround)

dynamic_reconfigure provides the groups as a dict and therefore the order in which the groups were defined is not maintained.
This is filed long time ago as an issue for dynamic_reconfigure, but I suggest the following workaround to cope with the current format:

Sort the groups by their id, before adding the group widgets:

diff --git a/src/rqt_reconfigure/param_groups.py b/src/rqt_reconfigure/param_groups.py
index 2428d40..aa4243d 100644
--- a/src/rqt_reconfigure/param_groups.py
+++ b/src/rqt_reconfigure/param_groups.py
@@ -191,7 +191,12 @@ class GroupWidget(QWidget):
                                               editor_type, i_debug, time_elap))
             i_debug += 1
 
-        for name, group in config['groups'].items():
+        # sort groups by id to maintain original order
+        grouplist = config['groups'].values()
+        grouplist.sort(key=lambda x: x['id'])
+
+        for group in grouplist:
+            name = group['name']
             if group['type'] == 'tab':
                 widget = TabGroup(self, self.updater, group, self._toplevel_treenode_name)
             elif group['type'] in _GROUP_TYPES.keys():

Release request

Is there any change to get this repository released?
At least, #11 improves my QOL significantly...

Ensure slider and text box does not update when adjusting

I have a use case where a parameter is being set at a high rate with a dynamic reconfigure client. I also want to be able to edit the value in the rqt_reconfigure window. However when I click on the slider or text box the value is constantly being updated so I can't edit the text box or move the slider. It would be great if the sliders and text boxes would only update when the user is not interacting with them.

I've attached a video showing the behavior

error.mp4

[enhancement] rqt_reconfigure : setting decimal value to double parameters

Hello,

I believe that there is a non desired behavior when trying to set decimal values for doubles.

Let's say that i have a double which range is [0,1], i believe we should be able to set it's value to anything in [0,1] in a few different ways:
1/ using the cursor with a interval_length/100 step
2/ directly writing the number ex : 0.123
3/ copying another value in the gui then pasting it there
4/ writing the number in scientific manner ex : 123e-3

On those 4 ways to set the value, 2/ is what's seem the most commonly used but does not work at the moment. I cannot directly write for example "0.123" which is quite unexpected I must say and which is probably a non desired behavior.

Looking a little bit at different responses of the gui, I think what doesn't work is to add any "." in the value. For example this makes that it is impossible to copy/paste a value from another double parameter ( /3 ),

Since nearly all symbol are not allowed in the box, my guess is that you are checking the value in the box with something like a regEx and that there is a little mistake in its rules. I believe there is a mistake because "," is accepted in the box but when with something validated, the gui crash with the following error :
me@laptop-293:~$ rosrun rqt_reconfigure rqt_reconfigure
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_reconfigure/param_editors.py", line 354, in _text_changed
self._update_paramserver(float(self._paramval_lineEdit.text()))
ValueError: invalid literal for float(): 0,1
So to me the issue is that "," is accepted instead of "." in the box.

I tried to use /4 and it actually works so this issue isn't really important ( but it remains that it's probably an undesired behavior ).

I must add that i'm a french user and that most of the time my keybaord is in "azerty" configuration. But i tried to put it into qwerty and i still had the same issue. I also tried it from 2 different PCs and that I had the exact same behavior.

I'm curious to know if I'm the only one experimenting this issue.
And thanks a lot to the one who will have the skill and the time to correct it !

Add support for array types

UI Add EditorWidgets in param_editors.py to support the following types:

  • byte_array_value
  • bool_array_value
  • integer_array_value
  • double_array_value
  • string_array_value

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.