Skip to Content
You are currently on the new version of our website. Access the old version .
ProcessesProcesses
  • Feature Paper
  • Editor’s Choice
  • Article
  • Open Access

28 February 2026

21 Pages

A Docker-Enabled Real-Time Framework for Robotic Applications in Heterogeneous ROS 2 Environments

,
,
and
1
Department of Electronics Engineering, Myongji University, Yongin 17058, Republic of Korea
2
Department of Electrical and Information Engineering, Seoul National University of Science and Technology, Seoul 01811, Republic of Korea
*
Authors to whom correspondence should be addressed.

Abstract

Real-time performance remains a core requirement for safety-critical robotic applications. ROS 2 has become a de facto middleware standard, while Docker is increasingly adopted for modular and portable deployment. However, embedded hardware updates often constrain Linux distributions and real-time kernel versions, while existing software stacks depend on older ROS 2 releases and legacy libraries. This mismatch forces costly porting and revalidation, motivating heterogeneous deployments that mix ROS 2 versions across host and Docker container runtimes. Yet the overheads introduced by Docker and cross-version ROS 2 communication are not well quantified in terms of real-time guarantees. This paper presents a Docker-enabled real-time framework for evaluating robotic applications in heterogeneous ROS 2 deployments. The framework integrates an RT-PREEMPT–patched Linux kernel, Dockerized ROS 2 distributions, and configurable cross-version communication pathways to enable controlled, repeatable experiments without full-stack migration. We empirically quantify Docker-induced effects on real-time execution using task periodicity, jitter, and response time, and assess ROS 2 communication using end-to-end latency under host-only, container-only, and hybrid configurations. To demonstrate practical viability, we apply the framework to an operational mobile-robot use case that integrates legacy control code with new modules, including a reinforcement-learning decision layer, within a mixed host–container ROS 2 stack. The resulting analyses provide reusable tooling and actionable guidelines for deploying deterministic ROS 2 systems under containerized heterogeneous constraints.

1. Introduction

Deterministic timing and predictable response time are the cornerstones of real-time performance in many robotic applications, where delayed or irregular responses can degrade stability and safety. Robot Operating System (ROS) has become a de facto standard for robotic application development. Its successor, ROS 2 [1], addresses time-sensitive distributed robotics by adopting Distributed Data Service (DDS) with Quality-of-Service (QoS) control, but its end-to-end timing behavior still depends strongly on OS/kernel schedulability, middleware configuration, and system load; therefore, validation must cover both the control software stack and the communication layer [2].
Meeting these timing requirements in practice is increasingly shaped by how robotic software is packaged and deployed. Modern robot stacks combine drivers, middleware, and application modules with large dependency graphs; when embedded targets mandate newer Linux distributions or kernels, keeping legacy ROS 2 components operational often requires costly porting and revalidation. Container-based virtualization (e.g., Docker) offers a practical alternative by bundling an application with its libraries and runtime environment into lightweight, reusable images, simplifying the management of complex software stacks and enabling more independent evolution of components [3]. Yet containers ultimately execute as kernel-managed processes and commonly rely on virtualized networking, so their impact on scheduling and message timing remains an empirical question for real-time applications [4,5,6].
Docker further enables developers to preserve a known-good software environment and redeploy it across evolving platforms while integrating new functionality alongside legacy components [7]. Sollfrank et al. [8] showed that Docker can support soft real-time deployments, but also reported measurable overheads and sensitivity to runtime configuration, particularly along container networking paths. From an edge–cloud perspective, Liu et al. [9] reported that containerization at the edge can be performance-competitive from a client viewpoint while noting that stringent latency and reliability targets still require end-to-end evaluation under realistic conditions. Jin et al. [10] further emphasized that uncertainties introduced by virtualized execution and network variability can directly affect control performance and safety in cyber–physical systems.
Despite this progress, ROS 2 deployments introduce domain-specific timing semantics through DDS and executor scheduling, and modern practice increasingly combines host and container execution to avoid costly migration while integrating new modules. Hardware refresh cycles can force upgrades to Linux distributions and kernels while deployed stacks remain tied to older ROS 2 releases and legacy libraries, making multi-version ROS 2 deployments increasingly common. In this paper, we use hybrid to denote a host+container deployment composition, and heterogeneous ROS 2 to denote multi-version deployments (i.e., cross-version ROS 2 communication), which can occur in either container-only or hybrid compositions. However, the combined timing impact of Docker and cross-version ROS 2 communication on real-time execution and end-to-end ROS 2 latency remains insufficiently quantified for realistic robotic workloads.
From an automation and control-systems engineering perspective, the key challenge is not only whether ROS 2 or containerization is “fast enough” on average, but how users can apply a repeatable validation process to timing when deployment constraints force containerization and software-version heterogeneity. In modern robotic and industrial automation pipelines, modules are increasingly developed, verified, and deployed as independently evolving components, which makes mixed host–container stacks a practical necessity during hardware refresh cycles. Accordingly, we frame this work as a measurement-driven engineering workflow that (i) establishes a fixed real-time baseline, (ii) varies deployment boundaries and ROS 2 version pairing under controlled conditions, and (iii) reports system-level and communication-level timing metrics needed for safety- and performance-oriented acceptance.
This paper addresses this gap by presenting a Docker-enabled real-time evaluation framework for robotic applications in heterogeneous ROS 2 environments. The framework combines an RT-PREEMPT-patched Linux kernel [11], Dockerized ROS 2 distributions, and configurable cross-version communication pathways to support controlled and repeatable experiments without full-stack migration. We evaluate real-time execution behavior using task periodicity, jitter, and response time, and assess ROS 2 communication behavior using end-to-end latency under host-only, container-only, and hybrid host–container configurations, including both same-version and cross-version deployments. Rather than claiming universal guarantees, we quantify these timing effects empirically and derive deployment guidelines from measured behavior.
The main contributions of this work are as follows:
  • A Docker-enabled real-time evaluation framework for heterogeneous ROS 2 deployments that supports controlled experimentation without full-stack migration.
  • An empirical characterization of Docker-induced overheads on periodic real-time execution using task periodicity, jitter, and response time across host-only, container-only, and hybrid configurations.
  • An end-to-end latency analysis of ROS 2 communication in same-version and cross-version deployments, quantifying the effects of host–container boundaries and ROS 2 version pairing.
  • Experimental validation on an operational mobile-robot application that integrates legacy control code with newly developed modules, including a reinforcement-learning decision layer, within a mixed host–container ROS 2 stack.
