You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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])
The text was updated successfully, but these errors were encountered:
It is in my backlog to work on. I created issues #56 and ros2/rclpy#424 which together will solve this issue. I still need to created PR to fix those. I'm expecting to make progress on those next week.
cottsay
changed the title
[ROS2]Cannot get or set parameters with the type of PARAMETER_INTEGER_ARRAY
Cannot get or set parameters with the type of PARAMETER_INTEGER_ARRAY
Jun 12, 2020
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:
On the other hand, I was trying to get/set parameters by ros2 param. Everything works well.
The text was updated successfully, but these errors were encountered: