Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0361a85
Completed the DSL implementation for the new model for RosSystem usin…
Jan 26, 2023
e0d1304
Fix auto-complete issues
Jan 27, 2023
7d09541
create a basic dsl model; base for the rossystem DSL
Feb 3, 2023
8fa291c
update ros.xtext bundles
ipa-rwu Mar 17, 2023
db555e6
config rossystem metamodel package to xtext project
ipa-rwu Mar 17, 2023
b09da2b
upgrade dependencies version
ipa-rwu Mar 17, 2023
8645603
regenerate with xtext 2.30
ipa-rwu Mar 17, 2023
e139c7f
prevent a circular import: move TopicSpecRef and ArrayTopicSpecRef to…
ipa-rwu Mar 17, 2023
a2bb0a7
regenerate model code of ros.ecore
ipa-rwu Mar 17, 2023
5f8ea6e
fix .ros yaml for defining messgae
ipa-rwu Mar 17, 2023
c0d3c45
regenerate xtext after fix .ros yaml for defining messgae
ipa-rwu Mar 17, 2023
58b08b0
fix .ros2 yaml, enable define default value for parameter
ipa-rwu Mar 17, 2023
e0a082f
update primitives model code
ipa-rwu Mar 17, 2023
1f42cc7
regenerate .ros2 xtext code after fixing ros2 yaml
ipa-rwu Mar 17, 2023
cb48725
regeneate rossystem xtext code
ipa-rwu Mar 17, 2023
9b48264
regenerate .ros2 xtext code after fixing ros2 yaml
ipa-rwu Mar 17, 2023
190ea4d
add test example
ipa-rwu Mar 17, 2023
f3a7586
keep xtend-gen folder
ipa-rwu Mar 17, 2023
708b6f8
upgrade to JavaSE-11, tycho 2.7.4, xtext 2.30
ipa-rwu Mar 17, 2023
16767f2
add pre-commit
ipa-rwu Mar 17, 2023
5ea9bae
run pre-commit
ipa-rwu Mar 17, 2023
45f08b8
fix rossystem metamodel: uncaptilize fild name, add RosNodeRef
ipa-rwu Mar 17, 2023
4f1732d
fix rossystem ecore model by removing generated rossystem model core …
ipa-rwu Mar 17, 2023
3065d1f
update examples
ipa-rwu Mar 17, 2023
6efb50f
update rossystem syntax: add and use NodeRef in Process
ipa-rwu Mar 17, 2023
939511b
regenerate rossystem xtext code after update syntax
ipa-rwu Mar 17, 2023
4510d92
regenerate ros.editor, ros.tests, and ros.edit
ipa-rwu Mar 17, 2023
3e9baaa
regenerate rossystem.editor, rossystem.tests, and rossystem.edit
ipa-rwu Mar 17, 2023
44be2ca
convert projects to maven
ipa-rwu Mar 17, 2023
eeb24fc
remove no using extentions from rossystem metamodel
ipa-rwu Mar 18, 2023
331734b
remove ComponenetInterface, comment rossystem.model.combination, obse…
ipa-rwu Mar 18, 2023
1c1986b
regenerate ros1 xtext
ipa-rwu Mar 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ jobs:
run: |
pushd ros-model
mvn clean verify -f plugins/de.fraunhofer.ipa.ros.parent/pom.xml

5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
bin/
target
xtend-gen/
.metadata
.recommenders
*.xtendbin
xtend-gen/
**/**/xtend-gen/*
!**/**/xtend-gen/.gitkeep
*.pyc
plugin.xml_gen
.antlr-generator-3.2.0-patch.jar
Expand All @@ -20,4 +20,3 @@ dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar

19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.4.2
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs
args: [--whitespaces-count, '4']
16 changes: 8 additions & 8 deletions EclipseInstaller/.project
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>EclipseInstaller</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
<name>EclipseInstaller</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
14 changes: 7 additions & 7 deletions EclipseInstaller/ROSModel.setup
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
<content>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
&lt;section name=&quot;Workbench&quot;>
&lt;section name=&quot;org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart&quot;>
&lt;item value=&quot;true&quot; key=&quot;group_libraries&quot;/>
&lt;item value=&quot;false&quot; key=&quot;linkWithEditor&quot;/>
&lt;item value=&quot;2&quot; key=&quot;layout&quot;/>
&lt;item value=&quot;2&quot; key=&quot;rootMode&quot;/>
&lt;item value=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;packageExplorer configured=&amp;quot;true&amp;quot; group_libraries=&amp;quot;1&amp;quot; layout=&amp;quot;2&amp;quot; linkWithEditor=&amp;quot;0&amp;quot; rootMode=&amp;quot;2&amp;quot; sortWorkingSets=&amp;quot;false&amp;quot; workingSetName=&amp;quot;&amp;quot;&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;localWorkingSetManager&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;workingSet editPageId=&amp;quot;org.eclipse.jdt.internal.ui.OthersWorkingSet&amp;quot; factoryID=&amp;quot;org.eclipse.ui.internal.WorkingSetFactory&amp;quot; id=&amp;quot;1382792884467_1&amp;quot; label=&amp;quot;Other Projects&amp;quot; name=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;/localWorkingSetManager&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;activeWorkingSet workingSetName=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;allWorkingSets workingSetName=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;/packageExplorer&amp;gt;&quot; key=&quot;memento&quot;/>
&lt;/section>
&lt;section name=&quot;org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart&quot;>
&lt;item value=&quot;true&quot; key=&quot;group_libraries&quot;/>
&lt;item value=&quot;false&quot; key=&quot;linkWithEditor&quot;/>
&lt;item value=&quot;2&quot; key=&quot;layout&quot;/>
&lt;item value=&quot;2&quot; key=&quot;rootMode&quot;/>
&lt;item value=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;packageExplorer configured=&amp;quot;true&amp;quot; group_libraries=&amp;quot;1&amp;quot; layout=&amp;quot;2&amp;quot; linkWithEditor=&amp;quot;0&amp;quot; rootMode=&amp;quot;2&amp;quot; sortWorkingSets=&amp;quot;false&amp;quot; workingSetName=&amp;quot;&amp;quot;&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;localWorkingSetManager&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;workingSet editPageId=&amp;quot;org.eclipse.jdt.internal.ui.OthersWorkingSet&amp;quot; factoryID=&amp;quot;org.eclipse.ui.internal.WorkingSetFactory&amp;quot; id=&amp;quot;1382792884467_1&amp;quot; label=&amp;quot;Other Projects&amp;quot; name=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;/localWorkingSetManager&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;activeWorkingSet workingSetName=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;allWorkingSets workingSetName=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;/packageExplorer&amp;gt;&quot; key=&quot;memento&quot;/>
&lt;/section>
&lt;/section>

</content>
Expand Down
44 changes: 22 additions & 22 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
BSD 3-Clause License

Copyright (c) 2018, Nadia Hammoudeh Garcia
All rights reserved.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Fraunhofer IPA nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Fraunhofer IPA nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Ros Model

