The Robotic science has been useful in our lives on many ways. Despite its huge potential, the installed industrial robotic applications are not following the fast development of the academic researches. The prototypes, the platforms and the capabilities of the best practices in robotics belong to specific users and this fact increases the cost and decreases the agility of these systems. So, there is a need of automatic software generation for robotic purposes to deliver robotic solutions to more audience. The Model-Driven Engineering promises an automatic software generation as well as the validation of the software, based on models a user creates. Models are mainly expressed in Domain Specific Languages. These languages are constructed to help domain experts to express easier, to validate their models and to make the development process easier and faster. Model-Driven Engineering techniques could reduce the cost and the time of the robotic software development process, making the robotic solutions suitable and agile. ROS 2 is a popular robotic middleware, used to raise the abstraction layers of a robotic software. It is independent of the hardware and it is used worldwide, mainly for academic purposes. Its complexity and the experience it requires from the user is the main reason it is not utilized as it could be in the industry. This work, in the one hand, studies the capabilities of ROS 2 and in the other hand, studies the capabilities the Model-Driven Engineering and their integration. It is a study on how could ROS 2 extend to a Model-Driven Software Development framework. In this work Generos, a ROS 2 system generation software, is introduced. Generos comes with GRS, a Domain Specific Language, used to express models of ROS 2 systems. Generos is able to provide structured ROS 2 system, requiring only robotic skills from its user. It makes the development process faster, easier and safer as it simplifies the process and it validates the models.
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
Automatic ROS2 systems generation via model-driven engineering (MDE) software techniques
1. Supervisors:
Panagiotou Konstantinos
Tsardoulias Emmanouil
Simeonidis Andreas
Automatic ROS2 systems
generation via model-driven
engineering (MDE) software
techniques
Brouzos Rafail A.E.M. 7945
Intelligent Systems and Software Engineering Labgroup (ISSEL)
Electrical & Computer Engineering Department,
Aristotle University of Thessaloniki, Greece
Thessaloniki, 22/10/2020
2. Contents
About the work
Concept
01
ROS 2, MDE, Tools
Theory
02
Services, Use Case, Structure of the Software
Methodology
03
Difficulties, Conclusions, Future Work, Find and Use Generos
Conclusion
05
Example of using Generos
Example
04
3. Brouzos Rafail
Concept: Generos
Imagine you would like to make a
simple obstacle avoidance Robotic
project….
Your system:
• 1 CPU
• 2 Sonars
• 2 Motors
Create ROS 2 systems:
• Without non-robotic code
• Without non-robotic skills
• Guaranteed
• Faster
• Easier
Your middleware:
• ROS 2
3
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
4. Brouzos Rafail
Concept: Obstacle Avoidance with 2 sonars
Create Model:
• 1 file
• 80 lines of code
• DSL code
Add functionality:
• 3 file
• 70 lines of code
• Python code
• Pure robotic code
Create ROS 2 system:
• 2 ROS 2 Packages
• 11 files
• 400 lines of code
• C++, Python, CMake,
XML
• Only 70 lines of robotic
code
Without Generos With Generos
4
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
6. Brouzos Rafail
Model – Driven Engineering
• More Abstraction layers
• Validation
• Domain Specific tools
• Easier implementing
• Cheaper implementing
Provides
• Replaces programming with modeling
• Replaces General Purpose tool with
Domain Specific tools
It does
• There isn’t time/funds to build concepts
• A domain is not that important/specific
Not when
• Domain specialists speak in their
languages
• Models keep more information than
programs
• Models are smaller and more readable
Because
MDE
6
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
7. Brouzos Rafail
DSL (Domain Specific Language)
A language made to build models
Metamodel
The rules and the
constraints of a domain in
general
Model
A specific instance of the
metamodel
MDE TERMS
M2M (Model to Model)
A transformation from a model to
another model
M2T (Model to Text)
A transformation from a model to code
7
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
8. Brouzos Rafail
Tools
Used to build the GRS DSL
TextX
Jinja2
Pyecore
Used to generate code
from Templates
Used to validate and to
build models
8
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
9. Brouzos Rafail
More Tools
• Eclipse (Eclipse Modeling Framework)
Used to make the ecore metamodel
• Pyecoregen
Used to generate python module of the metamodel (with ecore as input)
• Weasyprint
Used to export Documentation as PDF
• Matplotlib
Used for plotting the Communication Graph
• NetworkX
Used for building the Communication Graph
9
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
10. Brouzos Rafail
G E N E R O S
P R O V I D E S
• ROS 2 systems with unlimited packages at
once
• Easy QoS profile configuration
• Convenience on coding with a powerful easy-
to-learn DSL
• Instructions into the generated packages to
make the functionality additions a piece of cake
• High quality code and comments into the
packages
• High quality documentation into the packages
10
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
11. Brouzos Rafail
G E N E R O S
P R O V I D E S
• Communication Graph in every system
• Automatic Dependency Resolution
• Automatic Import Resolution
• Supports ROS 2 packages
• Generates and documents Custom Messages,
Services, Actions with zero effort
• Easy installation and run
And!
Complex ROS 2 Systems without getting
involved with ROS 2 things
11
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
15. Brouzos Rafail 15
G R S F I L E S
DSL for building models
• Based on YAML and JSON
• Serialization language for building models of ROS
2 systems
• A ROS 2 system as a set of objects
• Objects consist of components
• Comments start with //
• Objects are referenced from their name
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
16. Brouzos Rafail
E x a m p l e
O b s t a c l e A v o i d a n c e
Robot:
• 2 sonars
• 2 motors
• 1 cpu
Avoid Obstacles:
• Obtain sonar ranges
• Calculate Velocities
Nodes:
• 2 Sonars
• 1 Publisher (each sonar)
• 1 CPU
• 2 Subscribers
• 1 Publisher
Packages:
• “interfaces” : Message for ranges
• “obstacle_avoidance”: Node implementation
16
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
17. Brouzos Rafail
E x a m p l e
O b s t a c l e A v o i d a n c e
Generos Receives:
• GRS model of 80 lines
Generos Provides:
• 2 ROS 2 packages
• 15 code files (C++, Cmake, Python, XML, HTML)
• 2 PDF files (Printable package documentation)
• 1 PNG file (System Communication Graph)
User needs to:
• Write the GRS model
• Run Generos
• Add functionality into the callbacks of the generated nodes
(approximately 70 lines of Python robotic code)
• Build the ROS 2 system
• Run the executables
17
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
18. Brouzos Rafail
E x a m p l e
O b s t a c l e A v o i d a n c e
80 Lines of
GRS code
Generos
Total:
1870 Lines of code
18 files
18
19. Brouzos Rafail
E x a m p l e
O b s t a c l e A v o i d a n c e
Resolved:
• Imports
• Node Class
• Attributes
• Callbacks
• Main
TODO:
• Add functionality
inside callbacks
(following the
instructions)
cpu_node.py:
19
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
20. Brouzos Rafail
E x a m p l e
O b s t a c l e A v o i d a n c e
Package Documentation:
HTML / PDF: PNG:
System Documentation:
20
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
21. Brouzos Rafail
Difficulties
Eclipse
A complex
configuration, for a
complex tool
Plenty of tools
Learning, Trying,
Integrating
ROS 2
Unpredictable crashes
MDE
Limited Bibliography
21
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
22. Brouzos Rafail
Conclusions
22
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
Lower Cost
Robotic Software
Development could
require less funds
ROS 2 in Industry
ROS 2 and Robotics, combined with
MDE, could give more efficient solutions
in more applications and industry
MDE
More accessible
Robotic Software
Development could
require less skills
Faster
Robotic Software
Development could
require less time
23. Brouzos Rafail
Future Work
Support importing old projects
Generate ROS 2 Libraries
Imports
Add deployment into the model
Deployment
QoS configuration validations
Communication topology validations
Hardware validation
More Validation
Guide the user
Add functionality into the model
User Interface
Make Generos Cross-Platform
Send Generos to the Cloud
Operating System
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
23
24. Brouzos Rafail
I n s t a l l G e n e r o s
Install from Github
• Open a terminal in the installation
directory and run:
• Install ROS 2
• You are done!
24
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
25. Brouzos Rafail
R u n G e n e r o s
Run from bash script
Open a terminal in the working directory and run:
• "path-to-generos-installation": path to the installation directory of generos
• "path-to-GRS/model.grs“: path to the GRS file
• "path-to-output“: path to save the generated system
You are done! Your system is generated in:
path-to-output/workspace
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
25
26. Brouzos Rafail
F i n d G e n e r o s
Visit:
https://github.com/bronzeRaf/generos
• Instructions
• Explanation
• Examples
• Learn GRS
• All the repository is visible
26
Automatic ROS2 systems generation via model-driven
engineering (MDE) software techniques
27. Thank You
Questions? And to:
Eleftheria Eirini Kofidou
Apostolos Brouzos
Thanos Brouzos
Sylvana Michailidou
For their patience…
Special Thanks to:
Konstantinos Panayiotou
Emmanouil Tsardoulias
For their advice…