Sim-to-Real Transfer of Deep Reinforcement Learning Agents for Online Coverage Path Planning

Arvi Jonnarth, Ola Johansson, Jie Zhao, Michael Felsberg

TL;DR

Deep reinforcement learning offers a flexible way for robots to cover unknown spaces (like mowing a lawn or exploring a disaster zone), but moving these models from simulation to the real world is notoriously difficult due to physical discrepancies and latency. This paper bridges the sim-to-real gap for online coverage path planning using a novel multi-scale frontier map, a total variation reward to eliminate uncovered gaps, and a real-time asynchronous training framework. The approach successfully transitions from simulation to a physical robotic lawnmower, outperforming traditional specialized algorithms.

What Problem Does This Paper Address?

Coverage Path Planning (CPP) requires an autonomous agent to pass through every point of a free space efficiently. It is the core algorithm driving robotic vacuum cleaners, automated lawnmowers, and search-and-rescue drones. While offline algorithms can calculate optimal paths if a map is provided in advance, real-world robots must map and plan online in completely unknown environments.

Deep Reinforcement Learning (DRL) is an attractive paradigm for online CPP because it can learn continuous, adaptive control signals directly from raw sensor data. However, deployment on physical hardware faces severe bottlenecks:

  1. Sample Inefficiency: Training from scratch requires millions of interactions, which translates to weeks of physical runtime and risks damaging the hardware.
  2. The Sim-to-Real Gap: Policies trained in perfect simulations often fail in reality due to unmodeled physics (like wheel slip), computational latencies, and the breakdown of the first-order Markov assumption caused by vehicle inertia.

This paper introduces an end-to-end DRL framework designed to overcome these mapping, scalability, and reality-transfer challenges.

Methods

The authors formulate online CPP as a Partially Observable Markov Decision Process (POMDP) and train a continuous control policy using Soft Actor-Critic (SAC). Their framework introduces several key innovations:

  • Multi-Scale Egocentric Maps: To handle large environments without computational bloat, the robot maintains coverage ($M_c$) and obstacle ($M_o$) maps at multiple spatial scales, all centered and aligned with the robot's current pose.
  • Frontier Maps ($M_f$): When downsampling maps to coarser scales, critical details about small, unvisited gaps can be lost. The authors introduce frontier maps that explicitly track the boundaries between covered and uncovered reachable space, ensuring that the existence of a frontier persists even at the coarsest map scale.
  • Scale-Grouped CNN (SGCNN): Standard CNNs struggle when different channels represent different physical scales. The proposed SGCNN architecture processes each scale independently using grouped convolutions, preserving spatial context before fusing the features.
The agent-environment interaction loop and multi-scale map representation.
  • Total Variation (TV) Reward: Standard area rewards encourage greedy behavior, often leaving behind thin, isolated stripes or holes that are costly to clean up later. By adding a reward term that minimizes the Total Variation of the coverage map, the agent is penalized for creating ragged boundaries, resulting in much cleaner paths.
  • Real-Time Asynchronous Architecture: To prevent the robot from acting on stale observations during training, the system parallelizes data collection and model updates across separate threads on the embedded hardware.
  • Semi-Virtual Sim-to-Real Pipeline: The authors bridge the simulation-to-reality gap by placing a physical robot in an indoor arena equipped with a motion-capture system. The robot experiences real-world kinematics and wheel slip, while the obstacles and sensors are simulated, allowing for safe, automated episode resets during real-world fine-tuning.

Datasets

The method was trained and evaluated using the following benchmarks and environments:

  • Explore-Bench: A standard autonomous exploration benchmark featuring six highly challenging simulated environments (e.g., Loop, Corridor, Corner, Rooms).
  • Procedural Map Generation: The authors built a procedural pipeline generating randomized grid-like floor plans and circular obstacle maps to train the agent via curriculum learning.
  • Real-World Evaluation Layouts: Six distinct custom map configurations mapped out in a $12 \times 12$ meter indoor research arena for physical testing.

