rospy init_node() inside imported file
I'd like to perform a rospy.init_node()
inside a file imported by another file. However, this doesn't seem to work - the program hangs whenever I try this.
Example (broken, both files in same folder):
main.py:
import test
test.py:
import rospy
rospy.init_node("node_name")
Running python main.py
results in the program hanging. However, running python test.py
works.