**4. Initial Framework Implementation**

In this section we describe the basic implementation of the proposed architecture using the abstraction levels described above (Figures 2 and 3). We can use this basic structure of nodes and topics as a starting point to create more sophisticated applications easily and quickly, simply by replacing the desired modules. The creation of a real-world autonomous navigation application using our framework consists of two phases: pre-execution and execution. In the first one, we gather the data to generate the environment information that we will need during the execution phase.

Of course, an equivalent system could have been generated using just the navigation stack since in this first example we based the localization in a grid map. But our framework adds conceptual structuring and better modularity. That is to say, in this implementation the only module depending on the grid map is the localization. Therefore replacing this module would not affect the rest of the system (as can be seen in Section 5) contrary to what happens with the navigation stack where the planning needs a grid map to generate trajectories.

**Figure 2.** Robot operating system (ROS) nodes scheme that shows the system architecture in the pre-execution phase for our first framework implementation. Notice that each node is placed at its corresponding abstraction level. In this phase we record data from the sensors layer and process them offline using the architecture shown to obtain the grid map and trajectories that will be used in the execution phase.
