ent templates for two different languages, C++ and
Python. The Designer can define not only his own
template, but also the interface itself, with the related
tags and attributes the Developer should use in the
XML file.
With respect to the last objective, keep it simple, it
is achieved on the Developer side considering the lim-
ited information requested to trigger the code genera-
tion: the appropriate template, and the targeted node
interface. The Template Designer may have a more
complex job, for defining the appropriate template.
Nevertheless this has to be counterbalanced with the
saved time by reducing the effort needed for code
maintenance, refactoring etc., that is likely to happen
otherwise, even if the team has a code policy.
To finish, we consider the possibility to change
the generated code as a positive point. The generated
code is not using advanced meta model that may be
complex for the Developer to tweak if the situation
requires it. Our generated code can still be changed
by the Developer, even though this is not preferable.
5 CONCLUSIONS
We described a ROS package generator that generates
complete package and node code based on a given
template and a simple XML description of the desired
interface. This tool is not restricted to a unique pack-
age template, and Designers have the possibility to
implement new templates. The template creation is
relatively simple, and uses instructions automatically
adjusted to the template characteristics. Also we pro-
vide an update mechanism so that a Developer can
adjust or extend the proposed interface, without loos-
ing the node logic previously introduced.
Several extensions are envisioned to enhance the
capabilities of the package generator. One of them is
to enable the generation of other ROS components.
Currently only ROS nodes are created, which is en-
forced by the use of the special tag node in the XML
dictionary. By enabling other types of tags, we be-
lieve the code generator could easily be extended to
other structures, such as ROS controllers.
The code generator started with a simple but effi-
cient in-house templating language derived from the
interface parameters. We are strongly considering
more mature code generator tools, such as Jinja, that
would give access to more complex code generation
scheme in the package templates.
We are also considering migrating the generation
layer, currently at the level of the package, to a lower
layer, at node level, or more generally speaking at
component level. That would enable mixing different
templates in a given ROS package, like for example a
ROS node in C++, another one in Python . . .
It would be interesting porting the package gen-
erator to ROS2. The package code is almost pure
Python, using quite limited ROS functionality. Such
migration should be quite straightforward.
Finally, it would be an added value to provide re-
lated plugins for some code editors. This would help
the writing of the package configuration file, provid-
ing appropriate text completion to the Developer.
ACKNOWLEDGEMENTS
Supported by the Elkartek MALGUROB and the
ROSIN project under the European Union’s Horizon
2020 research & innovation programme, grant agree-
ment No. 732287. The authors would like to thank
Dr. Andrzej Wasowski for the helpful suggestions re-
garding the structure and contents of this article.
REFERENCES
Bezzo, N., Park, J., King, A., Gebhard, P., Ivanov, R., and
Lee, I. (2014). Demo abstract: ROSLab — A modular
programming environment for robotic applications. In
ACM/IEEE ICCPS, pages 214–214, Berlin, Germany.
Bischoff, R., Guhl, T., Prassler, E., Nowak, W., Kraet-
zschmar, G., Bruyninckx, H., Soetens, P., Haegele,
M., Pott, A., Breedveld, P., Broenink, J., Brugali, D.,
and Tomatis, N. (2010). BRICS - Best practice in
robotics. In ISR / ROBOTIK, pages 1–8.
Brugali, D. and Shakhimardanov, A. (2010). Component-
Based Robotic Engineering (Part II). IEEE Robotics
Automation Magazine, 17(1):100–112.
Bubeck, A., Weisshardt, F., and Verl, A. (2014). BRIDE - A
toolchain for framework-independent development of
industrial service robot applications. In ISR/Robotik,
pages 1–6, Munich, Germany.
Kumar, P. S., Emfinger, W., Karsai, G., Watkins, D., Gasser,
B., and Anilkumar, A. (2016). ROSMOD: A Toolsuite
for Modeling, Generating, Deploying, and Managing
Distributed Real-time Component-based Software us-
ing ROS. Electronics, 5(3).
Meng, W., Park, J., Sokolsky, O., Weirich, S., and Lee, I.
(2015). Verified ROS-Based Deployment of Platform-
Independent Control Systems. In NASA Formal Meth-
ods, volume 9058, pages 248–262.
Quigley, M., Conley, K., Gerkey, B., Faust, J., Foote, T.,
Leibs, J., Wheeler, R., and Ng, A. (2009). ROS: an
open-source Robot Operating System. In ICRA Work-
shop on Open Source Software.
ROS (2018). ROS2 overview - Managed Nodes. https://
index.ros.org/doc/ros2/Managed-Nodes/. Ac-
cessed: 2018-11-22.
ICINCO 2019 - 16th International Conference on Informatics in Control, Automation and Robotics
250