The remainder of this paper is organized as follows. Section 2 presents the proposed Docker-enabled real-time framework and describes its design and implementation for heterogeneous ROS 2 deployments. Section 3 details the experimental methodology and reports the empirical performance evaluation. Section 4 validates the framework in an operational mobile-robot application that integrates legacy control code with newly developed modules. Finally, the last section concludes the paper with a summary of findings and directions for future work.

2. Framework Design and Implementation

In this section, we introduce a Docker-enabled real-time evaluation framework for ROS 2 applications in heterogeneous host–container deployments. Docker is optimized for portability and modular deployment, not deterministic timing, and thus may introduce nondeterminism through kernel-mediated resource control and virtualized networking. Meaningful evaluation, therefore, requires explicit control of the real-time baseline and deployment boundary conditions, including scheduling policy, CPU/IRQ affinity, and container runtime/network configuration. We build a fixed RT-PREEMPT baseline—configured using established guidelines and adapted to the target embedded platform—and define reproducible deployment profiles spanning host-only, container-only, and hybrid host–container executions, including both same-version and cross-version ROS 2 compositions. Building on this design, we implement a measurement harness that isolates system-level execution timing (task periodicity, jitter, response time) from communication-level behavior (end-to-end ROS 2 latency), enabling controlled experiments that quantify Docker- and heterogeneity-induced overheads without full-stack migration.

2.1. Design Objectives and Scope

We begin by clarifying the design objectives and scope of the proposed evaluation framework for heterogeneous ROS 2 deployments across host and container environments. The practical setting we target is common in embedded robotics: platform upgrades impose newer Linux distributions and kernels, while deployed stacks remain coupled to older ROS 2 releases and legacy libraries. Rather than forcing full-stack migration, our goal is to enable a repeatable methodology that preserves legacy execution environments via containers, integrates newly developed modules alongside them, and empirically quantifies the timing impact of these deployment choices.
In designing the framework, we identify the recurring interactions that must be explicit and configurable to obtain meaningful measurements. The runtime boundary between host processes and containerized processes affects resource control and execution timing. In addition, ROS 2 communication must be evaluated across deployment boundaries, including both same-version and cross-version graphs that can alter the end-to-end message path. We therefore treat RT-PREEMPT as a fixed real-time baseline—configured according to established RT-PREEMPT guidelines and adapted to the target embedded platform—and focus the framework on systematically varying deployment compositions (host-only, container-only, and hybrid) and ROS 2 version pairs under a consistent measurement protocol.
Based on these considerations, four design objectives guide the framework. It is platform-agnostic, with mechanisms implemented through Linux and container runtime configurations, enabling experiments to be reproduced across embedded hardware and Linux versions. It is deployment-configurable, supporting host-only, container-only, and hybrid executions as first-class profiles, including both same-version and cross-version ROS 2 deployments. It is measurement-driven, separating system-level execution timing (task periodicity, jitter, and response time) from communication-level timing (end-to-end ROS 2 latency) while keeping the measurement procedure stable across profiles. It is also application-relevant: beyond microbenchmarks, the framework is designed to accommodate an operational robot stack that combines legacy control code with newly developed modules, including a reinforcement-learning decision layer, within a mixed host–container ROS 2 system.
The scope of this work is intentionally bounded. We focus on RT-PREEMPT Linux and Docker-based containerization and report empirical timing effects across representative robotic workloads and controlled configurations. The framework is not intended to provide universal real-time guarantees across all container runtimes, DDS implementations, or orchestration platforms; instead, it provides a structured way to quantify timing behavior and derive deployment guidelines from measured observations.

2.2. System Architecture and Workflow

Figure 1 illustrates the proposed framework as a layered architecture that separates (i) user-space ROS 2 application stacks (native and containerized) from (ii) real-time services provided by the host kernel, while keeping the hardware layer abstract. Although our prototype is implemented on an embedded ARM64 platform (Raspberry Pi 5; Raspberry Pi Ltd., Cambridge, UK), the architecture is expressed in terms of standard Linux (Ubuntu 24.04.2 LTS; Canonical Group Limited, London, UK) with an RT-PREEMPT kernel (Linux kernel 6.8.0-2034-raspi-realtime).
Figure 1. Proposed framework architecture for heterogeneous ROS 2 over Docker with RT-PREEMPT.
And container-runtime components and therefore generalizes to other embedded targets that impose similar OS and kernel constraints.
At the user-space and containerization layer, two ROS 2 stacks coexist on the same platform. The host native environment executes ROS 2 nodes built for the host OS (e.g., sensing and planning) on top of a host ROS 2 distribution (Jazzy) and its DDS implementation. In parallel, the Docker container encapsulates legacy ROS 2 nodes (e.g., controllers or existing algorithms) together with an older ROS 2 distribution (Humble) and its dependency set. This arrangement enables incremental integration: legacy components remain unchanged inside the container, while newly developed modules can be deployed natively on the host. Interoperability across the host–container boundary is achieved at the DDS layer, where discovery and participant matching are coordinated through a discovery service, and data exchange can follow either standard RTPS/UDP paths or intra-host IPC when shared-memory transport is enabled (FastDDS SHM).
The kernel-space layer is provided by an RT-PREEMPT-patched Linux kernel. It supplies the real-time scheduler (e.g., SCHED_FIFO/SCHED_RR), shared-memory primitives (POSIX SHM used by DDS shared-memory transport), and memory-management controls relevant to deterministic execution (e.g., memory locking and paging control). Device access (GPIO/SPI/USB/network) is mediated by the same kernel drivers regardless of whether application components execute natively or inside containers, making the host–container boundary primarily a user-space deployment boundary rather than a separate kernel instance.
The workflow supported by the framework follows a fixed experiment protocol while varying deployment composition. For each profile (host-only, container-only, or hybrid host–container), the RT-PREEMPT baseline configuration is applied, the corresponding ROS 2 nodes are launched in their designated environments, and DDS discovery and transport settings are configured consistently for the run (including optional shared-memory IPC). A unified measurement harness then records system-level execution timing (task periodicity, jitter, and response time) and communication-level behavior (end-to-end ROS 2 latency) under representative workloads. Keeping the protocol and instrumentation stable across profiles enables attribution of observed timing differences to the container boundary and ROS 2 version heterogeneity rather than to incidental configuration drift.

