diff --git a/rqt_controller_manager/rqt_controller_manager/controller_manager.py b/rqt_controller_manager/rqt_controller_manager/controller_manager.py index a71a016745..0683c53a1e 100644 --- a/rqt_controller_manager/rqt_controller_manager/controller_manager.py +++ b/rqt_controller_manager/rqt_controller_manager/controller_manager.py @@ -415,10 +415,10 @@ def _get_parameter_controller_names(node, node_name): parameter_names = call_list_parameters(node=node, node_name=node_name) suffix = ".type" # @note: The versions conditioning is added here to support the source-compatibility with Humble - try: + if os.environ.get('ROS_DISTRO') == "humble": + # for humble, ros2param < 0.20.0 + return [n[: -len(suffix)] for n in parameter_names if n.endswith(suffix)] + else: return [ n[: -len(suffix)] for n in parameter_names.result().result.names if n.endswith(suffix) ] - except: - # for humble, ros2param < 0.20.0 - return [n[: -len(suffix)] for n in parameter_names if n.endswith(suffix)]