[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Build](https://travis-ci.org/ipa320/ros-model.svg?branch=master)](https://travis-ci.org/ipa320/ros-model)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Build](https://travis-ci.org/ipa320/ros-model.svg?branch=master)](https://travis-ci.org/ipa320/ros-model)

The main purpose of this effort is to combine the advantages of [ROS](http://wiki.ros.org/) and Model-Driven-Engineering techniques. This repository holds a family of metamodels defined as ecore models that together with its java and Xtext and Xtend grammar implementations facilitates the use of a set of tools and graphical plug-ins to create models from ROS code, compose and validate the composition of models, autogenerate deployment artifacts and check the use of standard specifications.
The main purpose of this effort is to combine the advantages of [ROS](http://wiki.ros.org/) and Model-Driven-Engineering techniques. This repository holds a family of metamodels defined as ecore models that together with its java and Xtext and Xtend grammar implementations facilitates the use of a set of tools and graphical plug-ins to create models from ROS code, compose and validate the composition of models, autogenerate deployment artifacts and check the use of standard specifications.

Technical Maintainer: [**ipa-nhg**](https://github.com/ipa-nhg/) (**Nadia Hammoudeh Garcia**, **Fraunhofer IPA**) - **nadia.hammoudeh.garcia@ipa.fraunhofer.de**

Expand Down
4 changes: 2 additions & 2 deletions docu/CompareSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Press the button of ROS model checker:

![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**).
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)

To use this feature you have to locate your model file in your eclipse workspace by importing the project that contains it.
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:

Expand Down
4 changes: 2 additions & 2 deletions docu/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ wget https://raw.githubusercontent.com/ipa320/ros-model/master/EclipseInstaller/

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

Select the the ROS Model project (under Github Projects -> <User>) and press next.
Select the the ROS Model project (under Github Projects -> <User>) and press next.

By default the ROS tooling installation will be saved under the folder *ros-model-master* in your home directory. To ensure that you have access to get the source code from GitHub, select the check box *Show all variable* and change the *Ros model Github repository* to the *HTTPs(read-write)* option, verify that the option *Github user ID* is set to "anonymous".
By default the ROS tooling installation will be saved under the folder *ros-model-master* in your home directory. To ensure that you have access to get the source code from GitHub, select the check box *Show all variable* and change the *Ros model Github repository* to the *HTTPs(read-write)* option, verify that the option *Github user ID* is set to "anonymous".

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

Expand Down
2 changes: 1 addition & 1 deletion docu/Introspection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Please be sure that the tool is installed and your workspace setup, see the [installation guide](../README.md) for further details.

The tools documented here were conceived as a simple way to obtain models of systems already developed during their execution. This series of scripts uses the popular ROS rosgraph library to obtain a list of the interfaces present in the system at runtime.
The tools documented here were conceived as a simple way to obtain models of systems already developed during their execution. This series of scripts uses the popular ROS rosgraph library to obtain a list of the interfaces present in the system at runtime.

You can install the tools directly on your workspace using the following command:

Expand Down
4 changes: 2 additions & 2 deletions docu/ModelCombine.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The idea if the first strategy is to sum components and interfaces into a single

```
RosSystem { Name 'cob4-25'
RosComponents (
RosComponents (
ComponentInterface { name '/base_laser_front/driver'},
ComponentInterface { name '/torso_cam3d_down/realsense2_camera'},
ComponentInterface { name '/arm_right/driver'},
Expand All @@ -45,4 +45,4 @@ If I combine this model with the runtime one I get as result a new system with o

Other use of this feature is the composition of system files got from the auto models extractors that we offer ([static analysis](https://github.com/ipa320/ros-model/blob/master/docu/NewRosModel.md) and [runtime introspection](https://github.com/ipa-led/ros_graph_parser)).

While the static analyzer of code extracts all the information for each node, the amount of extracted data is quite limited. Conversely, the runtime introspection can't find some static information of the nodes (like the ROS package that contains it and the dependencies) but this method is able to find almost all the interfaces running on the system. With the model combination and using the static analysis extraction as the first model to combine , you can make a good use of the benefits of both methods results.
While the static analyzer of code extracts all the information for each node, the amount of extracted data is quite limited. Conversely, the runtime introspection can't find some static information of the nodes (like the ROS package that contains it and the dependencies) but this method is able to find almost all the interfaces running on the system. With the model combination and using the static analysis extraction as the first model to combine , you can make a good use of the benefits of both methods results.
17 changes: 8 additions & 9 deletions docu/NewCommunicationObjects.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@ To modify the ROS models (.ros) manually the ROS tooling provides a customized e
This editor contains an autocomplete function (by pressing Ctrl+Space) and will report any error made by editing. The first step is define a PackageSet (that correspond to a metapackage for ROS, this definition is optional and its name can be kept empty). Then, the ROS package which contains the msgs have to be defined and within it the option "spec" have to be selected to write down the objects. In the practice that means that the initial *.ros file that describes ROS objects looks:

```
PackageSet { package { CatkinPackage ros_package_name {
spec {}
PackageSet { package { CatkinPackage ros_package_name {
spec {}
}}}
```

The grammar supports 3 types of communication objects TopicSpec (to describe ROS msgs), ServiceSpec (to describe ROS srvs) and ActionSpec (to describe ROS actions), and consequentially each of these 3 types support different specifications types:

- ROS msgs
- ROS msgs

**TopicSpec** SpecName { **message** { ElementType ElementName ... } }
**TopicSpec** SpecName { **message** { ElementType ElementName ... } }

​ -> Example ```TopicSpec Point{ message { float64 x float64 y float64 z }}```

- ROS srvs
- ROS srvs

**ServiceSpec** SpecName { **request** { ElementType ElementName ..} **response** { ElementType ElementName .. } }

​ -> Example ```ServiceSpec SetBool{ request { bool data } response { bool success string message } }```

- ROS actions
- ROS actions

**ActionSpec** SpecName { **goal** { ElementType ElementName .. } **result** { ElementType ElementName ..} **feedback** { ElementType ElementName .. }}

Expand Down Expand Up @@ -81,7 +81,7 @@ The following extract shows the ROS model description correspondent to the [nav_

```
PackageSet {
Package nav_msgs{ Specs {
Package nav_msgs{ Specs {
TopicSpec GetMapAction{ message { GetMapActionGoal action_goal GetMapActionResult action_result GetMapActionFeedback action_feedback }},
TopicSpec GetMapActionFeedback{ message { Header header "actionlib_msgs.GoalStatus" status GetMapFeedback feedback }},
TopicSpec GetMapActionGoal{ message { Header header "actionlib_msgs.GoalID" goal_id GetMapGoal goal }},
Expand All @@ -104,7 +104,7 @@ PackageSet {

```
PackageSet {
Package my_msgs { Specs {
Package my_msgs { Specs {
TopicSpec hello { message { String data }},
ServiceSpec hello { request { } response { String data }},
}}
Expand All @@ -113,4 +113,3 @@ PackageSet {
The reason is that when one of these objects have to be referenced during the definition of a node it will be imposible for the model to distinguish which is the correct one (both are defined as my_msgs.Hello and whitin the dame model file). For these cases we recommend to split the objects into two different model files.

The repository [RosCommonObjects](https://github.com/ipa320/RosCommonObjects) holds further examples.

1 change: 0 additions & 1 deletion docu/NewComponent.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ The next menu will ask you to give to your component a name and a namespace (opt
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)

6 changes: 3 additions & 3 deletions docu/NewProject.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ To create a new project you have to press the button "Add new Ros Project"

![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.
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)-->


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.
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)

Expand Down
Loading