2.3. RT-PREEMPT Baseline and RT-POSIX Task Model

The proposed framework relies on a fixed real-time (RT) execution baseline so that timing differences observed in later sections can be attributed to deployment composition and ROS 2 version heterogeneity, rather than incidental changes in the underlying scheduler. The embedded target runs Ubuntu 24.04.2 LTS installed via Raspberry Pi Imager (version 2.0.6; Raspberry Pi Ltd., Cambridge, UK) [12]. The RT kernel is 6.8.0-2034-raspi-realtime, built using a Raspberry Pi 5-compatible RT kernel builder [13]. Kernel tuning follows established RT practices, including disabling latency-inducing power-management features and applying multicore isolation guidelines to reduce interference [11].
On this baseline, time-critical threads are executed under fixed-priority preemptive scheduling (SCHED_FIFO). Dynamic frequency scaling is disabled (performance governor), and CPU affinity is used to reserve a dedicated core for periodic RT execution while distributing non-real-time services across the remaining cores, consistent with recommended isolation practices [11]. IRQ affinity follows the same partitioning: interrupts associated with time-critical execution are handled on the dedicated core, while other interrupts are distributed across the remaining cores. These baseline settings are applied uniformly across host-only, container-only, and hybrid deployment profiles.
To keep the workload definition explicit and repeatable, periodic tasks are implemented in user space using a real-time POSIX abstraction (RT-POSIX) [14]. RT-POSIX provides lightweight primitives for periodic release and thread configuration using standard Linux RT mechanisms. In our implementation, each real-time thread is configured with SCHED_FIFO priority and CPU affinity, and periodic release is driven by clock_nanosleep() on CLOCK_MONOTONIC to avoid time-of-day effects. This baseline serves as the common reference for quantifying deployment-boundary overheads and comparing end-to-end ROS 2 latency across same-version and cross-version deployments.

2.4. Containerized ROS 2 Runtime and Deployment Profiles

The framework supports heterogeneous ROS 2 deployments by co-locating two ROS 2 runtimes on a single platform: a host-native stack for newly developed modules and a containerized stack that preserves legacy nodes and their dependencies. In our implementation, the host runs ROS 2 Jazzy, and the container runs either ROS 2 Humble (legacy) or ROS 2 Jazzy (same-version container baseline). Both environments use the same RMW implementation (Fast DDS) so that observed effects primarily reflect deployment boundaries and version heterogeneity rather than middleware selection.
Host–container interoperability is established at the DDS layer. Node discovery is coordinated via a Fast DDS discovery server to avoid reliance on multicast visibility across container boundaries and to maintain consistent participant matching across profiles. Data transport uses RTPS/UDP, and shared-memory transport is disabled, ensuring that communication timing reflects the kernel networking path and the deployment boundary conditions under study. To avoid incidental differences introduced by container network translation, containers are executed with host networking (–net=host), launched with elevated privileges (–privileged), and configured with a shared IPC namespace (–ipc=host) to allow real-time configuration of containerized threads under the same RT-PREEMPT host kernel.
Using this runtime configuration, three deployment profiles are evaluated. In the host-only profile, ROS 2 nodes execute natively on the host OS under ROS 2 Jazzy. In the container-only profile, nodes execute inside a Docker container (either Jazzy or Humble), providing a baseline for container overhead without host–container interaction. In the hybrid profile, nodes are partitioned across host and container, reflecting incremental integration where new modules execute natively while legacy components remain containerized. For each profile, we instantiate either same-version deployments (Jazzy–Jazzy) or cross-version deployments (Jazzy–Humble), enabling controlled analysis of version heterogeneity across deployment boundaries. The deployment profiles and ROS 2 version pairings evaluated in this paper are summarized in Table 1.
Table 1. Deployment profiles and ROS 2 version pairing used in the evaluation.
To ensure that observed differences arise from deployment composition rather than application semantics, key ROS 2 execution parameters are held constant across profiles. Nodes use a single-threaded executor and reliable QoS, and communication workloads are published at 20 Hz. Time-critical threads execute under the RT-PREEMPT baseline with SCHED_FIFO priority 98 and memory locking enabled to prevent paging-induced latency; the same scheduling and memory policy is applied regardless of whether the thread executes natively or inside a container. For cross-machine measurements, the framework supports PTP-based time synchronization and additionally reports RTT-based latency, which is independent of cross-host clock alignment.

3. Performance Evaluation and Analysis

This section presents an empirical timing characterization enabled by the proposed framework. All experiments use the fixed RT-PREEMPT baseline and the deployment profiles summarized in Table 1. We report (i) system-level real-time execution behavior (periodicity, jitter, and response time) and (ii) communication-level ROS 2 behavior (end-to-end latency) under host-only, container-only, and hybrid deployments, including same-version and cross-version configurations.

3.1. Experimental Environment and Constraints

Unless stated otherwise, all experiments in Section 3.2 and Section 3.3 use the following fixed configuration to minimize confounding factors and enable attribution of timing differences to deployment composition and ROS 2 version pairing:
  • Real-time baseline: RT-PREEMPT host kernel, fixed-priority scheduling (SCHED_FIFO), CPU/IRQ affinity partitioning, performance governor, and memory locking for time-critical threads.
  • ROS 2 middleware: Fast DDS with a discovery server for consistent participant discovery; RTPS/UDP transport is used for data, and shared-memory transport is disabled.
  • Container runtime policy: containers are launched with host networking and a shared IPC namespace; privileged execution is used to avoid RT configuration failures and to keep the container boundary focused on user-space isolation rather than additional network translation layers.
  • ROS 2 execution parameters: single-threaded executor, reliable QoS, and a 20 Hz publish rate for the latency protocol.
  • Stress condition: combined CPU/memory contention (stress-ng) and sustained background traffic (iperf), applied consistently across profiles and pinned away from the dedicated RT core.