Key Insights and Ideas

  • Grouped Convolutions are Essential for Multi-Scale Inputs: Treating multi-scale maps as standard image channels confuses conventional CNNs because spatial coordinates do not align across channels. Grouping them ensures convolution kernels only operate where spatial context is consistent.
  • TV Regularization Prevents "Greedy Striping": DRL agents optimized purely for area coverage tend to leave gaps because returning to fix a small sliver yields low immediate reward. Minimizing total variation forces the agent to maintain a compact, continuous coverage front.
  • Inference Frequency Dictates Markov Order: If a robot runs inference at an extremely high frequency (e.g., every 15 ms), a simple first-order policy transfers well because it can instantly correct for physical drift. However, at lower, energy-efficient frequencies (e.g., 500 ms), the policy must be higher-order—incorporating a history of past actions—to successfully navigate real-world inertia and latency.

Key Results

Simulation

  • Exploration: On Explore-Bench, the proposed method achieved a total coverage time of 1,061 seconds, easily outperforming the previous state-of-the-art Active Neural SLAM (2,228 seconds) and classical frontier-based methods.
  • Lawn Mowing: The DRL agent outperformed online Traveling Salesman Problem (TSP) baselines and closely approached the performance of the offline Backtracking Spiral Algorithm (BSA), despite having no prior knowledge of the map.

Real-World Deployment

The higher-order policy was successfully deployed on a physical Husqvarna Research Platform (HRP) robotic lawnmower.

FIGURE 1. Learned paths for exploration (left) and lawn mowing (right), including the start (red triangle) and end position (green square).
  • Directly transferring the model from simulation to the real robot at a 500 ms step size resulted in a 99% coverage time of 10.3 minutes.
  • After just 8 hours of online real-world fine-tuning (a tiny fraction of the time required to train from scratch), the policy adapted to the physical dynamics, reducing the 99% coverage time to 10.2 minutes and demonstrating a smoother, more efficient path with fewer redundant turns.
  • The framework also demonstrated strong generalization when deployed on an entirely different robot platform (an MiR100 mobile robot) with a severely restricted $90^\circ$ sensor field-of-view.

Limitations and Future Work

  • Localization Dependency: The real-world experiments relied on a highly accurate external motion-capture system. In practical outdoor scenarios, the system would need to integrate with an on-board SLAM module, introducing realistic localization noise.
  • Simulated Sensing in Sim-to-Real: While the robot's actuation and physical dynamics were real, the LiDAR data remained simulated within the semi-virtual environment.
  • Static Environments: The current framework assumes a static environment. The authors noted that preliminary tests with moving obstacles showed promise (the robot successfully dodged and planned around them), but systematic evaluation in dynamic or multi-agent settings remains future work.

Summary updated

Abstract

Coverage path planning (CPP) is the problem of finding a path that covers the entire free space of a confined area, with applications ranging from robotic lawn mowing to search-and-rescue. While for known environments, offline methods can find provably complete paths, and in some cases optimal solutions, unknown environments need to be planned online during mapping. We investigate the suitability of continuous-space reinforcement learning (RL) for this challenging problem, and propose a computationally feasible egocentric map representation based on frontiers, as well as a novel reward term based on total variation to promote complete coverage. Compared to existing classical methods, this approach allows for a flexible path space, and enables the agent to adapt to specific environment characteristics. Meanwhile, the deployment of RL models on real robot systems is difficult. Training from scratch may be infeasible due to slow convergence times, while transferring from simulation to reality, i.e. sim-to-real transfer, is a key challenge in itself. We bridge the sim-to-real gap through a semi-virtual environment, including a real robot and real-time aspects, while utilizing a simulated sensor and obstacles to enable environment randomization and automated episode resetting. We investigate what level of fine-tuning is needed for adapting to a realistic setting. Through extensive experiments, we show that our approach surpasses the performance of both previous RL-based approaches and highly specialized methods across multiple CPP variations in simulation. Meanwhile, our method successfully transfers to a real robot. Our code implementation can be found online.
BibTeX
@article{jonnarth2025sim,
  author = {Arvi Jonnarth and Ola Johansson and Jie Zhao and Michael Felsberg},
  title = {{Sim-to-Real Transfer of Deep Reinforcement Learning Agents for Online Coverage Path Planning}},
  journal = {IEEE Access},
  year = {2025},
  doi = {10.1109/access.2025.3581035},
}
Figure