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

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: Blaise Gassend
Dato:  
Til: ros-users
Emne: 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).