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

BasicNavigator doesn't clean up ActionClients #2923

Closed
m2-farzan opened this issue Apr 24, 2022 · 0 comments
Closed

BasicNavigator doesn't clean up ActionClients #2923

m2-farzan opened this issue Apr 24, 2022 · 0 comments

Comments

@m2-farzan
Copy link
Contributor

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • ROS2 Version:
    • Galactic
  • Version or commit hash:
    • 1.0.8-1focal.20220203.051427
  • DDS implementation:
    • Fast-RTPS

Steps to reproduce issue

#!/bin/python3

import rclpy
from nav2_simple_commander.robot_navigator import BasicNavigator

rclpy.init()
nav = BasicNavigator()
nav.destroy_node()

Expected behavior

Clean exit

Actual behavior

Exits with 0 code but prints the following warning:

Exception ignored in: <function ActionClient.__del__ at 0x7f310cc98f70>
Traceback (most recent call last):
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/action/client.py", line 597, in __del__
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/action/client.py", line 590, in destroy
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/handle.py", line 122, in __enter__
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/handle.py", line 104, in _get_capsule
rclpy._rclpy_pybind11.InvalidHandle: Tried to use a handle that has been destroyed.
Exception ignored in: <function ActionClient.__del__ at 0x7f310cc98f70>
Traceback (most recent call last):
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/action/client.py", line 597, in __del__
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/action/client.py", line 590, in destroy
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/handle.py", line 122, in __enter__
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/handle.py", line 104, in _get_capsule
rclpy._rclpy_pybind11.InvalidHandle: Tried to use a handle that has been destroyed.
Exception ignored in: <function ActionClient.__del__ at 0x7f310cc98f70>
Traceback (most recent call last):
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/action/client.py", line 597, in __del__
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/action/client.py", line 590, in destroy
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/handle.py", line 122, in __enter__
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/handle.py", line 104, in _get_capsule
rclpy._rclpy_pybind11.InvalidHandle: Tried to use a handle that has been destroyed.
Exception ignored in: <function ActionClient.__del__ at 0x7f310cc98f70>
Traceback (most recent call last):
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/action/client.py", line 597, in __del__
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/action/client.py", line 590, in destroy
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/handle.py", line 122, in __enter__
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/handle.py", line 104, in _get_capsule
rclpy._rclpy_pybind11.InvalidHandle: Tried to use a handle that has been destroyed.
Exception ignored in: <function ActionClient.__del__ at 0x7f310cc98f70>
Traceback (most recent call last):
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/action/client.py", line 597, in __del__
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/action/client.py", line 590, in destroy
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/handle.py", line 122, in __enter__
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/handle.py", line 104, in _get_capsule
rclpy._rclpy_pybind11.InvalidHandle: Tried to use a handle that has been destroyed.

Additional information

Looks like Node.destroy_node only destroys publishers, subscribers, etc. but doesn't handle ActionClients. I'll post a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants