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 #1273

Merged
merged 2 commits into from Jan 8, 2024

Conversation

saikishor
Copy link
Member

@saikishor saikishor commented Jan 6, 2024

Fixes #1223

Before:

Traceback (most recent call last):
  File "/workspaces/ros2_baustelle_ws/build/rqt_controller_manager/rqt_controller_manager/controller_manager.py", line 153, in _update_controllers
    controllers = self._list_controllers()
  File "/workspaces/ros2_baustelle_ws/build/rqt_controller_manager/rqt_controller_manager/controller_manager.py", line 171, in _list_controllers
    controllers = list_controllers(self._node, self._cm_name).controller
  File "/workspaces/ros2_baustelle_ws/install/controller_manager/local/lib/python3.10/dist-packages/controller_manager/controller_manager_services.py", line 49, in list_controllers
    return service_caller(node, f'{controller_manager_name}/list_controllers',
  File "/workspaces/ros2_baustelle_ws/install/controller_manager/local/lib/python3.10/dist-packages/controller_manager/controller_manager_services.py", line 29, in service_caller
    raise RuntimeError(f'Could not contact service {service_name}')
RuntimeError: Could not contact service /controller_manager/list_controllers

Now, instead of raising an exception and closing, it will clear the window and then connects to the server when it is available again
image

Copy link

codecov bot commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (64c9e2a) 47.89% compared to head (e7ed02d) 47.89%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1273   +/-   ##
=======================================
  Coverage   47.89%   47.89%           
=======================================
  Files          41       41           
  Lines        3451     3451           
  Branches     1876     1876           
=======================================
  Hits         1653     1653           
  Misses        444      444           
  Partials     1354     1354           
Flag Coverage Δ
unittests 47.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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.

Fantastic!

@bmagyar bmagyar added backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble. backport-iron This label should be used by maintaines only! Label triggers PR backport to ROS2 Iron. labels Jan 7, 2024
Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Works great, thanks :)

@bmagyar bmagyar merged commit 2d82de8 into ros-controls:master Jan 8, 2024
14 checks passed
mergify bot pushed a commit that referenced this pull request Jan 8, 2024
* add service_timeout to the other service methods
* catch RuntimeErrors when the service is no longer available

(cherry picked from commit 2d82de8)

# Conflicts:
#	controller_manager/controller_manager/controller_manager_services.py
#	rqt_controller_manager/rqt_controller_manager/controller_manager.py
mergify bot pushed a commit that referenced this pull request Jan 8, 2024
* add service_timeout to the other service methods
* catch RuntimeErrors when the service is no longer available

(cherry picked from commit 2d82de8)
saikishor added a commit to saikishor/ros2_control that referenced this pull request Jan 8, 2024
…s#1273)

* add service_timeout to the other service methods
* catch RuntimeErrors when the service is no longer available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble. backport-iron This label should be used by maintaines only! Label triggers PR backport to ROS2 Iron.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RQT Controller Manager]
3 participants