hsd-dev / ros-model-extractors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ros-model-extractors

License

MELODIC build status NOETIC ros-model-extractors FOXY build status

Technical Maintainer: ipa-nhg (Nadia Hammoudeh Garcia, Fraunhofer IPA) - nadia.hammoudeh.garcia@ipa.fraunhofer.de

This repository contains the HAROS framework plugin to automatically generate models according to the DSLs defined for RosModel.

HAROS is a framework for static code analysis, in this case our plugin uses the result of the analysis to find the communication interfaces of each ROS node and directly translate it into our model structure, which can be validated or used to compose it with other nodes forming a system,

This package also contains a set of ROS containers where you can easily do the analysis for different distros without the need to install locally the necessary software. These containers take as input argument the URL of the GitHub repository that contains the code.

As related work you can read the following paper: Bootstrapping MDE development from ROS manual code: Part 2—Model generation and leveraging models at runtime

HowTo Use the docker container to run the ros-model plugin for HAROS

Install docker https://docs.docker.com/install/linux/docker-ce/ubuntu/

Build the HAROS docker image, for your desired ROS distro version:

cd path-to-ros-model-extractors-repo
[sudo] docker build --tag=haros_ROSDISTRO -f ROSDISTRO/Dockerfile .

Call the ros-model extractor plugin, remember you have to also clone the repository to be analysed:

[sudo] docker run -it haros_ROSDISTRO:latest /haros_runner.sh *package_name* *node_name* *type* *path_to_resulted_model* *workspace_path* "*github_repositoryA -b branch*" "*github_repositoryB*"...

Where the type is the type of the analysis, now only the option "node" analysis is supported. Soon the option "launch" will be also available. The default configuration of our infrastructure expects the current path for the resulted model and the folder "/root/ws" for the workspace. The argument branch is optional.

[sudo] docker run -it haros_ROSDISTRO:latest /haros_runner.sh *package_name* *node_name* *type* . /root/ws "*github_repositoryA -b branch*" "*github_repositoryB*"...

Please check the available examples for the supported distros:

ToDo:

  • Extractor of interfaces types (msgs, srvs and actions)
  • Parser for launch files and analysis of the full system

About


Languages

Language:Python 70.9%Language:Shell 16.2%Language:Dockerfile 12.9%