autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
968 stars 631 forks source link

Incomplete Resource Release on Shutdown in Autoware with ROS2 #6941

Open sgNicola opened 5 months ago

sgNicola commented 5 months ago

Checklist

Description

When shutting down Autoware that utilizes ROS2, there is an observed issue where not all ROS2-related resources are fully released. This incomplete release of resources causes problems during subsequent attempts to launch Autoware, preventing normal initialization. Shutting down using Ctrl+C does not seem to effectively manage the cleanup of all active resources. 2023-10-31_13-52

Expected behavior

Upon shutting down Autoware, all resources, especially those tied to ROS2, should be fully released, ensuring that the system is clean and ready for a new startup without any issues.

Actual behavior

Resources remain engaged or partially active after Autoware is shut down using Ctrl+C. This leads to difficulties when attempting to restart Autoware. The only workaround is either system reboot or forceful termination of all ROS-related processes using commands like pkill -f 'ros'.

Steps to reproduce

  1. Start Autoware with ROS2 integration.
  2. After running some processes, attempt to shut down the system using Ctrl+C.
  3. Attempt to relaunch Autoware.

Versions

-OS:Ubuntu 20.04 -ROS2: ROS2 galactic -Autoware: Autoware.universe galactic

Possible causes

Resource Management

Additional context

No response

meliketanrikulu commented 5 months ago

Hello @sgNicola . Thanks for your sharing. Here I understand that the resources connected to ROS2 remain open after Autoware is closed. Could you explain this a little bit? When you run the ros2 node list command, did you see that there were active nodes? Or do you think TFs are still active?

stale[bot] commented 3 months ago

This pull request has been automatically marked as stale because it has not had recent activity.