Re: [ros-users] handling multiple topics in Python

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Blaise Gassend
Date:  
To: ros-users
Subject: Re: [ros-users] handling multiple topics in Python
> Rospy replaces the signal handler for SIGINT. A running loop in your
> main thread will no longer be interrupted with a KeyboardInterrupt.
> Instead you should check rospy.is_shutdown() as a condition of your
> loop.


Also, if you are using threads, SIGINT will only kill one of them even
without rospy. You have to make sure that each thread exits after a
KeyboardInterrupt (or after rospy.is_shutdown() goes true in the case of
rospy).