ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Answering my own question:

I found my answer in the rospy source. There is a comment that explicitly states that sending of all messages before shutdown is not guaranteed. Instead, there is a check for whether the process is still running before writing, and if not it exits immediately.

Answering my own question:

I found my answer in the rospy source. There is a comment that explicitly states that sending of all messages before shutdown is not guaranteed. Instead, there is a check for whether the process is still running before writing, and if not it exits immediately.

Here is an excerpt from topics.py

 except ValueError:
        # operations on self.buff can fail if topic is closed
        # during publish, which often happens during Ctrl-C.
        # diagnose the error and report accordingly.
        if self.closed:
            if is_shutdown():
                # we offer no guarantees on publishes that occur
                # during shutdown, so this is not exceptional.
                return