-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
/assisted_teleop
action client persists after node has been destroyed
#4696
Comments
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. |
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 navigation2/nav2_simple_commander/nav2_simple_commander/robot_navigator.py Lines 97 to 107 in f79de33
|
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. |
I see what you mean. I apologize for the confusion. I have opened the PR. I also noticed there were some other action clients not being destroyed with the node. I took the liberty to include those in the pull request. |
Great, thanks for the contribution and pointing this out! |
Bug report
Required Info:
Steps to reproduce issue
Setup your workspace
mkdir -p ros2_ws/src cd ros2_ws/src ros2 pkg create --build-type ament_python --license Apache-2.0 --node-name my_node my_package
Install dependencies
Add the following to `dep.repos`
Duplicate the action_client_interfaces package from the action_tutorials repo into your workspace.
Configure the
package.xml
file of your package to depend on theaction_client_interfaces
package by adding the following line:<?xml version="1.0"?> ... + <depend>violation_reporter_interfaces</depend> ...
Create the action client node by adding the following code to
/ros2_ws/src/my_package/my_package/my_node.py
/ros2_ws/src/my_package/my_package/my_node.py
Create your api by adding the following code to
/ros2_ws/src/my_package/api/main.py
/ros2_ws/src/my_package/api/main.py
Build the workspace
Run the program
Send a request to the server
List nodes
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 runningros2 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.The text was updated successfully, but these errors were encountered: