Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
name: RosTooling CI

on: [push,pull_request]
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: RosTooling
- name: Install jdk 19
run: sudo apt install -y openjdk-19-jre
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '19'
- name: Debug
run: |
uname -a
mvn --version
java --version
- name: Build and test with Maven
run: |
pushd RosTooling
mvn clean verify -f plugins/de.fraunhofer.ipa.ros.parent/pom.xml
- name: Checkout
uses: actions/checkout@v2
with:
path: RosTooling
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
cache: "maven"
- name: Debug
run: |
uname -a
mvn --version
java --version
- name: Build and test with Maven
run: |
pushd RosTooling
mvn clean verify -f plugins/de.fraunhofer.ipa.ros.parent/pom.xml
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

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 and their corresponding Xtext-based DSLs (Domain Specific Language) implementation.
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 and their corresponding Xtext-based DSLs (Domain Specific Language) implementation.
The resulted models allow the description of ROS and ROS2 concepts and properties, like packages, artifacts, nodes, interfaces types, parameters... Moreover a complete system as composition of ROS components can be also modelled.

The models have associated tools, the following are some examples:
Expand Down Expand Up @@ -58,7 +58,7 @@ Publications:
- Combine components to form a ROS System
- [Create manually a new RosSystem description](docu/RosSystemModelDescription.md)
- [Visualize a system using PlantUML](docu/PlantUML.md)

- Examples:
- [Simple publisher-subscriber](docu/Example_PubSub.md)
- [Turtlesim](docu/Example_Turtlesim.md)
Expand Down
10 changes: 5 additions & 5 deletions docu/Example_PubSub.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tutorial: How to create a simple Publisher-Subscriber example.

In this tutorial we just want to show how the models can be used to define ROS nodes.
In this tutorial we just want to show how the models can be used to define ROS nodes.
For this we will see how two simple nodes can be defined, one that acts as a publisher of a "Hello World!" message and another that receives it as a subscriber.

