SUGISAKAMASANORI

Journal of Advances in Artificial Life Robotics
Vol. 3(4); March (2023), pp. 209–213
ON LINE ISSN 2435-8061; ISSN-L 2435-8061
https://alife-robotics.org/jallr.html

Research Article

QoS Balancing Optimization in Aggregated Robot Processing
Architecture: Rate and Buffer
Abdul Jalil, Jun Kobayashi, Takeshi Saitoh
Kyushu Institute of Technology, 680-4 Kawazu, Iizuka-shi, Fukuoka, 820-8502, Japan

ARTICLE I N FO
Article History
Received 25 November 2022
Accepted 30 May 2023
Keywords
QoSOptimization
Aggregated robot processing
ROS 2ABSTRACTThis study developed an optimization algorithm to balance the Quality of Service (QoS) rates andbuffer size for robot data communication in the Aggregated Robot Processing (ARP) architecture.
Robot Operating System 2 (ROS 2) is robotic software that uses a set of QoS policies to control
the quality of data transmission in robotic networks, such as DEADLINE to determine the rates,
and DEPTH to determine the buffer size. An unbalanced DEADLINE and DEPTH configuration
in ROS 2 node communication can result in high packet latency and packet loss in RELIABLE
connections. This happens when the DEADLINE sets the rates at high frequencies, and theDEPTH sets the buffers with small sizes. The results of this study show that the optimization
algorithm developed in this study can determine the rate and buffer size through a balancing
configuration for better quality robot data transmission in ARP architecture, influence theimprovement of latency and reduce the packet loss.

