14 Smarter Braitenberg Vehicles
1.Building Line Following and Food Following Robots
2. A simple robot Some of the simplest robots are called Braitenberg Machines (Braitenberg Vehicles, Braitenberg Faces).
3. Back to basics A suitable vehicle needs the following: - a left motor (LM) - a right motor (RM) - a left sensor (LS) - a right sensor (LR)
4. Back to basics A suitable program needs the following: - a way of driving each motor as a function of the reading on the sensor on the opposite side
5. Back to basics And the environment needs to ensure that the change in sensory inputs produced by the movement of the vehicle leads to some interesting and obviously useful behaviour… …with a simple performance measure so that we can have a competition
6. Constraints All vehicles will have to be run in exactly the same environment The only suitable sensors are light sensors
7.Consider the termite
8. How termites work Termites (and many other trail-following insects) follow trails by sensing concentrations of special chemicals (pheromones) using their antennae.
9. How termites work They use a technique called osmotropotaxis. Roughly speaking, 1. their left legs go at a speed controlled by the strength of the sensory input to their right antenna, 2. their right legs go at a speed controlled by the strength of the input to their left antenna… In other words, they operate just like little Braitenberg vehicles, and this enables them to follow trails.
10.Could we make visible trails on the ground, and sense them with light sensors? Yes…there are some trails on the floor of the arena…
11. But surely… …if the trail is either black or white, won’t the sensors only ever give maximum or minimum readings? No, because the sensor takes in reflected light from an area, not a point. If the area is wholly inside the black region, you’ll get the minimum reading (with some noise) And if it’s wholly inside the white region, you’ll get the maximum reading (with some noise)
12. But surely… …if the trail is either black or white, won’t the sensors only ever give maximum or minimum readings? No, because the sensor takes in reflected light from an area, not a point. If the area contains both black and white regions – if the sensor is somewhere on the borderline – then the reading will be somewhere in between the minimum and maximum (again, with some noise)
13. A basic strategy If we space the sensors so that they are separated by just less than the width of the trail, then when both sensors read the minimum, we know we must be on the trail… …and so moving forwards is a good idea
14. A basic strategy If the sensor on the left reads the maximum, and the sensor on the right reads the minimum, we know we’re moving off the trail to the left… …so turning right is a good idea
15. A basic strategy If the sensor on the right reads the maximum, and the sensor on the left reads the minimum, we know we’re moving off the trail to the right… …so turning left is a good idea
16. A basic strategy And if both sensors read the maximum, you know you’ve completely lost it Of course, you could devise some cunning way to get back on the trail (termites do)…
17. But… What if one or both sensors give a reading somewhere in between? The quick and dirty solution: keep on doing whatever you were doing – it won’t last The elegant solution: you can produce one if you want, but it won’t make any difference…
18. The performance measure We can break this into two stages: (1) How far down the trail you get (2) If you make it to the end, how long it took
19. First, catch your robot 1. You can make whatever you like, but since time is so short I recommend that you use a version of the Trusty robot 2. Described in Jonathan Knudsen’s “The Unofficial Guide to Lego Mindstorms Robots”