-
Notifications
You must be signed in to change notification settings - Fork 235
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
On shutdown hooks #244
Comments
I wonder if this was just my immediate reaction to not having something that was there in ROS1. Looking at the situation with fresh eyes, I wonder if it really is the right thing to have the application take care of the shutdown. It is only the application that will know that In this case it would be each class's responsibility to agnostically provide an |
@stonier Based on your latest comment, I'm going to close this out for now. If you feel like this is something that core rclpy needs to provide in the future, please feel free to reopen. |
I'd be interested to know if there was an explicit reason it was made available in the ROS 1 api. We could perhaps trawl the rospy issues and commit history to see if there is anything there. |
Unfortunately, it looks like in ros_comm that code comes from this commit: ros/ros_comm@5ac90fafe3 ,which looks like it is probably the port from sourceforge -> github in 2010. To go further back than that, we'd have to go trawling through the original sourceforge stuff, which I don't think is worth it. Maybe @tfoote has some recollection on why it was originally added. |
On If the hook isn't ported, is there an alternative way to achieve this? That script is being migrated to ROS 2 on ros-simulation/gazebo_ros_pkgs#948 |
Feature request
Feature description
Something like the
rospy.on_shutdown()
handle.Implementation considerations
Primary use case here is so that authors of scripts/applications do not need to remember a long sequence of magic shutdown calls. e.g.
Instead, the shutdown methods would register themselves in a setup phase inside the class and subsequently the author of the main script need not worry about the shutdown methods at all.
The text was updated successfully, but these errors were encountered: