Skip to content

Commit

Permalink
[to be continued...] Working on up-to-date documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-nhg committed Oct 2, 2023
1 parent f32db99 commit c9fb502
Show file tree
Hide file tree
Showing 17 changed files with 75 additions and 81 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ros Model
# RosTooling

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![ros-model CI](https://github.com/ipa320/ros-model/actions/workflows/build.yml/badge.svg)](https://github.com/ipa320/ros-model/actions/workflows/build.yml)

Expand All @@ -11,25 +11,18 @@ The models have associated tools, the following are some examples:
- Code geneators to automatically generate code, documentation, helper scripts...
- (ToBeDone) Graphical editor


Technical Maintainer: [**ipa-nhg**](https://github.com/ipa-nhg/) (**Nadia Hammoudeh Garcia**, **Fraunhofer IPA**) - **[email protected]**

## Projects/Links related to this repository:

- Eclipse Tooling update site: Tbd

Related repositories:
- ROS2 embedded code generator: [rossdl](https://github.com/CoreSenseEU/rossdl)
- Python parsers (packed as a ROS package) for the ROS and ROSsystem models: [ros_model_parser](https://github.com/ipa320/ros_model_parser)
- Python implementation for the static code analyzers and docker containers setups for different ROS distros: [ros-model-extractors](https://github.com/ipa320/ros-model-extractors)
- Runtime monitoring pipelines:
- ROS1: [rosgraph_monitor](https://github.com/ipa320/rosgraph_monitor)
- ROS2: [ros2mode](https://github.com/ipa-cmh/ros2model/)

OLD:
- Language server for the RosModels (web-based models editor): [theia-ros-model](https://github.com/ipa-nhg/theia-ros-model)
- Web interface to automatically extract models from public source code: [model extractor](http://ros-model.seronet-project.de/)
- Source code for the web interface (extract models for non-public available ROS packages): [ros-model-cloud](https://github.com/ipa320/ros-model-cloud)
- Eclipse update site: [RosTooling-update-site](https://github.com/ipa320/RosTooling-update-site)

Publications:
- Paper: Bootstrapping MDE Development from ROS Manual Code - Part 1: Metamodeling [IRC19 paper](https://ieeexplore.ieee.org/document/8675668)
Expand All @@ -39,32 +32,40 @@ Publications:

---------------------------------------------------------

# ROS TOOLING MANUAL
# RosTooling Manual

## Installation

Tbd
- [As VS Code plugin](tbd)
- [Eclipse feature](docu/Installation.md#option-1-using-the-release-version-recommended)
- [(Only for tooling developers) From Source code in eclipse](docu/Installation.md#option-2-using-the-eclipse-installer---source-installation-ros-tooling-developers)
- VS Code plugin(tbd) - WIP [vscode-RosTooling](https://github.com/ipa320/vscode-RosTooling)

## Tutorials

- Create component models:

- (Prerequisite) [Add communication objects](docu/NewCommunicationObjects.md)
- [Create a ROS model from your source code(static code analyzer)](docu/NewRosModel.md)
- [Create a ROS model from a deployed robot using our introspection at runtime tool](docu/IntrospectionNode.md)
- [Create new ROS component description](docu/RosModelDescription.md)
- [Generation of code from models](docu/CodeGeneration.md)

- Combine components to form a ROS System

- [Create manually a new RosSystem description](docu/RosSystemModelDescription.md)
- [Create a ROS system model from your source code (static code analyzer)](docu/NewRosSystemModel.md)
- [System Model extraction using introspection at runtime](docu/IntrospectionSystem.md)

- Examples:
- [Simple publisher-subscriber](docu/Example_PubSub.md)
- [Turtlesim](docu/Example_Turtlesim.md)

- [Update Release versions (only for administrators)](docu/Release.md)

## Model examples

The repository [ros-model-examples](https://github.com/ipa-nhg/ros-model-examples) contains a set components and system examples.

---------------------------------------------------------
# OLD (out-of-date)

Links to related repositories:
- Language server for the RosModels (web-based models editor): [theia-ros-model](https://github.com/ipa-nhg/theia-ros-model)
- Web interface to automatically extract models from public source code: [model extractor](http://ros-model.seronet-project.de/)
- Source code for the web interface (extract models for non-public available ROS packages): [ros-model-cloud](https://github.com/ipa320/ros-model-cloud)
27 changes: 13 additions & 14 deletions docu/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,42 @@

### Option 1: Using the Release version (Recommended)

In Eclipse, go to *Help* > *Install New Software...*. To install the latest version of the ROS tooling, add the update site URL [http://ros-model.seronet-project.de/updatesite/latest/](http://ros-model.seronet-project.de/updatesite/latest/)(*) in the *Work with* section. If you wish to install an earlier version instead, go to the [the update site](http://ros-model.seronet-project.de/updatesite/), choose the desired version and copy its URL.
The first step is to install eclipse. Please download the installer from the official eclipse [website](https://www.eclipse.org/downloads/packages/installer). Once you start the installer, select the package "Eclipse Modeling Tools".

![alt text](images/install_updatesite.png)

If none package is listed, please uncheck the option *Group items by category*. The category *ROS Model* appears in the *Name* area. Check the box in front of *ROS model* and click *Next* to review the list of items to be installed. Click *Next* again to read and accept the terms of the license agreements and afterwards click *Finish*. Eclipse will then start to install the ROS tooling and its dependencies. If you get a security warning about the authenticity, click OK. Finally, when asked, restart Eclipse to complete the installation process.
![alt text](images/install_eclipse_modeling.png)

Press next, and then pick the java version 19 and the folder where you would like to install eclipse.

(*) Apart of the latest stable release of the tooling, some pre-releases for new feautures are available. See the following list of current pre-releases:
![alt text](images/install_eclipse_jdk_version.png)

| Name | Code version | Update Site Link | Description |
|---|---|---|---|
|TestComponentStack|https://github.com/ipa320/ros-model/tree/1.4.0_TestComponentStacks|http://ros-model.seronet-project.de/updatesite/TestComponentStacks/latest/| Added to the RosSystem metamodel the option to group components forming components stacks. This pre-release is backward compatible for the models, but the validators and generators are **not** updated. If Xtext report errors, please ignore them. |
| v1.5 | https://github.com/ipa320/ros-model/tree/1.5.0_pre-release |http://ros-model.seronet-project.de/updatesite/pre-release/latest/| Long term version of the grammar (simplified for the 1.4 release). **This version is not backwards compatible with 1.3 and earlier releases**|
Continue the installation, acepting the license, as usual.

Once the installation is completed, go to *Help* > *Install New Software...*. To install the latest version of the ROS tooling, add the update site URL [https://raw.githubusercontent.com/ipa320/RosTooling-update-site/main](https://raw.githubusercontent.com/ipa320/RosTooling-update-site/main)(*) in the *Work with* section.
![alt text](images/install_updatesite.png)

If none package is listed, please uncheck the option *Group items by category*. The category *ROS Model* appears in the *Name* area. Check the box in front of *ROS model* and click *Next* to review the list of items to be installed. Click *Next* again to read and accept the terms of the license agreements and afterwards click *Finish*. Eclipse will then start to install the ROS tooling and its dependencies. If you get a security warning about the authenticity, click OK. Finally, when asked, restart Eclipse to complete the installation process.

To start using the ROS tooling continue with the [step 1](#1-switch-to-the-ros-developer-perspective)

### Option 2: Using the Eclipse Installer - Source installation (ROS tooling developers)

First the java environment have to be setup, for eclipse it is recomended the installation of the version 8 (i.e. X=8) for Ubuntu 16.04 and 11 (i.e. X=11) for the 18.04 and 20.04:
First the java environment have to be setup:
```
sudo apt-get install openjdk-11-jre
sudo apt-get install openjdk-19-jre
```
Download the official [Eclipse Installer](https://www.eclipse.org/downloads/packages/installer) for your preferred operating system. Execute the installer and choose the advanced mode (menu on the right-up corner). Select the Product *Eclipse Modeling tools* package, for the version it is recommended *2021-12*.
Download the official [Eclipse Installer](https://www.eclipse.org/downloads/packages/installer) for your preferred operating system. Execute the installer and choose the advanced mode (menu on the right-up corner). Select the Product *Eclipse Modeling tools* package. And then pick the java version 19.

![alt text](images/eclipse_installer1.png)

Press *Next* and add a new *User project* pressing the green button *+*:
```
Catalog: Github Projects
Resource URIs: https://raw.githubusercontent.com/ipa320/ros-model/master/EclipseInstaller/ROSModel.setup
Resource URIs: https://raw.githubusercontent.com/ipa320/RosTooling/main/EclipseInstaller/ROSModel.setup
```
Sometimes eclipse is not able to find the file, for those cases we recommend to download the file to the local memory of the machine and import it:

```
wget https://raw.githubusercontent.com/ipa320/ros-model/master/EclipseInstaller/ROSModel.setup
wget https://raw.githubusercontent.com/ipa320/RosTooling/main/EclipseInstaller/ROSModel.setup
```

![alt text](images/eclipse_installer2.png)
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions docu/RosModelDescription.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## TBD
1 change: 1 addition & 0 deletions docu/RosSystemModelDescription.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## TBD
Binary file added docu/images/install_eclipse_jdk_version.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docu/images/install_eclipse_modeling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions docu/introspection.rosinstall

This file was deleted.

6 changes: 3 additions & 3 deletions docu/CompareSpec.md → docu/old/CompareSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ If you want to check that the model of your node is following a concrete specifi

Press the button of ROS model checker:

![alt text](images/compare_icon.png)
![alt text](../images/compare_icon.png)

Select as input your model file and as specification the model that defines the standard you want to follow (some specifications are available under **de.fraunhofer.ipa.ros.communication.objects/BasicSpecs**).

![alt text](images/compare_select.png)
![alt text](../images/compare_select.png)

To use this feature you have to locate your model file in your eclipse workspace by importing the project that contains it.

By pressing *Finish* a dialog will give you a summary of your analysis:

![alt text](images/compare_result.png)
![alt text](../images/compare_result.png)
4 changes: 2 additions & 2 deletions docu/ModelCombine.md → docu/old/ModelCombine.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ This feature allows the merge of two different ROS system models. To combine t



![CombineModels](images/CombineModels_1.png)
![CombineModels](../images/CombineModels_1.png)

A pop-up menu will ask you for the two models to combine (have to be on imported project of your workspace) and the path where to save the resulted file (that will be called *result.rossystem*. Finally the user can check the box "Combine to the minimal model (restrictive strategy)" to switch the strategy.

![CombineModels](images/CombineModels_2.png)
![CombineModels](../images/CombineModels_2.png)



Expand Down
4 changes: 2 additions & 2 deletions docu/NewComponent.md → docu/old/NewComponent.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Please be sure that the tool is installed and your workspace setup, see the [ins

To create a new component you have to press the button "Add new Component from Ros node"

![alt text](images/add_new_component.png)
![alt text](../images/add_new_component.png)

A dialog will be open and ask you to select a folder to contain your new model (we recommend the "components" one) and to give a name to your component.

The next menu will ask you to give to your component a name and a namespace (optional). The last information needed is the Ros node model related to your component to be references (.ros file).

Your component will be automatically created, in case you want to modify the default remaps of the interfaces you can edit the file using the EMF editor

![](images/modify_component.png)
![](../images/modify_component.png)
6 changes: 3 additions & 3 deletions docu/NewProject.md → docu/old/NewProject.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ Please be sure that the tool is installed and your workspace setup, see the [ins

To create a new project you have to press the button "Add new Ros Project"

![alt text](images/new_project.png)
![alt text](../images/new_project.png)

A pop-up dialog will ask you to define the name of the project. Once you press finish a new folder will be created with a collection of common messages and services and a predefined ROS model. To describe easily the model you can use a Sirius representation.
<!--Open the file representation.aird and in the menu representations choose the "Artifact diagram" option and press "New.." then choose the artifact entity of your "*.ros" model and press finish.
![](images/new_artifact_representation.png)-->
![](../images/new_artifact_representation.png)-->


A new window will be opened where you can choose and add elements by selecting them on the side toolbar. Using the properties view you can modify and describe the properties of each element.

![](images/node_representation.png)
![](../images/node_representation.png)

Once you finish you can open the file under the folder "rosnodes" that describes your model and check that all the information is correct. This editor has an autocomplete function (by pressing Ctrl+Space) and will report any error made by editing.
18 changes: 9 additions & 9 deletions docu/NewSystem.md → docu/old/NewSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ scan_system_demo

To create a new system you have to press the button "Add new Ros System"

![alt text](images/add_new_system.gif)
![alt text](../images/add_new_system.gif)

A dialog will be open and ask you to select a folder to contain your new model, you can just select the "scan_system_demo" folder. Give a name to your new system and press "Next > ", the new dialog window will ask you for a Ros Components, this step is not required, you can just press "Finish".

To modify easily the model you can use a Sirius representation. Open the file representation.aird with the Aird editor and in the menu representations choose the "RosSystem" option and press "New.." then choose the Ros System entity of your "*.rossystem" model and press finish.

![alt text](images/RosSystem_entity.gif)
![alt text](../images/RosSystem_entity.gif)

A new window will appear where you can choose and add elements by selecting them on the side toolbar and the properties view. With the toolbar you can add a new component. Press the option "New component", a window will be opened and ask for a new name for you component:

![alt text](images/add_new_component_name.gif)
![alt text](../images/add_new_component_name.gif)

Give a name and (optionally) a namespace to a new component, for example:

![alt text](images/new_component1.gif)
![alt text](../images/new_component1.gif)

Press the button "Browse.." and select the model "sick_s300.ros" of the rosnode folder. Repeat the previous process for the creation of other tree components:

Expand All @@ -48,7 +48,7 @@ RosModel: rosnodes/scan_unifier.ros

Now that the components are created you can define the desired connections between the components using the tool "Topic Connection", the only imposed rule to create connections is that the information object (message or service type) is the same on both sides. For our example the natural connection to be created are the shown on the following figure:

![alt text](images/rossystem_withconnections.png)
![alt text](../images/rossystem_withconnections.png)

If the modifications are correct and after save the changes, two files will be automatically generated 1) a componentinterface file of your full system in the folder "components" and 2) a launch file to start the selected ROS nodes in the correct predefined Namespace (in a new folder "src-gen").

Expand All @@ -75,7 +75,7 @@ The resulted launch file contains the defined namespaces and remap the topics of

We can also try removing the namespace of the diagnostics topics for the scanners. Choose the different diagnostics publisher and modify using the properties view its names to for example:

![alt text](images/diagnostics_names.gif)
![alt text](../images/diagnostics_names.gif)

These changes should change the roslaunch file to:

Expand Down Expand Up @@ -106,13 +106,13 @@ The next part of this tutorial shows the creation of a new System by the composi

To create a new system you have to press the button "Add new Ros System" and a dialog will be open and ask you to select a folder to contain your new model, you can just select the "scan_system_demo" folder. Give a name to your new system and press "Next > ", the new dialog window will ask you for a Ros Components press "Browse.." and select the componentinterface autogenerated by the previous example (i.e. scan_system_demo/components/scan_composition.componentinterface).

![alt text](images/composition_subsystem.gif)
![alt text](../images/composition_subsystem.gif)

To modify easily the model you can use a Sirius representation. Open the file representation.aird with the Aird editor and in the menu representations choose the "RosSystem" option and press "New.." then choose the Ros System entity of your "*.rossystem" model and press finish.

A new window will appear where you can choose and add elements by selecting them on the side toolbar and the properties view.

![alt text](images/diagnostics_system.gif)
![alt text](../images/diagnostics_system.gif)

The new system already contains the previous system model as a single block and can be composed by adding new components, for example you can create a new component with the following configuration:

Expand All @@ -123,7 +123,7 @@ RosModel: rosnodes/diagnostic_aggregator.ros
```
And join the diagnostics interfaces with a connection. The resulted launch file will include the previous generated launch file and the new imported node.

![alt text](images/diagnostics_system_complete.gif)
![alt text](../images/diagnostics_system_complete.gif)

```
<?xml version="1.0"?>
Expand Down
2 changes: 1 addition & 1 deletion docu/Parameters.md → docu/old/Parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ and their description is allowed at ROS and ROSSystem model level.

The definition of a parameter at ROS model level means that the ROS original node get or set a new parameter, this case is partially supported by the graphical editor, which allows only the definition of parameters of primitive types: String, Double, Integer and Boolean without a default value.

![alt text](images/parameter_set.gif)
![alt text](../images/parameter_set.gif)

For the complete definition of parameters the user has to open the ROS model editor, where the language format is the following:

Expand Down
Loading

0 comments on commit c9fb502

Please sign in to comment.