Skip to content

Commit

Permalink
[tree-watcher] bugfix shutdown for humble
Browse files Browse the repository at this point in the history
  • Loading branch information
stonier committed Feb 7, 2023
1 parent 018b087 commit 5250426
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changelog

Forthcoming
-----------

* [watchers] handle explicit args and memory details, `#196 <https://github.com/splintered-reality/py_trees_ros/pull/196>`_
* [watchers] bugfix blackboard watcher shutdownon humble, `#194 <https://github.com/splintered-reality/py_trees_ros/pull/194>`_
* [code] refactor for explicit arguments, `#191 <https://github.com/splintered-reality/py_trees_ros/pull/191>`_
* [trees] optional node and node name args to setup, `#188 <https://github.com/splintered-reality/py_trees_ros/pull/188>`_
* [trees] switch deprecating qos policy for shorter versions, `#187 <https://github.com/splintered-reality/py_trees_ros/pull/187>`_

Expand Down
4 changes: 2 additions & 2 deletions py_trees_ros/programs/tree_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ def main():
# xdot running, wait for it to terminate
break
executor.spin_once(timeout_sec=0.1)
except KeyboardInterrupt:
except (KeyboardInterrupt, rclpy.executors.ExternalShutdownException):
pass
finally:
if tree_watcher.xdot_process is not None:
if tree_watcher.xdot_process.poll() is not None:
tree_watcher.xdot_process.terminate()
tree_watcher.shutdown()
rclpy.shutdown()
rclpy.try_shutdown()

0 comments on commit 5250426

Please sign in to comment.