@ -353,3 +353,7 @@ Instantiate the class with `FrameListener()`
rospy.spin()
```
Give control to ROS. This will allow the callback to be called whenever new messages come in. If we don't put this line in, then the node will not work, and ROS will not process any messages.
**Previous Example** [Voice Teleoperation of Base](example_9.md)
@ -173,5 +173,5 @@ Instantiate class with `Avioder()`
Give control to ROS with `rospy.spin()`. This will allow the callback to be called whenever new messages come in. If we don't put this line in, then the node will not work, and ROS will not process any messages.
This loop is a fairly standard rospy construct: checking the `rospy.is_shutdown()` flag and then doing work. You have to check `is_shutdown()` to check if your program should exit (e.g. if there is a Ctrl-C or otherwise). The loop calls `rate.sleep()`, which sleeps just long enough to maintain the desired rate through the loop.
**Previous Example:** [Example 3](example_3.md)
**Next Example:** [Example 5](example_5.md)
**Previous Example:** [Mobile Base Collision Avoidance](example_3.md)
Give control to ROS with `rospy.spin()`. This will allow the callback to be called whenever new messages come in. If we don't put this line in, then the node will not work, and ROS will not process any messages.
**Previous Example** [Example 4](example_4.md)
**Next Example** [Example 6](example_6.md)
**Previous Example** [Give Stretch a Balloon](example_4.md)