ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.5k stars 1.26k forks source link

`/assisted_teleop` action client persists after node has been destroyed #4696

Open tiwaojo opened 3 days ago

tiwaojo commented 3 days ago

Bug report

Required Info:

Steps to reproduce issue

Expected behavior

All nodes, actions and callbacks should be destroyed when the request is completed.

Actual behavior

The action client node is not destroyed when the server is shut down. As the /assisted_teleop action client is not destroyed, the node is not destroyed. This can be seen by running ros2 action list after the request has been served. Any further calls to the same endpoint recreates the action client node and the action client, hereby creating duplicate nodes and actions.

SteveMacenski commented 3 days ago

Ask on robotics stack exchange, I'm not sure what this has to do with Nav2 other than using a Nav2 action server as the example. It looks like you're doing some unusual things and I'm not sure what you're expecting the behavior to look like. I don't see why the action server would come down just because you remove a client to it.

If your client isn't being properly distroyed, that has nothing to do with Nav2 since that is your provided software - not something in Nav2. If you need help with properly destroying your own nodes, you should reference the ROS 2 docs and Robotics Stack Exchange.

tiwaojo commented 2 days ago

Hello, my apologies if my issue seems out of scope of Nav2 or wasn't communicated properly. I was able to determine the source of the error and was preparing a pull request for it, as a PR requires an issue attached. It was a minor bug with the assisted_teleop_client action client where it wasn't destroyed with the rest of the node.

https://github.com/ros-navigation/navigation2/blob/f79de33c3c192cd66377dc9538bdcbc3597b7f66/nav2_simple_commander/nav2_simple_commander/robot_navigator.py#L97-L107

SteveMacenski commented 21 hours ago

Ah I see, sorry that was unclear. Please open the PR! I thought you were referring to issues wrt your own assisted teleop client not being destroyed when your node was completed.