FloorPlan-DSL

FloorPlan DSL

The FloorPlan DSL is a model-driven approach to specify indoor environments. The language enables developers to model indoor environments by its components such as spaces, entryways, and other features such as windows and columns; allowing the re-creation of real-world environments, or the creation of new ones. The models can be transformed into 3D meshes and occupancy grid maps, which can be used to simulate robot navigation tasks in most robot simulators.

image

Features

Installation

It is strongly recommended to use Docker to install and use the FloorPlan DSL and other tools.

Installation through Docker

If not installed already, install docker as documented here. From the root directory of this repository, build the docker image:

docker build . --tag floorplan:latest

This will build the container and assign the string floorplan:latest as a tag to run the correct container. To run the container execute the following command after replacing the correct paths inside the angle brackets:

docker run -v $<local output folder>:/usr/src/app/output -v $<local input folder>:/usr/src/app/models -it floorplan:latest bash

Important required options of the command:

Native installation (Ubuntu 24.04)

Install all the requirements:

sudo apt-get install python3-pip python3-venv -y

First, create a virtual environment and activate it:

python -m venv .venv
source .venv/bin/activate

From the root directory of the repo, install the python packages by running:

pip install -e .

This will install the languages and generators. To confirm that the languages have been installed, execute the commands: textx list-languages and textx list-generators. The names of the languages should appear in the output:

> textx list-languages
...
floorplan-v1 (*.floorplan)    floorplan-dsl[1.1.0]                    A language to model indoor environments
floorplan-v2 (*.fpm2)         floorplan-dsl[1.1.0]                    A language to model floor plans (v2)
floorplan-variation (*.variation)floorplan-dsl[1.1.0]                    A language to variate models from ExSce

> textx list-generators
...
floorplan-v2 -> json-ld       floorplan-dsl[1.1.0]          Generate composable models in json-ld
floorplan-v1 -> floorplan-v2  floorplan-dsl[1.1.0]          Convert from floorplan models from v1 to v2
floorplan-variation -> floorplan-v2floorplan-dsl[1.1.0]          Generate variations of indoor environments from .floorplan models

Getting started

Generating the composable model representation

To generate the JSON-LD representation of the FloorPlan model, simply use textX’s language generators:

textx generate <floorplan-v2 model> --target json-ld -o <output path>

For example:

textx generate models/examples/brsu_building_c_with_doorways.fpm2 --target json-ld -o .

The JSON-LD models will be generated using radians, the default internal unit for angles in the floor plan model. To generate the JSON-LD models using degrees, add --angle-unit deg to your command.

Tutorials

Modelling an environment can be straightforward with some background information on how the concepts are specified and related to each other. This tutorial will explain the concepts of the language and how to position them in the environment. An overview of the concepts and their attributes is available here. A tutorial on the variation DSL is also available here.

Citation

If you use our tooling and approach please cite our paper as follows:

@inproceedings{parra2023iros,
    author = {Parra, Samuel and Ortega, Argentina and Schneider, Sven and Hochgeschwender, Nico},
    title = ,
    booktitle = {Proceedings of the IEEE International Conference on Intelligent Systems and Robots (IROS)},
    year = {2023}
}

Acknowledgments

This work has been partly supported by the European Union’s Horizon 2020 projects SESAME (Grant No. 101017258) and SOPRANO (Grant No. 101120990).

drawing drawing drawing