All measurements are performed on a Raspberry Pi 5 (ARM64) embedded target. Because the Raspberry Pi 5 software ecosystem is practically coupled to newer Ubuntu releases (Ubuntu 22.04 is not supported as a host OS on our target), we install Ubuntu 24.04.2 LTS as the host environment and use Docker to preserve legacy user-space dependencies, enabling heterogeneous ROS 2 deployments without a full-stack migration.
The host runs an RT-PREEMPT–patched Linux kernel (6.8.0-2034-raspi-realtime) and the fixed baseline described in Section 2.3. ROS 2 Jazzy is used for host-native execution. Two container images are used: (i) a same-version container (Ubuntu 24.04 + ROS 2 Jazzy) and (ii) a legacy container (Ubuntu 22.04 + ROS 2 Humble). Across all profiles, ROS 2 uses Fast DDS with a discovery server for participant discovery and RTPS/UDP transport (shared-memory transport disabled). Containers run with host networking (–net=host) and elevated privileges (–privileged, –ipc=host) to keep the networking path consistent with native execution and to support RT configuration of containerized processes under the host RT kernel.
Robustness under contention is evaluated by introducing a controlled background load composed of (i) CPU/memory stress using stress-ng [15] and (ii) network stress using iperf [16] to generate sustained background traffic. The combined stress condition is designed to emulate resource interference commonly observed in embedded robotic systems (e.g., concurrent perception, logging, and network streaming). Stress intensity and core placement are kept identical across configurations: stress processes are pinned to non-real-time cores to avoid trivially starving the dedicated real-time core, and the network stress is applied consistently across deployment profiles. This ensures that the timing differences reported in Section 3.2 and Section 3.3 primarily reflect deployment choices rather than uncontrolled background activity.

3.2. System-Level Real-Time Performance Evaluation

System-level real-time behavior is evaluated using task periodicity and task response time. Following empirical practice in ROS 2 real-time evaluations [2], periodicity captures whether a periodic workload preserves its intended release pattern under concurrent execution, while response time measures the elapsed time from task release to completion [17]. All measurements are collected under the fixed RT baseline described in Section 2.3 so that observed differences can be attributed to deployment boundaries rather than changes in kernel configuration or CPU/IRQ isolation.
A four-task periodic workload with harmonic periods is used to exercise fixed-priority preemptive scheduling. Table 2 summarizes the task parameters, where deadlines equal periods and priorities are assigned in rate-monotonic order (shorter period → higher priority) under SCHED_FIFO. Tasks execute concurrently using the RT-POSIX periodic model described in Section 2.3 [14].
Table 2. Real-time task parameters for system-level timing evaluation (milliseconds).
For each activation k of task τ i , we record a release timestamp t i , k rel and a completion timestamp t i , k fin . The observed inter-release interval (empirical period) is
T i , k = t i , k + 1 rel − t i , k rel ,
and period jitter (period error magnitude) is
J i , k = T i , k − P i ,
where P i is the nominal period. The empirical response time of the k-th activation is
R i , k = t i , k fin − t i , k rel .
In Figure 2, R i reflects execution demand C i , blocking B i , and interference I i . In our evaluated task set, blocking is negligible (no shared locks or non-preemptive critical sections), so B i is set to zero in the analytical reference.
Figure 2. Timing definition for a periodic task τ i under fixed-priority preemptive scheduling. The figure illustrates the nominal period P i , period jitter J i , execution time C i , blocking B i , interference I i , busy window W i , and response time R i .
For analytical comparison, worst-case response-time (WCRT) bounds are computed using standard fixed-priority response time analysis (RTA) [18]:
R i q + 1 = C i + B i + ∑ j ∈ h p ( i ) R i q P j C j ,
iterated from R i 0 = C i + B i until convergence ( R i q + 1 = R i q ) or deadline violation ( R i q + 1 ≥ D i ), where h p ( i ) denotes tasks with higher priority than τ i . With B i = 0 and synchronous release at the start of a hyperperiod, the resulting bounds are R 1 = 5  ms, R 2 = 15  ms, R 3 = 30  ms, and R 4 = 70  ms, satisfying R i ≤ D i ( = P i ) for all tasks. These bounds are conservative limits used to contextualize empirical measurements; realized runs may exhibit lower average response times depending on phasing and interference patterns.
To isolate deployment-boundary effects, the identical task set is executed under three runtime environments: (i) host-native execution on Ubuntu 24.04, (ii) a same-version container (Ubuntu 24.04 userland in Docker; ROS 2 Jazzy), and (iii) a legacy container (Ubuntu 22.04 userland in Docker; ROS 2 Humble). Each environment is evaluated under two operating conditions: an idle baseline and a stress condition (CPU/memory load via stress-ng and network load via iperf; Section 3.1). Table A1, Table A2, Table A3, Table A4, Table A5 and Table A6 report summary statistics (avg./min./max./std.) for the empirical period T i , k , response time R i , k , and period jitter J i , k .
Table 3 provides a condensed view of the worst-case observed response times and period jitter across configurations. Full timing tables (avg./min./max./std.) are provided in Appendix A (Table A1, Table A2, Table A3, Table A4, Table A5 and Table A6). For the periodic task-set microbenchmark, the hard real-time requirement is that all activations meet their deadlines. Therefore, we emphasize worst-case observed response time and maximum period jitter (Table 3), which are more directly decision-relevant than percentiles. Percentile metrics are omitted for the task-set tables for brevity because the observed distributions remain tightly concentrated (microsecond-level jitter) across all configurations.
Table 3. Condensed summary of worst-case system-level timing across deployment profiles. Each cell reports R max (ms)/ J max ( μ s). Full tables are provided in Appendix A.
Table A1 establishes the host-native baseline. Mean periods remain tightly centered on the nominal values (20/40/80/160 ms) across all tasks with small dispersion, indicating regular releases under the configured RT baseline. Mean response times for τ 2 – τ 4 follow the expected fixed-priority scale implied by interference (15/30/70 ms), while τ 1 remains near its nominal execution budget (≈5 ms). Response time maxima remain below deadlines for all tasks, consistent with the schedulability of the evaluated workload. Table A2 reports the same host-native configuration under controlled contention. Period means remain essentially unchanged, and standard deviations remain small, suggesting that the RT baseline and the applied CPU/IRQ partitioning preserve release regularity even under background CPU/memory pressure.
Containerizing the workload with the same version of the userland (Ubuntu 24.04) does not materially change the system-level timing statistics. As shown in Table A3, periods remain centered on the configured values with dispersion comparable to the host-native baseline, and response times preserve the fixed-priority ordering ( τ 1 shortest, τ 4 longest) with mean values on the same scale as the analytical reference. Under the container configuration used in this study (privileged execution, host networking, and shared IPC namespace), the Docker boundary does not introduce observable degradation in periodic task timing for this CPU-bound workload.
The same-version container also remains stable under contention (Table A4). Periodicity remains tight, period jitter remains small, and observed response-time maxima remain below the corresponding deadlines. Since Equation (4) provides a conservative upper bound, lower mean response times for τ 2 – τ 4 in a given run can occur due to realized phasing and interference patterns without contradicting schedulability.
A key question for heterogeneous ROS 2 deployments is whether a legacy userland alters time-critical scheduling behavior. Table A5 shows that the legacy container (Ubuntu 22.04) exhibits essentially the same timing structure as both host-native and same-version container execution: periods remain centered on the nominal values, period jitter remains small, and response times follow the expected ordering and scale induced by fixed-priority interference. This is consistent with the fact that scheduling and timer behavior are governed by the host RT-PREEMPT kernel, while the container primarily changes the user-space runtime environment.
The same conclusion holds under contention (Table A6). Period and jitter statistics remain stable, and response-time maxima remain below deadlines for all tasks. As expected under fixed-priority preemption, the largest response-time spread occurs in the lowest-priority task τ 4 , which accumulates interference from τ 1 – τ 3 and therefore exhibits the widest response time dispersion; importantly, this behavior is consistent across host-native and containerized profiles rather than being amplified by containerization.
Across all six configurations, the RT-PREEMPT baseline preserves tight periodicity and microsecond-level period jitter across both host-native and containerized executions. Figure 3 visualizes the observed period distributions for τ 1 – τ 4 under idle (blue) and stress (red) conditions for the three deployment environments (Host, Docker Jazzy, and Docker Humble). In all tasks, the distributions remain tightly concentrated around the nominal periods (20/40/80/160 ms), and the annotated maximum jitter values remain on the order of a few μ s, indicating that neither the Docker boundary (under privileged, host-network settings) nor the legacy userland introduces a systematic widening of release variability. Consistent with the tabulated timing statistics, empirical response-time maxima also remain below the corresponding deadlines for this CPU-bound harmonic workload, supporting schedulability across host-native, same-version container, and legacy container runs. Having established that system-level execution timing is largely preserved across deployment profiles, the next subsection evaluates whether comparable robustness holds for ROS 2 communication latency when messages traverse host–container boundaries and mixed-version compositions.
Figure 3. Period distributions of τ 1 – τ 4 across Host, Docker Jazzy, and Docker Humble (idle: blue; stress: red). Numbers denote maximum period jitter in μ s.

3.3. ROS 2 Communication Latency Evaluation Across Deployment Boundaries

While Section 3.2 isolates system-level scheduling behavior of CPU-bound periodic workloads, heterogeneous robot deployments must also preserve predictable communication-level timing across middleware and runtime boundaries. This subsection characterizes ROS 2 end-to-end latency using a timestamped message-return protocol that enables comparison of one-way delay and round-trip time (RTT) across host-native and containerized receiver placements.
A remote PC (Ubuntu 24.04) publishes a periodic command message (cmd_vel) and embeds a transmit timestamp t send at the analysis node (1). The Raspberry Pi 5 receives the message at a record node, logs the local receive timestamp t recv , and immediately returns an acknowledgment message containing { cmd _ vel , t send , t recv } back to the remote PC, where a second record node logs the return timestamp t return (3). The latency metrics are
L 1 way = t recv − t send
and
L rtt = t return − t send .
RTT is independent of cross-host clock alignment because t send and t return are measured on the same machine; it is therefore treated as the primary reference for cross-configuration comparison. One-way latency additionally depends on the relative alignment of the remote PC and Raspberry Pi clocks. The hosts are time-synchronized prior to measurement using a consistent time service (PTP when available), and L 1 way is used as a practical estimate of outbound network and middleware delay while interpreting results primarily through RTT and distributional dispersion.
The Raspberry Pi receiver corresponds to point (2) in Figure 4. The baseline is (2b), where the record node runs natively on the Raspberry Pi host (ROS 2 Jazzy). The alternative is (2a), where the record node is placed behind a deployment boundary inside Docker: either a same-version container (ROS 2 Jazzy) or a legacy container (ROS 2 Humble). This isolates the impact of containerization and cross-version composition while keeping the RT kernel and the remote publisher/collector unchanged.
Figure 4. ROS 2 end-to-end latency measurement protocol. The analysis node on the remote PC embeds transmit time t send (1). The Raspberry Pi record node logs receive time t recv at (2a) (containerized Jazzy/Humble) or (2b) (host-native Jazzy baseline), then returns { cmd _ vel , t send , t recv } to the remote record node that logs t return (3). One-way latency is t recv − t send and RTT is t return − t send .
All configurations use the same DDS implementation and transport settings as in Section 3.2 (Fast DDS, discovery server, RTPS/UDP, shared-memory transport disabled). Containers are executed with host networking (–net=host) and the same privilege/IPC settings used throughout the paper so that the boundary primarily reflects user-space and process isolation rather than an additional virtual network stack. Each configuration is evaluated under both idle and stress operating conditions. The stress condition combines CPU/memory contention generated by stress-ng with sustained background network traffic generated by iperf, applied consistently across all configurations. Note that Shared-memory (SHM) transport is disabled by design in this study because Fast DDS can automatically bypass the UDP networking path and deliver user data via shared memory when participants reside on the same host. Enabling SHM would therefore change the effective end-to-end message path and can mask the timing contribution of host–container boundaries and network-stack behavior that we intend to quantify. This choice is consistent with common practice when the goal is to analyze UDP-visible traffic and container/network effects rather than to benchmark the best achievable intra-host latency; SHM-focused evaluation is left as future work.
In addition to avg./min./max./std., we also report tail percentiles (P95 and P99) for the latency distributions in Table 4 and Table 5. This is to characterize rare but practically relevant delays (tail behavior) which are not well represented by averages and can be overly dominated by a single extreme outlier when using maxima alone. Under idle conditions (Table 4), mean RTT increases modestly when the receiver is containerized, indicating sub-millisecond typical overhead for the container boundary under host-network, privileged Docker execution. Under stress (Table 5), both one-way latency and RTT increase substantially across all configurations, indicating that contention (CPU/memory load and network saturation) dominates the end-to-end latency distribution. In this regime, differences between host-native and containerized receivers are not systematic in the averages, and the legacy container remains comparable to the host-native baseline in both mean and dispersion. Because maxima are sensitive to rare outliers, the interpretation focuses on the central tendency and dispersion under each condition and uses RTT as the synchronization-independent reference.
Table 4. ROS 2communication latency (PC → Raspberry Pi 5) under idle conditions (ms). Baseline (2b) is a host-native Jazzy record node; (2a) places the record node in Docker (same-version Jazzy or legacy Humble). Summary statistics include avg./min./max./std. and tail percentiles (P95/P99).
Table 5. ROS 2 communication latency (PC → Raspberry Pi 5) under stress-ng contention (ms). Summary statistics include avg./min./max./std. and tail percentiles (P95/P99).
Under idle conditions, tail latency remains low across configurations (P99 RTT ≤ 9.08 ms), indicating stable timing on the baseline network-visible path. Under the combined stress condition, tail behavior grows significantly (P99 RTT of 577–626 ms), and rare outliers increase the maximum RTT to 907 ms (Host), 897 ms (Docker Jazzy), and 1453 ms (Docker Humble). These results reinforce the contention that tail latency is dominated by contention and should be included in acceptance testing for deterministic deployments.
Overall, the results in Section 3.2 and Section 3.3 indicate that, with a fixed RT-PREEMPT baseline and consistent CPU/IRQ isolation, containerization and userland heterogeneity do not introduce a systematic degradation in system-level schedulability for CPU-bound periodic workloads: task periods remain tightly centered on their nominal values and response-time maxima remain below deadlines across host-native, same-version Docker, and legacy Docker executions. At the communication level, the idle-case ROS 2 RTT shows only a modest increase when the receiver is moved behind the container boundary (sub-millisecond mean differences under host networking and privileged execution), while under the combined stress condition (stress-ng + iperf) end-to-end latency is dominated by contention effects rather than by containerization or ROS 2 distribution pairing.
These findings support the central premise of the proposed framework: legacy ROS 2 stacks can be preserved in containers on a modern RT host without materially compromising baseline real-time execution, enabling incremental migration and mixed-version deployment. The next section validates this claim in an integrated, application-level setting by deploying the proposed Docker-based heterogeneous framework in a mobile-robot wireless-charging efficiency optimization system and evaluating its end-to-end behavior under realistic operational workloads.

4. Experimental Validation in a Mobile-Robot Wireless-Charging Application

This section validates the proposed Docker-enabled heterogeneous ROS 2 framework in an end-to-end mobile-robot wireless-charging efficiency optimization workflow that integrates (i) a legacy control stack constrained to Ubuntu 22.04/ROS 2 Humble and (ii) newly developed modules targeting Ubuntu 24.04/ROS 2 Jazzy. The goal is not to benchmark “Docker vs. non-Docker” for the legacy stack; rather, we demonstrate that containerizing the legacy domain enables mixed-version, end-to-end operation on a modern RT-PREEMPT host while preserving timing regularity and communication stability at the system level.
The application proceeds in two phases: (1) Nav2-based autonomous approach to the charging station and (2) local coil-alignment behavior that maximizes wireless power-transfer efficiency. Efficiency is defined as the measured exchanged power between the wireless charger transmitter (Tx) and receiver (Rx); the observed peak efficiency in our hardware setup is approximately 55%.
We performed N = 5 real-robot trials under the same deployment shown in Figure 5. The key application KPIs are as follows: (i) coil alignment time (time from entering alignment mode to the completion event); (ii) peak efficiency during a trial; (iii) terminal efficiency at completion, and (iv) success within a fixed timeout. Table 6 reports aggregate statistics across the five runs. In addition, we visualize one illustrative run to provide an interpretable view of the phase transition and the efficiency evolution (Figure 6 and Figure 7), without selecting the run based on outcome.
Figure 5. Experimental platform and heterogeneous deployment for the wireless-charging optimization application (station PC: Ubuntu 24.04; embedded target: Raspberry Pi 5 with RT-PREEMPT; host domain: ROS 2 Jazzy; container domain: ROS 2 Humble). All photographs in this figure were taken by the authors.
Table 6. Wireless-charging optimization results over N = 5 real-robot trials (single deployment variant: legacy stack in Docker (Humble), new modules on RT host (Jazzy)).
Figure 6. Illustrative run in simulation (Gazebo): (a) robot trajectory during the Nav2-based approach and the RL-based coil-alignment phase; (b) efficiency evolution over time, highlighting the phase transition.
Figure 7. Illustrative run on the real robot: (a) robot trajectory during the approach and coil-alignment phases; (b) measured Tx–Rx power-transfer efficiency over time.
Figure 6 and Figure 7 visualize one illustrative run in simulation (Gazebo Sim Harmonic v8.10.0; Open Robotics, Mountain View, CA, USA) and on the real robot, respectively. In both cases, the robot follows the Nav2-based approach until reaching the coil-alignment region; control is then transferred to the alignment policy, which adjusts the terminal pose to increase the measured efficiency. The plots highlight the transition between phases and the subsequent rise of efficiency during the alignment stage. Compared to simulation, the real robot exhibits additional variability due to localization noise, wheel slip, actuator dead zones, and wireless power measurement fluctuations, which can increase settling time or introduce oscillatory transients. Table 6 quantifies these effects over all five runs, ensuring that the evaluation is supported by aggregate results rather than a single illustrative example.
To relate the end-to-end validation to the microbenchmarks in Section 3.2 and Section 3.3, we additionally log (i) system-level timing statistics of key periodic loops and (ii) ROS 2 round-trip time (RTT) for representative topic paths that cross the host–container boundary. Table 7 and Table 8 summarize these results using the same statistics (avg./min./max./std.) as in Section 3.3. The embedded target uses an RT-PREEMPT baseline with fixed-priority scheduling (SCHED_FIFO); priorities are assigned so that hard real-time control and state estimation preempt trajectory shaping and optimization, limiting the impact of bursty compute on control-critical periodic execution.
Table 7. System-level timing statistics (ms) inside the integrated wireless-charging application.
Table 8. ROS 2 RTT statistics (ms) for representative paths in the integrated application.
Overall, the integrated wireless-charging experiment demonstrates that the proposed mixed host–container ROS 2 deployment supports practical incremental migration: a legacy Humble control stack is preserved in Docker on a Jazzy RT-PREEMPT host, while newly developed modules run natively and interact through a unified ROS 2 graph. The aggregate application KPIs (Table 6), together with system-level timing (Table 7) and cross-boundary communication behavior (Table 8), provide end-to-end evidence that the heterogeneous deployment remains stable in a real robotic workflow beyond isolated microbenchmarks.

5. Conclusions

This paper presented a Docker-enabled real-time evaluation framework for heterogeneous ROS 2 deployments, motivated by a practical constraint in embedded robotics: platform upgrades often require newer Linux distributions and kernels, while operational robot stacks remain coupled to older ROS 2 releases and legacy dependencies. The framework establishes a fixed RT-PREEMPT baseline and enables reproducible host-only, container-only, and hybrid host–container deployments (same-version and cross-version), together with unified measurement of system-level execution timing and communication-level ROS 2 latency.
Experiments on a Raspberry Pi 5 show that, under the evaluated deployment policy (privileged containers with host networking and consistent RT configuration), introducing Docker and user-space heterogeneity does not systematically degrade CPU-bound real-time schedulability. Across host-native execution, a same-version container (Ubuntu 24.04/ROS 2 Jazzy), and a legacy container (Ubuntu 22.04/ROS 2 Humble), periodic releases remained tightly centered on their nominal periods with small jitter, and response-time maxima stayed below deadlines for the evaluated harmonic workload. For ROS 2 communication, idle-case RTT increased only modestly when the receiver was placed behind the container boundary (with shared-memory transport disabled), while under combined stress (stress-ng + iperf) end-to-end latency was dominated by contention rather than by containerization or ROS 2 distribution pairing. These results provide quantitative support for the central premise of the framework: legacy ROS 2 stacks can be preserved in Docker on a modern RT host as a practical path for incremental migration, without sacrificing baseline timing predictability under comparable conditions. This conclusion is reinforced by an integrated mobile-robot wireless-charging optimization application in which legacy components and newly developed modules operate together in a mixed host–container ROS 2 graph, demonstrating deployment feasibility beyond isolated microbenchmarks.
The scope of this study is intentionally controlled to attribute observed timing effects to deployment boundaries: the system-level workload is CPU-bound with negligible blocking, and the communication evaluation fixes the middleware and transport policy (Fast DDS with discovery server, RTPS/UDP, shared-memory transport disabled) under a container runtime configuration chosen to minimize confounding factors (privileged execution, host networking, shared IPC). Within this defined baseline, the findings are meaningful as a reproducible reference point and a concrete quantitative bound on Docker- and heterogeneity-induced overheads.
The reported results should be interpreted under the specific deployment policy used to reduce confounding factors: privileged containers with host networking and a shared IPC namespace. This configuration is representative of “best-case” timing behavior for containerized ROS 2 on a single RT-PREEMPT host, because it avoids additional translation layers (e.g., bridge/NAT networking) and reduces the likelihood of permission-related failures when configuring real-time priorities. However, it also weakens isolation relative to more restrictive deployments (e.g., unprivileged/rootless containers, bridged networking, strict cgroup quotas, or hardened seccomp profiles), which may increase tail latency or jitter. For safety-critical deployments, the proposed framework should therefore be re-run under the target security/isolation policy so that acceptance decisions are based on measurements that match the intended operational constraints.
Based on the measured behavior under the controlled RT baseline used in this study, we suggest the following practical guidelines for users deploying deterministic ROS 2 systems under mixed host–container constraints:
  • Treat deployment policy as a first-class timing variable. If you change networking mode (host vs. bridge/NAT), privilege/capabilities, or cgroup quotas, re-measure tail latency (P95/P99) rather than relying on average values.
  • Use host networking when latency determinism is prioritized over network isolation. Host networking avoids additional virtual interfaces and address translation layers, but it trades off port namespace isolation and some containment properties.
  • Be explicit about SHM vs. UDP transport. Disabling SHM is appropriate when you need to compare network-visible paths and boundary effects; enabling SHM can reduce typical intra-host latency but changes the message path and may introduce its own resource/permission constraints.
  • Stress what matters in the field. In our results, combined CPU/memory contention and network saturation dominate end-to-end latency under stress, so worst-case evaluation should include both compute and traffic interference, not only idle microbenchmarks.
  • Monitor tails and schedulability indicators in CI/on-robot. Recommended metrics include period jitter and response time for critical loops, and end-to-end RTT percentiles (P95/P99) for control-relevant topic paths that cross deployment boundaries.
Future work will extend this work along the dimensions that can change tail behavior in real robots: (i) tail-focused latency characterization with percentile metrics (e.g., P95/P99/P99.9) and run-to-run variability, (ii) systematic sweeps of ROS 2 executor/QoS and DDS transport options (including shared-memory IPC), (iii) broader container isolation and networking modes (e.g., unprivileged containers, cgroup quotas, bridged/NAT networking, orchestration constraints), and (iv) additional workloads and platforms, including I/O- and lock-heavy pipelines and larger multi-machine heterogeneous graphs, to derive deployment guidelines that remain robust under realistic field conditions.

