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

The code of rospy.spin can be found on github/roscom

It boils down to

while not rospy.core.is_shutdown():

So you can write your node around this loop and leave the loop whenever you want.