How to set shutdown flag to False once it is True

asked 2016-10-26 06:11:47 -0600

JaLo gravatar image

I am running a Python script using IPython, in which I am initializing a ROS node and afterwards subscribing to a topic. When the execution is stopped (Ctrl + C on IPython), the process seems not to be killed (It seems to me that the node hangs from IPython father process), and thus the shutdwon flag keeps True.

The problem comes when I want to run again the script within the same IPython session, as the shutdown flag is set to True and the main functions e.g. rospy.spin() can not be correctly run.

My question is if there is any way to set this flag to False prior to run the code again, as I would like to not close and reopen IPython every time I want to test the script.

edit retag flag offensive close merge delete