Author Contributions

J.M.L. and K.W.K. contributed equally to this work (co-first authors). The joint first authors surveyed the background, conceptualized, and developed the software and experimental environment. R.D., together with the joint first authors, formulated the experimental procedures and analyzed the results. R.D. and B.W.C. jointly supervised and supported the study and contributed to conceptualization, project administration, and manuscript revision. Funding acquisition was led by B.W.C. R.D. and B.W.C. are co-corresponding authors. All authors have read and agreed to the published version of the manuscript.

Funding

This work was financially supported by SeoulTech (Seoul National University of Science and Technology).

Data Availability Statement

The relevant data and source code are available upon request from the corresponding authors.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Detailed System-Level Timing Statistics

This appendix provides the full system-level timing tables (avg./min./max./std.) for period, response time, and period jitter that are summarized in Table 3.
Table A1. System-level timing statistics for host-native execution (Ubuntu 24.04) under idle conditions.
Table A2. System-level timing statistics for host-native execution (Ubuntu 24.04) under stress conditions.
Table A3. System-level timing statistics for the same-version container (Ubuntu 24.04) under idle conditions.
Table A4. System-level timing statistics for the same-version container (Ubuntu 24.04) under stress conditions.
Table A5. System-level timing statistics for the legacy container (Ubuntu 22.04) under idle conditions.
Table A6. System-level timing statistics for the legacy container (Ubuntu 22.04) under stress conditions.

References

  1. Macenski, S.; Foote, T.; Gerkey, B.; Lalancette, C.; Woodall, W. Robot Operating System 2: Design, Architecture, and Uses in the Wild. Sci. Robot. 2022, 7, eabm6074. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  2. Park, J.; Delgado, R.; Choi, B.W. Real-time Characteristics of ROS 2.0 in Multiagent Robot Systems: An Empirical Study. IEEE Access 2020, 8, 154637–154651. [Google Scholar] [CrossRef] [Scilit]
  3. Queiroz, R.; Cruz, T.; Mendes, J.; Sousa, P.; Simões, P. Container-Based Virtualization for Real-Time Industrial Systems—A Systematic Review. ACM Comput. Surv. 2023, 56, 59. [Google Scholar] [CrossRef] [Scilit]
  4. Goldschmidt, T.; Hauck-Stattelmann, S.; Malakuti, S.; Grüner, S. Container-Based Architecture for Flexible Industrial Control Applications. J. Syst. Archit. 2018, 84, 28–36. [Google Scholar] [CrossRef] [Scilit]
  5. Queiroz, R.; Cruz, T.; Simões, P. Testing the Limits of General-Purpose Hypervisors for Real-Time Control Systems. Microprocess. Microsystems 2023, 99, 104848. [Google Scholar] [CrossRef] [Scilit]
  6. Liu, L.; Xu, Z.; Qu, X. A Reconfigurable Architecture for Industrial Control Systems: Overview and Challenges. Machines 2024, 12, 793. [Google Scholar] [CrossRef] [Scilit]
  7. Anderson, C. Docker [Software Engineering]. IEEE Softw. 2015, 32, 102-C3. [Google Scholar] [CrossRef] [Scilit]
  8. Sollfrank, M.; Loch, F.; Denteneer, S.; Vogel-Heuser, B. Evaluating Docker for Lightweight Virtualization of Distributed and Time-Sensitive Applications in Industrial Automation. IEEE Trans. Ind. Inform. 2021, 17, 3566–3576. [Google Scholar] [CrossRef] [Scilit]
  9. Liu, Y.; Lan, D.; Pang, Z.; Karlsson, M.; Gong, S. Performance Evaluation of Containerization in Edge-Cloud Computing Stacks for Industrial Applications: A Client Perspective. IEEE Open J. Ind. Electron. Soc. 2021, 2, 153–168. [Google Scholar] [CrossRef] [Scilit]
  10. Jin, J.; Pang, Z.; Kua, J.; Zhu, Q.; Johansson, K.H.; Marchenko, N.; Cavalcanti, D. Cloud-Fog Automation: The New Paradigm Toward Autonomous Industrial Cyber-Physical Systems. IEEE J. Sel. Areas Commun. 2025, 43, 2917–2937. [Google Scholar] [CrossRef] [Scilit]
  11. Delgado, R.; Choi, B.W. New Insights into the Real-Time Performance of a Multicore Processor. IEEE Access 2020, 8, 186199–186211. [Google Scholar] [CrossRef] [Scilit]
  12. Raspberry Pi Ltd. Raspberry Pi Imager. Available online: https://www.raspberrypi.com/software/ (accessed on 2 January 2026).
  13. ros-realtime. Linux Real-Time Kernel Builder. Available online: https://github.com/ros-realtime/linux-real-time-kernel-builder (accessed on 2 January 2026).
  14. Delgado, R.; Oh, S.-R.; You, B.-J.; Choi, B.W.; Ihn, Y.S. Design and Analysis of a Real-Time Control Architecture Towards Software-Defined EtherCAT Devices. In Proceedings of the IECON 2023—49th Annual Conference of the IEEE Industrial Electronics Society, Singapore, 16–19 October 2023. [Google Scholar]
  15. King, C.I. stress-ng. Available online: https://github.com/ColinIanKing/stress-ng (accessed on 2 January 2026).
  16. Olimov, O.; Artikova, G.; Xatamova, M. Iperf to Determine Network Speed and Functionality. Web Technol. Multidimens. Res. J. 2024, 2, 94–101. [Google Scholar]
  17. Delgado, R.; Jo, Y.H.; Choi, B.W. RT-AIDE: A RTOS-Agnostic and Interoperable Development Environment for Real-Time Systems. IEEE Trans. Ind. Inform. 2023, 19, 2772–2781. [Google Scholar] [CrossRef] [Scilit]
  18. Klein, M.; Ralya, T.; Pollak, B.; Obenza, R.; Harbour, M.G. A Practitioner’s Handbook for Real-Time Analysis: Guide to Rate Monotonic Analysis for Real-Time Systems; Springer Science & Business Media: New York, NY, USA, 2012. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.