ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You have this:
while not rospy.is_shutdown(): [..] rospy.spin()
unless the intention to only ever run a single iteration of the while
-loop, I don't believe that rospy.spin()
should be there. It's essentially a non-returning statement (ie: your program will hang there indefinitely).
When I reset the script the first one or two events are again processed as expected and that the process halts.
If by "first two events" you mean two messages, then that could be explained by the fact that you have two rospy.wait_for_message(..)
in a row, executed before your script reaches the blocking rospy.spin()
.