Fusion is the process of combining multiple possible behaviours into a single behaviour for the robot.
The lectures immediately warn that this is a difficult task: some behaviours could be incompatible — how do you combine "go left" and "go right"? — and there are many different ways to achieve fusion.
| Implementation | Note |
|---|---|
| Simple direct combination of output signals into the actuators, e.g. by summing | The Extended Braitenberg Architecture of Chapter 5 |
| Use of mathematical functions for combining signals | Weighted sums, vector addition |
| Using fuzzy logic | Sections 9–10 of this chapter |
The examples named in the deck are: Motor schemas (Arbib, Arkin), the Extended Braitenberg architecture, the Process description language (Steels), and Potential fields.
Keep Chapter 6 side by side. Arbitration selects one behaviour and discards the rest; fusion lets all of them contribute. The immediate practical consequence: with fusion you never have to write a priority ordering, and you never get the abrupt switching of an FSA — but you do get an output that may be a compromise nobody wanted, and that is precisely the local minima problem of section 7.
Seven statements define the model. They are dense; take them one at a time.
"No predefined hierarchy exists for coordination." This is the exact opposite of the subsumption architecture, whose entire coordination mechanism is a fixed hierarchy of layers. If you are asked to compare the two architectures, this is the first difference to state; the second is that in subsumption an actuator receives signals from at most one level, whereas in motor schemas every schema contributes to every command.
A motor schema (MS) is composed with a perceptual schema (PS), which provides the environmental information specific for that particular behaviour. Each motor schema produces an action vector, consisting of both magnitude and orientation components, that defines the way the robot should move in response to the perceived stimuli.
Different motor schemas may exist, such as move-ahead, move-to-goal and avoid-obstacle.
The PS/MS pairing is the architectural expression of situatedness. Each behaviour gets its own private, purpose-built view of the world — not a slice of one shared global model. The obstacle-avoidance schema does not need to know where the goal is, and the goal-seeking schema does not need to know about walls. This is the same rejection of a central sensor-fusion repository that Genghis demonstrated in Chapter 6, expressed in a cooperative rather than competitive architecture.
Even if the description of motor schemas is given in terms of motors — that is, in reference to movements of the robot — the approach can be generalised to any kind of actuators.
When wheel motors are concerned, the question arises of how to use the resulting vector (the sum of all the individual vectors) to manoeuvre the motors. A vector can be used directly on a robot controlled with a roto-translational model. If the robot is controlled by means of a different model — for example differential steering — a conversion is needed from the roto-translational model.
That conversion is the matrix pair from Chapter 5, section 6: vl = v - (L/2)·w, vr = v + (L/2)·w, where the vector magnitude plays the role of v and the vector angle drives w.
The vectors of a motor schema are defined by means of potential fields:
The metaphor is doing real work here: it lets you design a behaviour by drawing what you want the world to feel like, rather than by writing what the robot should do. The doing follows from the field.
| Field | Definition from the lectures | |
|---|---|---|
| (a) | Uniform | The robot feels the same force no matter where it is. Usually used to capture the behaviour "go in direction d" |
| (b) | Perpendicular | The field is directed away from a surface, such as a wall. A perpendicular field can be pointed towards an object as well |
| (c) | Attractive | Represents a taxis or a tropism — the robot is attracted to an object or a goal. Arrows have decreasing length as they get closer to the object |
| (d) | Repulsive | Opposite to the attractive field. Arrows get shorter as they move away from the object |
| (e) | Tangential | Tangent around an object, i.e. perpendicular to radial lines. The field can spin either clockwise or counterclockwise. Useful for directing the robot around an obstacle, or having a robot investigate something |
Pick a field type and move the source. The grid shows the whole field for reading; the highlighted arrow is the only vector a real robot would actually compute — the one at its own position.
Three implementation facts, and then three worked examples.
Vangle = specified compass direction
Vlength = fixed value
This is the uniform field, written out.
Vangle = random direction, changed every k steps
Vlength = fixed value
k is a parameter of the motor schema. Note that it requires counting the number of steps — so even this minimal schema carries a little internal state, which is exactly the point made in Chapter 6, observation 3.
Vangle = -pi
| (D - d) / D for d <= D
Vlength = -|
| 0 for d > D
where D is the maximum range of the field's effect and d the measured distance. The magnitude is 1 when the obstacle is touching (d = 0), falls linearly to 0 at the range limit, and is exactly 0 beyond it — so a distant obstacle contributes nothing to the sum, which is what keeps the fusion from being dominated by irrelevant stimuli.
The example used in the lectures is the task of lab activity 4: the robot has to reach a goal avoiding obstacles. Three fields are shown: (a) the repulsive field of the obstacle, (b) the attractive field of the goal, and (c) the combined potential field — followed by the path taken by the robot.
Three warnings are given, and the second is the famous one:
Drag the obstacle by clicking in the arena. Line it up between the robot and the goal and the robot stops dead. Then switch on one of the three remedies from the lectures.
Schemas are combined by summing their respective vectors. Weights and parameters can be added — and also tuned by means of a learning algorithm. (That last clause is the hinge to Part III: Chapter 11 will tune exactly such parameters automatically with F-race and irace.)
| Advantages | Disadvantages |
|---|---|
| Modular approach | Local minima in the global potential field might get the robot trapped |
| The designer has only to define the specific motor schema / potential field | Parameter calibration is often crucial |
The handout asks you to think in this order: for a given behaviour, decide first what kind of field is suitable. Remember that the goal is to define a force that will be exerted on the robot — do not think about the movement, since that comes for free when you translate the length and angle of the resulting vector into wheel velocities. Then focus on the perceptual schema (one PS per sensor? one PS for a set of sensors? a combination of PSs?) and consequently define the vector.
Practical notes from the same handout: light and proximity readings in ARGoS-Lua return two fields, value and angle; sensors are numbered 1 to 24 counterclockwise, with sensors 1–12 spanning angles from 0 to almost π and 13–24 spanning −π to 0. Vectors are held in polar form as {length = 0.0, angle = 0.0} and summed two at a time with vector.vec2_polar_sum(v1, v2) from the provided vector.lua module.
Lab 4 closes with the question the oral exam likes: elucidate the main differences between the subsumption architecture and motor schemas. Which is easiest to implement? How can one assess the performance of the two implementations? Which is best from the viewpoint of extendibility and composition of behaviours? Is there a way to design a hybrid architecture composed of both — and would it be a good idea? Prepare an answer that uses the vocabulary of Chapter 6, section 3: competitive versus cooperative, fixed hierarchy versus no predefined hierarchy, one level per actuator versus all schemas contributing.
The third way of doing fusion is with fuzzy logic. First the logic, then the system.
A variable in fuzzy logic is called a linguistic variable — for example cold, warm, hot, slow, fast, far, near. The amount of truth degree of a linguistic variable is defined by means of a membership function.
Operators can be defined in many ways. Two frequently used families:
| Boolean | Fuzzy (1) — min-max | Fuzzy (2) — multiplication |
|---|---|---|
| ¬x | 1 − x | 1 − x |
| x ∧ y | min(x, y) | xy |
| x ∨ y | max(x, y) | 1 − (1 − x)(1 − y) |
Because a reading can belong to near-left to degree 0.7 and to far-left to degree 0.3 at the same time, several rules fire simultaneously with different strengths, and the defuzzifier blends their conclusions. There is no arbitration step anywhere: the smooth transition between behaviours falls out of the logic. This is the same "each behaviour contributes in varying degrees" of section 2, obtained with membership functions instead of vectors.
A fuzzy system applies fuzzy reasoning to map input signals (or questions) to output signals (or answers). The core of a fuzzy system is an inference engine working on a fuzzy rule base. The rule base is composed of IF-THEN rules operating on fuzzy variables.
IF clear-ahead THEN forward
IF near-right THEN hard-left
IF far-right THEN left
IF near-left THEN hard-right
IF far-left THEN right
Suppose we define a perceptual schema that reads the values from the proximity sensors and produces a processed perception value in [−1, 1] with the following semantics: −1 means maximal proximity of an obstacle on the left, 0 means no obstacles, 1 means maximal proximity on the right.
Moreover, assume a function that maps a value in [−1, 1] to proper commands to the motors, where −1 corresponds to maximal left turning, 0 to going straight, and 1 to maximal right turning. In this way we have one input and one output value to the fuzzy system.
Notice that the perceptual schema of section 3 has quietly reappeared: it is what turns 24 raw proximity readings into the single number the fuzzy system consumes. The architectures in this chapter are not alternatives to each other so much as layers of the same design — PS to make sense of the world, then some fusion rule to turn sense into a command.
Move the perception value along [−1, 1] and watch all four steps happen at once: memberships, rule strengths, clipped output sets and the centre of mass. Note how often two rules fire together — that is the fusion.
Fusion is the process of combining multiple possible behaviours into a single behaviour for the robot. It is difficult because some behaviours could be incompatible. Implementations: simple direct combination of output signals into the actuators (e.g. by summing); use of mathematical functions for combining signals; using fuzzy logic. Named examples: motor schemas (Arbib, Arkin), the Extended Braitenberg architecture, the process description language (Steels), potential fields.
A concurrent and distributed model of computation; schemas provide a set of behavioural primitives from which more complex behaviours are constructed; behavioural responses are represented by vectors; vectors are defined by means of potential fields; coordination is achieved through vector additions; no predefined hierarchy exists for coordination; each behaviour can contribute in varying degrees to the overall response.
A motor schema is composed with a perceptual schema, which provides the environmental information specific for that particular behaviour. The robot "makes sense" of the world by means of PSs. There can be one PS per sensor, or one PS combining several sensor readings, possibly of different kinds. As designers, we encapsulate in a PS the relevant information for a given MS.
It produces an action vector with both magnitude and orientation components, defining how the robot should move in response to the perceived stimuli. The resulting vector — the sum of all individual vectors — can be used directly on a robot controlled with a roto-translational model; with a different model such as differential steering, a conversion is needed, namely vl = v - (L/2)w and vr = v + (L/2)w.
Uniform: the same force everywhere; captures "go in direction d". Perpendicular: directed away from a surface such as a wall (and can also be pointed towards an object). Attractive: a taxis or tropism towards an object or goal, with arrows decreasing in length as they get closer to the object. Repulsive: the opposite, with arrows getting shorter as they move away. Tangential: tangent around an object, perpendicular to radial lines, spinning either clockwise or counterclockwise; useful for going around an obstacle or investigating something.
Vangle = -pi, and Vlength = (D - d)/D for d ≤ D, 0 for d > D, where D is the maximum range of the field's effect. The magnitude is 1 at contact, decreases linearly with distance, and is exactly zero beyond the range limit.
The fields are computed on the basis of the robot's own perception, so although the whole field is usually drawn for the reader, only a single vector needs to be computed — the one at the robot's location — and the robot recomputes the effect of the field at every update. Nothing global is ever stored.
(1) They treat the robot as if it were a particle that could change velocity and direction instantaneously, which is not true of real robots. (2) Fields might sum to 0; if the magnitude is 0 the robot stops and does not move — the local minima problem, where the resulting field has minima that trap the robot. (3) Remedies: noise, constant fields to produce drifts, and using history to detect when the robot is stuck.
Advantages: a modular approach, and the designer has only to define the specific motor schema or potential field. Disadvantages: local minima in the global potential field might trap the robot, and parameter calibration is often crucial. Schemas are combined by summing their vectors; weights and parameters can be added and even tuned by a learning algorithm.
Subsumption is arbitration (competitive): behaviours are organised in a fixed hierarchy of layers, higher layers subsume lower ones, and at every instant an actuator receives signals from at most one level. Motor schemas are fusion (cooperative): there is no predefined hierarchy, coordination happens by vector addition, and every schema contributes in varying degrees to every command. Subsumption gives clean priority and abrupt switching; motor schemas give smooth blending and the risk of local minima.
In Boolean logic propositions are either true or false, a variable either does or does not belong to a set, the logic is crisp, and both the law of the excluded middle and the law of non-contradiction hold. In fuzzy logic propositions take any truth value in [0, 1], a variable belongs to a set to a degree, it is a multi-valued logic with infinite values in [0, 1], and the law of non-contradiction does not hold — both A and ¬A can be true, at different degrees.
Both define negation as 1 - x. Min-max: x AND y = min(x, y), x OR y = max(x, y). Multiplication-based: x AND y = xy, x OR y = 1 - (1-x)(1-y).
Components: fuzzifier (maps sensor readings onto fuzzy input sets), fuzzy rule base (IF-THEN rules), fuzzy inference engine (maps fuzzy sets onto other fuzzy sets according to rule base and membership functions), defuzzifier (maps fuzzy output sets onto actuator commands). Steps: read sensor values; get membership values of the linguistic variables in the IF; combine them with the fuzzy operators to compute the output strengths; defuzzify, typically by taking the centre of mass of the output membership functions cut at the corresponding strength.
IF clear-ahead THEN forward; IF near-right THEN hard-left; IF far-right THEN left; IF near-left THEN hard-right; IF far-left THEN right. In the worked setup a perceptual schema turns the proximity readings into one value in [−1, 1] (−1 = obstacle hard left, 0 = clear, +1 = obstacle hard right) and the defuzzified output in [−1, 1] is mapped to motor commands (−1 = maximal left turn, 0 = straight, +1 = maximal right turn).