ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
In the function listener
, you make a call to rospy.spin()
. This function blocks until the node is terminated, so listener
is blocked. CTRL-C caused spin()
to return, but you then also get stuck inside the while True
loop. The overall control flow of this program needs rework, and I recommend doing a refresher run through the ROS tutorial series to review concepts such as spinning.
Also, CTRL-Z suspends the process rather than terminating it.