This paper presents an Erlang-based framework, developed by the authors, for the realisation of software systems for autonomous mobile robots. On the basis of the analysis of the main problems arising in the design and implementation of such a kind of robots, a software infrastructure has been derived, organised in a set of layers, each one composed by some modules. This layered architecture is employed to separate hardware interfacing problems from control loops and high-level strategy tasks; such an organisation allows also a developer to concentrate only on the specific problem to be dealt with, and to immediately identify the module or layer to be involved for the realisation of a specific functionality. The proposed structure also favours reuse and rapid refactoring, since the replacement of a piece of hardware or a change in a functionality requires only few changes on a specific module, leaving the remaining system untouched. The overall software architecture is described in th...