As your projects gain
complexity it may use many different sensors and actuators. You will
need a way to effectively use all this information to produce reliable
results.
There are two types of
algorithm that can be used to do this. The first is called sensor
fusion. This approach uses information from all of the sensors
simultaneously to create a constant world model of its surroundings.
This sort of model is
very difficult to program and requires massive amounts of
computational power, and so is not really suited to the world of hobby
robots.
This section of the
tutorial will cover something called subsumption architecture. This is
a way of building a simple behaviour model that is much simpler
computationally based on priority.
For this example lets
say that you have built a robot that is going to follow light around
the room using LDR sensors. The robot also has an ultrasound proximity
sensor and bump micro switches to detect obstacles.
A diagram of its
subsumption architecture would look like this:
The diagram shows how
priorities work in subsumption architecture.
The bump sensor takes
the highest priority, which makes sense, if your robot is stuck
against a wall you don't want to be worrying about following a light
source.
Cruise has the lowest
priority, its basically saying drive forwards until you find a light
to follow (or an obstacle to avoid).
The ultrasound sensor
has a lower priority than the bump sensor because you ideally want to
avoid objects before you collide with them. |