© 2022 The Author. Published by Sugisaka Masanori at ALife Robotics Corporation Ltd.
This is an open access article distributed under the CC BY-NC 4.0 license(http://creativecommons.org/licenses/by-nc/4.0/).

subscriber [2]. ROS 2 has some QoS configurations totune the performance of robot data transfer in the network,
such as DEADLINE and DEPTH. DEADLINE is a QoS
policy to determine data transfer rates in the network, andthen DEPTH configures the buffer size used to store thedata sample in publish-subscribe communication.

1. Introduction
The data processing flow in robotic systems commonly
consists of sensing, planning, and actuation components[1]. In the network, each component of these dataprocessing flows can communicate like a node andmanage the quality of data communication using Qualityof Service (QoS) policies. The purpose of QoS is tomanage the data communication systems to reduce someproblems in the network, such as latency, packet loss, andjitter. However, suppose that QoS configures the data
traffic in the network with an unbalanced configuration.
In that case, the quality of data transmission will bereduced, resulting in high data transfer latency and packet
loss.

The study on analyzing the efficiency of QoS policies
configuration in ROS 2 node communication is aninteresting topic that some researchers have conducted.
They analyzed the latency of data transmission[2][3][4][5][6], throughput performance [2][4], packet
data loss in the network [4][5][6][7], and memory
consumption in the robot computer [2]. Another study
also analyzed when the QoS policy configured
DEADLINE with high rates and DEPTH with a small
buffer, and the results show that some packets were lostin the communication of the node [4][5][6][7]. Otherwise,
suppose that DEPTH sets the buffer with a large size, andDEADLINE sets the rates with low frequency. Memoryconsumption increases in that configuration [4][8], andaffects real-time data transfer between the publisher andthe subscriber.

In this study, we developed an optimization algorithm todetermine QoS rates and buffer size with balancing
configuration when ROS 2 is used to transmit robot datain the ARP architecture. ROS 2 is a robotic softwaredeveloped above DDS (Data Distribution Service), thenimplements QoS to tune the quality of the datatransmission system between the publisher and theCorresponding author’s E-mail: malla.abdul-jalil545@mail.kyutech.jp, jkoba@ics.kyutech.ac.jp, saitoh@ai.kyutech.ac.jp URL: www.kyutech.ac.jp.

209This paper contributes a study on improving robot datatransfer in the ARP architecture by balancing the QoS
DEADLINE and DEPTH configuration when the ROS 2
node communication implements the RELIABLE
connection and KEEP_LAST option to send the data
sample from publisher to subscriber. We analyze it
because strict reliability is not achieved if theRELIABLE connection uses the KEEP_LAST option in
the publish-subscribe communication [9].

actuation component. In this study, to determine theoptimal value of the DEADLINE, we divide themaximum data transmission rate by the number of topics
used in the ARP architecture.
𝑅𝑅 =𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅

𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅− 𝑅𝑅 ≥ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅(1)𝑇𝑇Where 𝑅𝑅 is the rate, 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 is the maximum rate fortransferring the data in a topic, and 𝑇𝑇 is the number oftopics used in ARP. Based on the formula shown in Eq.
(1), we divide 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 by 𝑇𝑇 to balance the datatransmission rates with all topics in the nodecommunication. So, according to our idea shown in Eq.
(1), determine the first constraint with the following
equation:

The chapter in this paper consists of four parts. In thesecond chapter, we elaborate on the proposed
optimization algorithm used in this study to balance theDEADLINE and DEPTH QoS configuration. In the thirdchapter, we show the results of this study and ourconclusions in the fourth chapter.
2. Methods

𝑇𝑇In the ARP, the robot computer function runs the sensing
and actuation component, and the CEDDP runs theplanning component. In the sensing component, the robot
will manage the sensor hardware, read the sensor output,
and send the sensor data to the planning component
through a wireless network. Furthermore, in the planningcomponent, the CEDDP processes the sensor data to
determine the robot's localization and path planning.
After that, the actuation component controls the robot'sactuator moving according to the localization result sentfrom the planning component through a wireless network.
Fig.1 shows the architecture of the ARP proposed in ourstudy.

(2)

According to the constraint shown in Eq. (2), the variable
𝑅𝑅 should be larger than or equal to the minimum rate ofdata transmission 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 to ensure that the nodes of eachcomponent can communicate in the ARP architecture.
For the next constraint, find the optimal DEPTH value todetermine the buffer size and balance it with theDEADLINE tune. In this constraint, if the DEADLINE
tunes the rates with high frequency and close to themaximum rate, the DEPTH will also tune the buffer to alarge size and close to the maximum buffer size.
Otherwise, if the DEADLINE tunes the rates with lowfrequency, the buffer size configured in the DEPTH will
also be small and close to the minimum buffer size.
Furthermore, formulate the second constraint to balance
the DEPTH and DEADLINE tune with the Eq. (3):𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝑅𝑅

𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅− 𝐷𝐷 ≥ 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷(3)Where 𝐷𝐷 is the buffer size, 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 is the maximum
buffer size when the KEEP_LAST option is chosen(5000 [8]), then 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 is the minimum buffer size. For
the following constraints, bound the variable 𝑅𝑅 between
the maximum and minimum rates and the variable 𝐷𝐷
between the maximum and minimum buffer sizes,
𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 ≤ 𝑅𝑅 ≤ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅
and𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 ≤ 𝐷𝐷 ≤ 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷,respectively. For the objective function, we used multiobjective optimization [11] to determine the maximum
value of DEADLINE and DEPTH. Finally, build our idea
to find the optimal value of DEADLINE 𝑅𝑅 and DEPTH
𝐷𝐷 with optimization:

Fig.1.ARP architecture [10].
According to the information in Fig.1, to determine theoptimal value of the DEADLINE and DEPTH, first, weneed to calculate the number of topics used tocommunicate the data sample between the sensing to theplanning component and from the planning to the210

𝑚𝑚𝑚𝑚𝑚𝑚 𝑅𝑅, 𝐷𝐷
𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅
𝑠𝑠. 𝑡𝑡.
− 𝑅𝑅 ≥ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑇𝑇

𝑅𝑅𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷− 𝐷𝐷 ≥ 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷
𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅
𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 ≤ 𝑅𝑅 ≤ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅
𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 ≤ 𝐷𝐷 ≤ 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷(4)

To implement the optimization, CVXPY was used in thisstudy to solve the problem. CVXPY is an open-source
Python-embedded modeling language used to solves theconvex optimization problem [12]. Furthermore, thefollowing is an algorithm developed to implement ouroptimization created in Eq. (4).

Fig.2. Tools and experimental setup in experiment.

Algorithm: Optimization algorithm
Require: 𝑻𝑻, 𝑹𝑹𝑹𝑹𝑹𝑹𝑹𝑹, 𝑹𝑹𝑹𝑹𝑹𝑹𝑹𝑹, 𝑫𝑫𝑫𝑫𝑫𝑫𝑫𝑫, 𝑫𝑫𝑫𝑫𝑫𝑫𝑫𝑫
Variable: 𝑹𝑹, 𝑫𝑫
Constraints:
𝑹𝑹𝑹𝑹𝑹𝑹𝑹𝑹[− 𝑹𝑹 ≥ 𝑹𝑹𝑹𝑹𝑹𝑹𝑹𝑹,𝑻𝑻

𝑹𝑹

𝑫𝑫𝑫𝑫𝑫𝑫𝑫𝑫− 𝑫𝑫 ≥ 𝑫𝑫𝑫𝑫𝑫𝑫𝑫𝑫,𝑹𝑹𝑹𝑹𝑹𝑹𝑹𝑹
𝑹𝑹𝑹𝑹𝑹𝑹𝑹𝑹 ≤ 𝑹𝑹 ≤ 𝑹𝑹𝑹𝑹𝑹𝑹𝑹𝑹,𝑫𝑫𝑫𝑫𝑫𝑫𝑫𝑫 ≤ 𝑫𝑫 ≤ 𝑫𝑫𝑫𝑫𝑫𝑫𝑫𝑫]
Objective_Function: 𝒎𝒎𝒎𝒎𝒎𝒎 𝑹𝑹, 𝑫𝑫
Problem: (Objective_Function, Constraints)
Problem.solve()3.

Fig.3. The illustration in experiment.
Table 1. QoS settings in experiment.
RELIABILITY RELIABLEHISTORYKEEP_LAST
DEPTH
1, 5000, Optimization (D)DEADLINE
100 Hz, 200 Hz, 500 Hz, 1000 Hz,Optimization (R)
DURABILITY VOLATILELIVELINESSAUTOMATIC

Results and Discussion

To perform the experiment, for the robot computer, weused a Raspberry Pi 4 with an ARM Cortex-A72
processor @ 1.5GHz and 8GB of memory. Then thelaptop computer for CEDDP with an Intel Core i5
processor @ 2.60GHz and memory 12GB. We used anaccess point that has a frequency of 2.4 GHz tocommunicate the robot computer with CEDDP.
Furthermore, the software installed on the robot
computer and CEDDP are as follows: Linux Ubuntu
20.04 for the OS, ROS 2 Foxy Fitzroy, and Fast-RTPS
DDS. Fig.2 shows the experimental setup and tools usedin our experiment.

Table 2. The optimization results.
1st Exp 2nd Exp
1212𝑇𝑇
100 Hz200 Hz𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅
1 Hz
1 Hz
𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅
5000
5000
𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷
11
𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷
7 Hz
15 Hz
Opt (𝑹𝑹)
Opt (𝑫𝑫)
365
390

3rd Exp
12500 Hz
1 Hz
5000
140 Hz405

4th Exp
121000 Hz
1 Hz
5000
182 Hz410

According to the experimental illustration presented inFig.3 and the optimization result shown in Table 2, 𝑇𝑇 =12 is the number of topics used to communicate the data
sample in the experiment. Next, the 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 value = 100
Hz, 200 Hz, 500 Hz, and 1000 Hz are the maximum rates
when a topic is used to send the data sample in ARParchitecture. Then the 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 value = 1 Hz is theminimum data transmission rate determined in theexperiment, the 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 value = 5000 is the maximum
buffer size, and the 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 value = 1 is the minimumbuffer size. Furthermore, Opt (𝑅𝑅) and Opt (𝐷𝐷) are theresults of the optimization output to determine the rates
and buffer size with balancing configuration.

Furthermore, Table 1 shows the QoS configuration used
to perform the experiment in our study. According to that
QoS configuration, we conducted the experiment tocommunicate the robot data between the sensing,planning, and actuation components according to theillustration experiment presented in Fig.3 and theoptimization results are shown in Table 2. In this study,
we analyze the effectively of QoS balancing optimization
when the nodes in the sensing, planning, and actuation
components transmit the data sample with a size of 10bytes, 100 bytes, and 1000 bytes, respectively.

211

In this research, we evaluate the effectiveness ofoptimization by measuring latency and calculating packet
loss in data communication between the sensing,planning, and actuation components. To analyze thelatency, we calculated the time elapsed when the receiver
node in the actuation component received the data sample
sent from the sender node through the planningcomponent. In Fig.4, we show the latency results of thisexperiment.

Fig.5. The results of the packet loss in experiment.
According to the analysis results presented in Fig.5, theunbalanced configuration of DEADLINE and DEPTH todetermine the rates and buffer size affects the packet loss
in node communication. It happens because the buffer
size cannot accommodate storing the data transferred
between components if the data transmission rates are toohigh. Furthermore, if the DEPTH sets the buffer with alarge size and balances with the rates, no packet data arelost in the node communication. According to theexperimental results shown in Fig.4 and Fig.5, it can beconcluded that the balancing QoS configuration
effectively improves the data communication systems in
the ARP network.

Fig.4. The results of the latency in experiment.
According to the latency results shown in Fig.4, it can beseen that the configuration of the DEADLINE andDEPTH with a balancing tune can improve the latency ofpacket transmission in ARP network. Furthermore, weshow the packet loss results of the experiment in Fig.5.

4.

ConclusionIn this study, an optimization algorithm has beendeveloped to balance QoS configurations between rates
and buffer size. Our idea in this QoS balancing
optimization is to balance the DEADLINE and DEPTHQoS configuration when ROS 2 uses the RELIABLE
connection and KEEP_LAST option to transmit the robot212

data in ARP architecture. The results of this study showthat the QoS balance configuration effectively improves
latency and reduces packet loss in the ARP architecture.
As a result of this study, we hope to implement this QoSbalancing optimization method in the next work toimprove the communication and cooperation between
multi-robots in the ARP architecture to enhance multirobot data transmission.

International Conference on Control, Automation andSystems (ICCAS), IEEE, pp. 1105-1109, 2020.
DOI: 10.23919/ICCAS50221.2020.9268225.
11. N. Gunantara, “A review of multi-objective
optimization: Methods and its applications”, Cogent
Engineering, Vol. 5, Num. 1, pp. 1-16, 2018. DOI:
10.1080/23311916.2018.1502242.
12. S. Diamond and S. Boyd, “CVXPY: A PythonEmbedded Modeling Language for Convex
Optimization”. Journal of Machine Learning
Research, Vol. 17, Num 83, pp. 1-5, 2016.

References

Authors Introduction

1.

J. Staschulat, I. Lütkebohle, and R. Lange, “The rclc
Executor: Domain-specific deterministic schedulingmechanisms
forROS
applications
onmicrocontrollers: work-in-progress”, International
Conference on Embedded Software, EMSOFT, IEEE,
2020.
DOI: 10.1109/EMSOFT51651.2020.9244014.
2. Y. Maruyama, S. Kato, and T. Azumi, “Exploring thePerformance of ROS2”, International Conference onEmbedded Software, EMSOFT, IEEE, 2016.
DOI: 10.1145/2968478.2968502.
3. T. Kronauer, J. Pohlmann, M. Matthé, T. Smejkal,
and G.~Fettweis, “Latency Analysis of ROS2 MultiNode Systems”, International Conference on
Multisensor Fusion and Integration for Intelligent
Systems (MFI), IEEE, 2021.
DOI: 10.1109/MFI52462.2021.9591166.
4. J. Fernandez, B. Allen, P. Thulasiraman, and B.
Bingham, “Performance Study of the Robot
Operating System 2 with QoS and Cyber Security
Settings”, International Systems Conference(SysCon), IEEE, 2020.
DOI: 10.1109/SysCon47679.2020.9275872.
5. P. Thulasiraman, Z. Chen, B. Allen, and B. Bingham,“Evaluation of the Robot Operating System 2 inLossy Unmanned Networks”, International Systems
Conference (SysCon), IEEE, 2020.
DOI: 10.1109/SysCon47679.2020.9275849.
6. Z. Chen, “Performance Analysis of ROS 2 Networks
Using Variable Quality of Service and Security
Constraints for Autonomous Systems”, Naval
Postgraduate School, 2019.
7. J. Park, R. Delgado and B.W. Choi, “Real-Time
Characteristics of ROS 2.0 in Multiagent Robot
Systems: An Empirical Study”, IEEE Access, vol. 8,
pp. 154637-154651, 2020.
DOI: 10.1109/ACCESS.2020.3018122.
8. eProsima, “Fast DDS Documentation”, Release 2.8.1,
December 2022.
9. https://community.rti.com/static/documentation/con
nextdds/5.2.0/doc/manuals/connext_dds/html_files/RTI_
ConnextDDS_CoreLibraries_UsersManual/Content/
UsersManual/HISTORY_QosPolicy.htm.
10. A. Jalil and J. Kobayashi, “Experimental Analyses ofan Efficient Aggregated Robot Processing with
Cache-Control for Multi-Robot System”, 20thMr. Abdul Jalil

He received Master’s and Bachelor’s
degree from the Department ofComputerSystems,
STMIK
Handayani Makassar, Indonesia in2015
and2012,
respectively.
Currently, he is a Doctoral student at
Department of Computer Science andSystemsEngineering,Kyushu
Institute of Technology, Japan.
Dr. Jun Kobayashi

He is an Associate Professor at
Department of Intelligent and ControlSystems,Kyushu
InstituteofTechnology. He obtained his PhD
degree at Kyushu Institute ofTechnology in 1999. Currently, his
maininterests
areRobotics,Physiological Computing, and Cybernetic Training.
Prof. Takeshi Saitoh

He is Professor of Department of

Artificial
Intelligence,
KyushuInstitute of Technology. He received
B.Eng., M.Eng., and D.Eng. degrees
from Toyohashi University ofTechnology, Japan. His research field
includes image processing and patternrecognition.

213