Generating Tests for Robotized Painting Using Constraint Programming

Morten Mossige, Arnaud Gotlieb, Hein MelingIJCAI 2016

Abstract

In industrial robotics, painting requires precise synchronization between high-speed robot arms and Integrated Process Control (IPS) systems managing paint flow and air pressure. This paper details an automated testing framework developed by ABB Robotics and Simula Research Laboratory that utilizes Constraint Programming (CP) to address the timing complexities of these systems. By integrating a CP-based generator into a Continuous Integration (CI) pipeline, the framework creates and executes thousands of diverse, timing-sensitive test scenarios daily, successfully identifying defects that evade manual testing.

Introduction

Industrial painting is a high-stakes application where software must "look ahead" to compensate for physical response delays in pumps and actuators (typically 40–150 ms). Ensuring a perfect coat requires exact timing across multiple overlapping events. Testing these systems is traditionally difficult due to the astronomical number of possible event combinations and the rapid pace of modern software development, which demands automated verification within tight CI cycles.

System Architecture and Methodology

The core of the solution is a constraint optimization model built using SICStus Prolog and its clpfd (Constraint Logic Programming over Finite Domains) library. The system models the IPS's variables, including input sequences, system configurations, and "brush tables" that map paint patterns to actuator settings.

The IPS system architecture showing the interaction between the Robot Controller, IPS master, and individual controllers (C1, C2, C3).

As shown in Figure 1, the IPS master coordinates lookups and distributes timing data to various controllers. The CP solver is tasked with finding a sequence of tests that minimizes the total time spent both solving the constraints ($t_s$) and running the tests ($t_n$). This "good enough" optimization approach ensures that the testing process fits within the limited time window of a CI loop without sacrificing test quality.

Diverse Test Scenario Generation

To maximize bug-finding potential, the model is designed to generate diverse scenarios beyond simple "happy path" operations. It specifically targets complex timing overlaps and error states.

Visualization of different test scenarios: (a) Normal operation, (b) Overlap scenarios where events conflict, and (c) Kill scenarios that push the system into error states.

Figure 3 illustrates the three primary types of generated scenarios:

  1. Normal: Standard operational sequences.
  2. Overlap: Scenarios where multiple commands or state changes occur simultaneously, testing the system's ability to handle race conditions.
  3. Kill: Scenarios designed to trigger error handling and system shutdowns.

Results and Impact

The implementation of this CP-based framework has yielded significant results across 11 different IPS configurations:

  • Defect Detection: The system identified two previously unknown defects related to rare timing overlaps and successfully rediscovered five historical, "hard-to-find" defects used for validation.
  • Scalability: Approximately 20,000 distinct test scenarios are now executed daily, providing a level of coverage impossible to achieve manually.
  • Engineering Confidence: Beyond technical metrics, the system has fostered a cultural shift. Validation engineers, supported by a Python-based frontend that abstracts the underlying Prolog complexity, now have greater confidence in the software's stability, allowing for more aggressive code refactoring.

Conclusion

While Constraint Programming is often perceived as an academic tool, its application in industrial robotics demonstrates its effectiveness for solving "messy" timing problems. By prioritizing diversity and "good enough" optimization within a DevOps workflow, the authors have created a robust safety net for complex, high-speed industrial systems.

Summary updated

BibTeX
@inproceedings{mossige2016generating,
  author = {Morten Mossige and Arnaud Gotlieb and Hein Meling},
  title = {{Generating Tests for Robotized Painting Using Constraint Programming}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2016},
}
Figure