Git Product home page Git Product logo

Comments (5)

stonier avatar stonier commented on July 23, 2024

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 foo.shutdown() might need to happen before bar.shutdown() lest something catastrophic happen and the world end.

In this case it would be each class's responsibility to agnostically provide an on_shutdown method.

from rclpy.

clalancette avatar clalancette commented on July 23, 2024

@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.

from rclpy.

stonier avatar stonier commented on July 23, 2024

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.

from rclpy.

clalancette avatar clalancette commented on July 23, 2024

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.

from rclpy.

chapulina avatar chapulina commented on July 23, 2024

On gazebo_ros_pkgs we have a use case where we want to make a service call right before shutdown. On ROS 1 the on_shutdown hook was being used:

https://github.com/ros-simulation/gazebo_ros_pkgs/blob/3cd100e20ba09245be01ad674248aa31a46ad271/gazebo_ros/scripts/spawn_model#L315-L317

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

from rclpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.