In this chapter, we will be taking a look at distance sensors and how to use them to avoid objects. We will look at the different types of sensors. We will then build a layer in our robot object to abstract away the hardware differences. By doing this, we can then create a behavior for object avoiding. We'll also take a slight diversion into menu modes for selecting them.
You will learn about the following topics in this chapter:
- What distance sensors are and how to choose them
- How to connect distance sensors to your robot and test them
- How to create a smart object avoidance behavior
- How to create a menu to select different robot behaviors