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():
    rospy.rostime.wallsleep(0.5)

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