This tutorial is fictitious, it is not based on any existing ROS node. The ROS example is reflected in the models of the example [pub_sub_ros2](https://github.com/ipa-nhg/ros-model-examples/tree/main/pub_sub_ros2).
Expand All @@ -24,7 +24,7 @@ publisher_package:

```

Then we need the artifact, a runnable to execute the node. As every YAML format file we have to add identantion to the secon line. Then pressing the keys "Ctrl"+Space bar the menu will suggest us as an option the text "artifacts:". We select it and go to the next line.
Then we need the artifact, a runnable to execute the node. As every YAML format file we have to add identantion to the secon line. Then pressing the keys "Ctrl"+Space bar the menu will suggest us as an option the text "artifacts:". We select it and go to the next line.

In the third line we must add a douple identation, we will create an object under artifacts. The next object will be a name for the artifact, for example "pub_artifact":

Expand All @@ -42,7 +42,7 @@ publisher:
pub_artifact:
node: pub_node
```
Now that we have the node, we can define the interfaces that offers this node as inputs and output to connect to it. In our case we want to create a publisher, which the type **String** .
Now that we have the node, we can define the interfaces that offers this node as inputs and output to connect to it. In our case we want to create a publisher, which the type **String** .

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

Expand Down Expand Up @@ -79,7 +79,7 @@ Now that we have already the components we can compose them. For that we have to

In [RosSystem description](RosSystemModelDescription.md) we explain the format of a system and the editor will support you to write the model properly.

The first that must be given is a name and then a ":" is required. In the next line you must add identation and you can press the keys "Ctrl" + Space bar for help.
The first that must be given is a name and then a ":" is required. In the next line you must add identation and you can press the keys "Ctrl" + Space bar for help.
Then we will define the nodes that compose the system. Here under "from" we will link our previously created nodes, the grammar for the references is **PackageName.NodeName**.

![alt text](images/pubsub_tutorial5.gif)
Expand Down Expand Up @@ -131,4 +131,4 @@ my_system:
-[ HelloWorldPublisher, HelloWorldSubscriber]
```

With this very basic example we hope you have understood how the models can be used and what kind of attributes they allow to represent.
With this very basic example we hope you have understood how the models can be used and what kind of attributes they allow to represent.
4 changes: 2 additions & 2 deletions docu/Example_Turtlesim.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Now that we have already the components we can compose them. For that we have to

In [RosSystem description](RosSystemModelDescription.md) we explain the format of a system and the editor will support you to write the model properly.

The first that must be given is a name and then a ":" is required. In the next line you must add identation and you can press the keys "Ctrl" + Space bar for help.
The first that must be given is a name and then a ":" is required. In the next line you must add identation and you can press the keys "Ctrl" + Space bar for help.
Firstly, we will add the 2 nodes that compose our system.

![alt text](images/turtlesim_tutorial1.gif)
Expand Down Expand Up @@ -123,7 +123,7 @@ source /opt/ros/ROSDISTRO/setup.bash
ros2 launch PATH_TO_LAUNCH_PY_FILE
```

Using the terminal of the keyboard node you can use the arrows to send new commands to the turtle.
Using the terminal of the keyboard node you can use the arrows to send new commands to the turtle.

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

Expand Down
2 changes: 1 addition & 1 deletion docu/NewCommunicationObjects.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ my_msgs:
msgs:
hello:
message
String data
String data
srvs:
hello
request
Expand Down
13 changes: 6 additions & 7 deletions docu/ParametersAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
The types of parameters supported by the ROS tooling are the following:

* Boolean (true or false)
* Integer
* Integer
* Double
* String
* Base64
* List
* List
* Array
* Struct

and their description is allowed at ROS and ROSSystem model level.
and their description is allowed at ROS and ROSSystem model level.

For the complete definition of parameters the user has to open the ROS model editor, where the language format is the following:
```
Expand All @@ -25,9 +25,9 @@ For example (for a .ros2 file):

```
test_parameters:
artifacts:
artifacts:
test_parameters:
node: params_example
node: params_example
parameters:
string_test:
type: String
Expand Down Expand Up @@ -78,8 +78,7 @@ test:
value: ["hello", "hola", "hallo"]
- test_st: "test_parameters::struct_test"
value: [
hello: 1
hello: 1
what: "test"]
```
The model definition of parameters is also consider for the autogeneration of launch files and the component interfaces. Complementarily, and because of the complexity of the format, the .ros, the .componentinterface and the .rossystem language validators contain rules to check that the value given to the parameter has the correct type and also help messages that together with the auto-complete function (Ctrl+Space) facilitate to the user the creation of parameters.

46 changes: 23 additions & 23 deletions docu/RosModelDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ my_awesome_pkg: #Name of the package
**artifacts:**
awesome: # Name of the artifact (as it is named in the CMakeLists)
**node:** awesome_node # Name of the node
**publishers:** # (Optional) List of publishers
**publishers:** # (Optional) List of publishers
awesome_pub:
**type:** "std_msgs/msg/Bool"
**subscribers:** # (Optional) List of subscribers
**subscribers:** # (Optional) List of subscribers
awesome_sub:
**type:** "std_msgs/msg/Bool"
**serviceclients:** # (Optional) List of service clients
**serviceclients:** # (Optional) List of service clients
awesome_client:
**type:** "std_srvs/srv/Empty"
**serviceservers:** # (Optional) List of service servers
**serviceservers:** # (Optional) List of service servers
awesome_server:
**type:** "std_srvs/srv/Empty"
**actionclients:** # (Optional) List of action clients
**actionclients:** # (Optional) List of action clients
awesome_action:
**type:** "control_msgs/action/JointTrajectory"
**actionservers:** # (Optional) List of action servers
**actionservers:** # (Optional) List of action servers
awesome_action:
**type:** "control_msgs/action/JointTrajectory"
**parameters:** # (Optional) List of parameters
Expand All @@ -39,7 +39,7 @@ my_awesome_pkg: #Name of the package
```


The format is based the YAML file format. All the words marked in the template with '**' are keywords that compose the model, they can't be modified.
The format is based the YAML file format. All the words marked in the template with '**' are keywords that compose the model, they can't be modified.


See the following model exmaple for the known teleop ROS package:
Expand All @@ -54,7 +54,7 @@ teleop:
type: "geometry_msgs/msg/Twist"
subscribers:
joy:
type:"sensor_msgs/msg/Joy"
type:"sensor_msgs/msg/Joy"
```

## ROS 2
Expand All @@ -69,67 +69,67 @@ my_awesome_pkg:
**publishers:**
awesome_pub:
**type:** "std_msgs/msg/Bool"
**qos:**
**qos:**
**depth:** 10
**durability:** volatile
**history:** keep_all
**profile:** default_qos
**reliability:** best_effort
**reliability:** best_effort
**subscribers:**
awesome_sub:
**type:** "std_msgs/msg/Bool"
**qos:**
**qos:**
**depth:** 10
**durability:** transient_local
**history:** keep_last
**profile:** sensor_qos
**reliability:** reliable
**reliability:** reliable
**serviceclients:**
awesome_client:
**type:** "std_srvs/srv/Empty"
**qos:**
**qos:**
**depth:** 10
**durability:** volatile
**history:** keep_all
**profile:** services_qos
**reliability:** best_effort
**reliability:** best_effort
**serviceservers:**
awesome_server:
**type:** "std_srvs/srv/Empty"
**qos:**
**qos:**
**depth:** 10
**durability:** volatile
**history:** keep_all
**profile:** services_qos
**reliability:** best_effort
**reliability:** best_effort
**actionclients:**
awesome_action:
**type:** "control_msgs/action/JointTrajectory"
**qos:**
**qos:**
**depth:** 10
**durability:** volatile
**history:** keep_all
**profile:** default_qos
**reliability:** best_effort
**reliability:** best_effort
**actionservers:**
awesome_action:
**type:** "control_msgs/action/JointTrajectory"
**qos:**
**qos:**
**depth:** 10
**durability:** volatile
**history:** keep_all
**profile:** default_qos
**reliability:** best_effort
**reliability:** best_effort
**parameters:**
awesome_param:
**type:** String
**default:** "Hello"
**qos:**
**qos:**
**depth:** 10
**durability:** volatile
**history:** keep_all
**profile:** parameter_qos
**reliability:** best_effort
**reliability:** best_effort
```

The only remarkable difference with the ROS 1 model is that the quality of service can be defined for all the different interfaces. The quality of service atrributes are optional and they allow the following options:
Expand All @@ -141,7 +141,7 @@ The only remarkable difference with the ROS 1 model is that the quality of servi
- reliability: best_effort / reliable

The type of supported parameters are:
- Boolean
- Boolean
- Double
- String
- Integer
Expand Down
2 changes: 1 addition & 1 deletion docu/RosSystemModelDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Below we analyze each part that makes up the system and how it is formed:
- from: reference to the instantiated node description. It is given by the name of the package that contains it and the name of the original node.
- interfaces: list of all the interfaces of the node. Here it is not mandatory to list of the interfaces (again) as they are already on the .ros2 file. Only the renamed interfaces must be added, as well as, interfaces that will form a connection with other components. A referenced interface is given by: **NewName: Type -> ref_artifact_name::ref_interface_name** where `ref_artifact_name` and `ref_artifact_name` come from the ros2 file. And the Type can be pub, sub, sc, ss, ac, or as.
- parameters: it is used to pass a value to a parameter. Every parameter shall have a name (my_param) in the example, and the reference to an existing parameter, given by 'artifact_name::param_name' frpm a .ros2 file. Then under value, a new value can be given to the parameter.

- (Optional) Connections: describe the connections between the nodes. They are given by `[name_of_the_output, name_of_the_input]` the outputs and inputs musst be previously created, they musst have the same communication pattern (topic, service or action) and the same type of communication object (for example std_msgs/String). Otherwise, the validator will give an error.

The Editor of the models contains validators and the auto-complete function, which can be called with the combination of the keys `Ctrl` and space bar.
2 changes: 1 addition & 1 deletion plugins/de.fraunhofer.ipa.ros.edit/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-19">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=19
org.eclipse.jdt.core.compiler.compliance=19
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=19
org.eclipse.jdt.core.compiler.source=21
2 changes: 1 addition & 1 deletion plugins/de.fraunhofer.ipa.ros.edit/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Bundle-ClassPath: .
Bundle-Activator: ros.provider.RosEditPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-19
Bundle-RequiredExecutionEnvironment: JavaSE-21
Export-Package: primitives.provider,
ros.provider
Require-Bundle: org.eclipse.core.runtime,
Expand Down
2 changes: 1 addition & 1 deletion plugins/de.fraunhofer.ipa.ros.editor/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-19"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=19
org.eclipse.jdt.core.compiler.compliance=19
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=19
org.eclipse.jdt.core.compiler.source=21
2 changes: 1 addition & 1 deletion plugins/de.fraunhofer.ipa.ros.editor/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Bundle-ClassPath: .
Bundle-Activator: ros.presentation.RosEditorPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-19
Bundle-RequiredExecutionEnvironment: JavaSE-21
Export-Package: primitives.presentation,
ros.presentation
Require-Bundle: org.eclipse.core.runtime,
Expand Down
Loading