**5. Conclusions**

In this chapter the *XBot*<sup>7</sup> RT software architecture was presented. It provides to the users a software infrastructure which can be used with any robotic systems enabling fast and seamless porting of the code from one robot to the other, requiring no code changes, assuring flexibility and reusability. The implementation of the framework ensures easy interoperability and built-in integration with other existing software tools for robotics, such as ROS, YARP or OROCOS. The component-based development of the *XBot* includes a Robotic Hardware Abstraction Layer (R-HAL) interface and a set of ready-to-use tools to control robots either within a simulation environment or the real hardware.

**Acknowledgements**

**Author details**

**15**

Tecnologia, Genova, Italy

Luca Muratore\*, Arturo Laurenzi and Nikos G. Tsagarakis

\*Address all correspondence to: luca.muratore@iit.it

provided the original work is properly cited.

Humanoids and Human Centered Mechatronics (HHCM), Istituto Italiano di

© 2021 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium,

This project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No. 101016007 CONCERT, and the European Union's Horizon 2020 Research and Innovation Programme (H2020-ICT-2019-2/ 2019-2023) under grant agreement No. 871237 SOPHIA and the Italian Fondo per la Crescita Sostenibile – Sportello "Fabbrica intelligente", PON I&C 2014 - 2020, project number F/190042/01-03/X44 RELAX.

*XBot: A Cross-Robot Software Framework for Real-Time Control*

*DOI: http://dx.doi.org/10.5772/intechopen.97066*

The framework has been successfully used an validated as a main software infrastructure (**Figure 5**) for humanoid robots such as WALK-MAN (result of WALK-MAN EU FP7 project<sup>8</sup> , notably *XBot* received the EU innovation radar award in this context<sup>9</sup> .) and COMAN+ (result of COGIMON EU H2020 project10) or for quadruped centaur-like robots as CENTAURO (result of the CENTAURO EU H2020 project11). Moreover the cross-robot functionality has been exploited to develop both RT and non-RT control modules not only for the above mentioned robots, but also for commercial robotic systems such as KUKA LBR, KUKA 4+ or Franka Emika Panda, or other humanoid robots like COMAN or iCub.

Regarding the simulation part, *XBot* enables the direct porting of the control modules tested in the simulator to the real hardware using the same interfaces and without requiring any code modifications. The built-in simulator supported in the framework is Gazebo, but there is the option to support other simulation environments (as it happened inside the CENTAURO H2020 project with the VEROSIM simulator12).

*XBot* currently relies on a dual-kernel approach using Xenomai, which performs better than PREEMPT\_RT13, both in terms of system predictability and absolute latencies. Nevertheless Xenomai in the long term can introduce disadvantages by making the software development more complex, which means harder maintainability and lower portability.

Further development of the framework will target to provide synchronized distributed execution of multiple RT threads in multiple computational units. In fact currently the *Plugin Handler* is only able to execute a set of plugins in sequence, without any concurrency. This makes the maintenance of the framework easier, but restricts the performance in terms of computation power. Moreover the current architecture is characterized by a unique point of failure since both the *R-HAL* thread and the *Plugin Handler* (which executes RT plugins) thread run in the same process. In fact, there is the possibility that a misbehaving RT plugin might cause memory corruption, or crash altogether, causing also the *R-HAL* to crash. Currently only expert users are allowed to load their RT plugins in the *Plugin Handler*, but it is desirable to eventually separate the *R-HAL* and *Plugin Handler* either in two different processes or in two different machines to improve isolation.

<sup>7</sup> https://github.com/ADVRHumanoids/XBotControl

<sup>8</sup> https://www.walk-man.eu/

<sup>9</sup> https://www.innoradar.eu/innovation/30632

<sup>10</sup> https://cogimon.eu/

<sup>11</sup> https://www.centauro-project.eu/

<sup>12</sup> https://www.verosim-solutions.com/en/

<sup>13</sup> PREEMPT\_RT was introduced to have RT capabilities in the Linux kernel avoiding the adoption of a dual-kernel.
