A distributed simulation framework for rapid deployment of research demonstrators
In aeronautical research the scientist often faces the challenge of demonstrating their results in a way that is more end-user friendly than tables and charts. In Airbus Group Innovations (AGI), demonstrating disruptive technologies already from a very low technology readiness level is essential to confirm customer interest and gather feedback about how they can be further developed. As a result, several lightweight but ad-hoc tools are developed to provide visualization, human interaction and software in the loop capable demonstrators – a non-value adding task that consumes time that would be better used in the improvement of the technologies being developed. This scenario led us to identify the need to develop a unified simulation framework for rapid prototyping of simulations in a research environment. In this work, we describe the result of this development, the main design decisions and some example applications. The initial envisaged applications for such a framework were the integration of trajectory optimization, weather radar and computer vision activities developed within AGI. At the beginning of the conceptual development phase a challenge was identified – how to convince users to spend their time adapting their existing tools to the new framework? This major risk was mitigated by adopting a design philosophy of minimum effort for the end user and maximum tool flexibility. Without the first, potential users would reject the solution right from the beginning. The second is essential to make sure the users can keep using the tool during their whole research project. Another critical point during the development phase was making sure that the user could quickly benefit from using the framework. This was done by implementing a large standard library, with tools such as human interaction and 3D rendering – modules that require a lot of effort to be implemented and are not part of our core research activities. After the development of the requirements document, we started searching for existing solutions that could be adopted. (In the final work, we intend to show the list of solutions we considered with an analysis of each one.) With the existing solutions not being able of providing the needed ease of implementation, it was decided that a custom framework would be implemented. The resulting program is a distributed simulation framework (DSF) that allows several modules to communicate via a simple text-based protocol over network sockets. This opens the possibility of having modules written in different languages, running in different computers to communicate and operate together. DSF is built on a client-server architecture, where each client is responsible for one simulation feature (Flight Dynamics, Image Rendering, User Input, etc.) and the server is responsible for storing and exchanging data between the different clients and controlling the simulation time. Every communication cycle is done in the following order: • Server collects data that will be sent to a client (e.g. altitude); • Server sends data to the client; • Client process data (e.g. uses altitude data to calculate pressure); • Client answers server as fast as possible with the new data (e.g. sends pressure back to server); • Server receives data; that is stored in a buffer; and • Server updates nodes. This way, every communication cycle is organized in a “server request, client answers” protocol. The data sent on each message pair is pre-established during the connection of the client to the server by exchanging an XML file called contract. (The final paper will describe the synchronization features available in DSF to guarantee real-time capabilities and fully deterministic behaviour) The generation of synthetic flight images is included on the DSF framework as a modification of the open-source, multi-platform FlightGear Flight Simulator. FlightGear is capable of generating realistic images: • Of several locations; • In different weather conditions; • with an arbitrary number of 3D models (e.g. aircraft, buildings, weather features). This allows the creation of virtual cameras, that can be used both for visualization and image processing algorithms. The data can be transmitted by inter-process communication methods to the desired modules or be displayed to the user.