Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rqt_controller_manager for non-humble #1454

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

christophfroehlich
Copy link
Contributor

@christophfroehlich christophfroehlich commented Mar 23, 2024

I made a mistake with #1429: rqt_cm does not work on rolling now (sorry): The finally part is always executed, except should be the right python syntax.

Traceback (most recent call last):
  File "/workspaces/ros2_rolling_ws/build/rqt_controller_manager/rqt_controller_manager/controller_manager.py", line 150, in _on_cm_change
    self._update_controllers()
  File "/workspaces/ros2_rolling_ws/build/rqt_controller_manager/rqt_controller_manager/controller_manager.py", line 157, in _update_controllers
    controllers = self._list_controllers()
  File "/workspaces/ros2_rolling_ws/build/rqt_controller_manager/rqt_controller_manager/controller_manager.py", line 181, in _list_controllers
    for name in _get_parameter_controller_names(self._node, self._cm_name):
  File "/workspaces/ros2_rolling_ws/build/rqt_controller_manager/rqt_controller_manager/controller_manager.py", line 424, in _get_parameter_controller_names
    return [n[: -len(suffix)] for n in parameter_names if n.endswith(suffix)]
TypeError: 'Future' object is not iterable

However, I made the version conditioning now by os.environ.get('ROS_DISTRO') what seems to be cleaner than a try/catch imho.

Tested now on rolling and humble.

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix

Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better indeed, thanks!

@bmagyar bmagyar merged commit dcddb07 into ros-controls:master Mar 26, 2024
6 of 11 checks passed
@christophfroehlich christophfroehlich deleted the rqt_fix branch April 7, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants