Sensors 23 09634
Sensors 23 09634
Article
Autonomous Trajectory Planning for Spray Painting on
Complex Surfaces Based on a Point Cloud Model
Saul Nieto Bastida 1 and Chyi-Yeu Lin 1,2, *
Abstract: Using teach pendants or offline programming methods can generate tool paths for robot
manipulators to carry out production activities, such as spray painting on objects of different ge-
ometries. This task, in which the complexity of painting the surface is one of the main challenges,
requires highly skilled operators. In addition, the time spent setting up a robot task can be justified
for the mass production of the same workpiece. However, it is inconvenient for low-production
and high-variation production lines. In order to overcome these challenges, this study presents an
algorithm to autonomously generate robot trajectories for a spray-painting process applied to objects
with complex surfaces based on input 3D point cloud data. A predefined spherical mesh wraps
the object, organizing the geometrical attributes into a structured data set. Subsequently, the region
of interest is extracted and isolated from the model, which serves as the basis for the automatic
path-planning operation. A user-friendly graphical user interface (GUI) is developed to define input
parameters, visualize the point cloud model and the generated trajectory, simulate paint quality
using a color map, and ultimately generate the robot’s code. A 3D sensor is used to localize the pose
of the workpiece ahead of the robot and adjust the robot’s trajectory. The efficacy of the proposed
approach is validated first by using various workpieces within a simulated environment and second
by employing a real robot to execute the motion task.
Citation: Nieto Bastida, S.; Lin, C.-Y. Keywords: autonomous path planning; free-form surface; point cloud based; spray painting
Autonomous Trajectory Planning for
Spray Painting on Complex Surfaces
Based on a Point Cloud Model.
Sensors 2023, 23, 9634. https:// 1. Introduction
doi.org/10.3390/s23249634
The popularization of autonomous production technologies in a wide variety of appli-
Academic Editor: Denis cations includes robotic spray painting, and researchers are working toward improving this
Laurendeau task in terms of efficiency and quality. The manual teaching method is the most commonly
used method for creating trajectories for industrial robots. This task is time consuming and
Received: 1 November 2023
relies mainly on the programmer’s technical expertise. Due to the complexity of an object’s
Revised: 26 November 2023
geometry, it can be challenging to accurately define the trajectory of the spray gun over all
Accepted: 29 November 2023
Published: 5 December 2023
the surfaces of the workpiece, affecting the quality of the final coating. The time-consuming
manual teaching method offers a suitable solution for mass production, but a more efficient
method is desirable for high-variety and small production lines.
During manual spraying, the paint is scattered into the surrounding environment, caus-
Copyright: © 2023 by the authors. ing chemical pollution and posing a severe risk to the health of the workers [1]. Spraying
Licensee MDPI, Basel, Switzerland. operations have been found to have high rates of reportable incidents by the Occupational
This article is an open access article Safety and Health Administration (OSHA) due to the nature of being an ergonomically
distributed under the terms and difficult job requiring the manipulation and fine control of tools for prolonged periods [2].
conditions of the Creative Commons Automatic systems have been developed [3] to solve the problems caused by traditional
Attribution (CC BY) license (https://
manual spraying. With significant advantages such as quality control, waste reduction,
creativecommons.org/licenses/by/
repeatability, and faster cycle times, automated painting is a viable solution to this problem.
4.0/).
These innovative elements inspired the idea of the autonomous robotic painting system
described in this research article.
Several techniques have been given in autonomous path planning and paint-deposition
simulations. Previous studies in autonomous path planning compared the benefits and
drawbacks of the existing approaches, most of which are based on tessellated representa-
tions in the “Standard Tessellation Language” (STL) format or 3D CAD models [4]. The
authors of [1] provide a more recent review of actual tool-path-planning approaches for
spray painting in which a point cloud is included as a geometrical representation of the
model. Another comparison was made in [5], which includes parametric models and tes-
sellated models as geometry representations but also considers how the model is obtained;
in this case, two methods were mentioned: a CAD-based method in which geometries
are generated using any existing CAD software and a sensor-based method which in-
cludes the use of sensors such as depth cameras, light detection and ranging (Li-DAR),
and coordinate-measuring machines. In [6], an offline automatic trajectory generation
approach based on free-form tessellated surfaces is presented. Still, it is limited to planar
and non-highly-curved surfaces considered a single patch. A similar procedure called
the “mesh following technique” was presented in [7] which is focused on generating tool
paths based on tessellated surfaces presenting holes and irregular edges. The authors of [8]
propose a method based on tessellated surfaces to create a total coverage trajectory using
a grid projected on the surface; however, it is limited to basic shapes, and the part must
be considered a single patch. Some advantages and disadvantages of using tessellated
surfaces listed by the authors of [4] are provided below.
Advantages:
• It is a simple surface representation method;
• The area and the normal vector of each small triangle are known and can be used to
represent the paint distribution on the entire surface;
• The triangulated surface is considered a single object.
Disadvantages:
• No geometrical information like edges;
• Mesh data are unorganized and more likely to present errors like overlapping facets
or data loss during surface reconstruction.
The size of the data set tends to be large and difficult to process. On the other hand,
automation systems with high product volumes frequently use CAD-based robot path
planning. It is desirable to create a complete 3D model of the robotic cell. Before creating
a program ready for robot operation, the user can test the reachability of the robot’s
movements and simulate the process [9]. Given the convenience of using 3D CAD model
features (face, wire, edges, etc.), the task of defining and generating a path to perform
a variety of industrial tasks (glue dispensing, welding, inspection, painting, etc.) is less
complicated than using STL files or a point cloud, which is based on an unorganized
set of points and edges. Some commercial software, such as Robotmaster® 2023 (Saint-
Laurent, QC, Canada), Visual Components Robotics OLP 4.8.0 (Espoo, Finland), and Dürr®
DXQ3D.onsite process simulation tool (Stuttgart, Germany), offers advanced CAD-model-
based path-planning functions specifically for spray-painting tasks in which it is only
necessary to input some spray parameters to obtain a robot trajectory and a paint-deposition
simulation as outputs. Other approaches, as in [10,11] in which an OLP platform based on
Open CASCADE Technology (OCCT) [12] was presented, used CAD information to create
a 3D scan and a glue application trajectory and to generate a robot program. Reference [13]
presents a form of CAD-based trajectory optimization, but an initial trajectory must be
defined as an input before the algorithm can optimize the point position to achieve the
desired paint thickness quality on the surface. The algorithm works efficiently on low-
complexity surfaces but has not been demonstrated on high-complexity surfaces. An
autonomous CAD-based robot-path-planning system has been created for spray painting
on compound surfaces, common in the automotive manufacturing industry [14]. The area-
Sensors 2023, 23, 9634 3 of 23
weighted average of larger patches generated by stitching together small surfaces is used in
this method to estimate the spray gun’s orientation. Some advantages and disadvantages
of using 3D CAD models [4] are listed below.
Advantages:
• Achieving an accurate illustration of a component’s geometry, including solids, sur-
faces, splines, arcs, lines, points, and other features;
• Information about the material is included.
Drawbacks:
• Every feature is independent. The more complex the object, the more individual its
features, making analysis more difficult;
• If the paint quality is to be evaluated, a mesh representation must be generated.
Other related works, such as [15], describe vision-based measurement devices that
determine the target points of the spray gun by measuring the relative posture between the
painting end effector and the surface. Although studies on CAD- or mesh-based tool path
planning for controlling robot arm motion have been conducted, techniques for complex
spraying tasks employing 3D point cloud model data are still mostly unexplored. The
authors of [16] described a point-cloud-based tool-path-planning method; however, the
path-planning algorithm works only on simple surfaces with rectangular edges and edges
aligned with the x and y axes. A slicing method in point clouds was presented in [17] which
is suitable for simple surfaces and functions by intersecting parallel planes in a determined
direction. It depends on properly selecting a piece’s orientation to define the slicing plane
orientation and the corresponding path points. In a recent research study, machine-learning
techniques were explored [18], and five data-driven conceptual approaches that have the
potential to improve the efficiency of solving trajectory planning by taking advantage of
existing data sets to generate new tasks based on their similarity to previous ones were
proposed.
Industries have experienced a rise in demand for effective spraying applications on
workpieces of various complex surfaces, which calls for more robust and effective methods
for quantifying geometric data and path-planning techniques. Most shape recognition
algorithms rely on geometrical features or shape boundary information. Reconstructing
scanned geometries as they would have originally been built using CAD processes, i.e.,
as lofted cross sections along a path, remains a significant challenge in digital shape
reconstruction.
2. System Overview
This work aims to create an autonomous path-planning system for advanced spraying
jobs on workpieces with complex surface geometries, employing either a point cloud or
a CAD model of the work piece, and a 6-DOF manipulator as the painting robot. In this
work, a novel method for trajectory planning in spray-painting applications is proposed,
where a predefined spherical mesh grid is used to wrap a point cloud and approximate
the surface geometry in an organized set of points. The use of a variable paint flux is also
proposed to improve the paint thickness quality based on paint thickness simulation and
constant spray-gun velocity optimization.
In order to accomplish complete paint coverage of the section of interest, the first step
involves using a sampling algorithm to obtain a point cloud from a 3D CAD model or
directly from a 3D scanning system. In the second step, the parameters for spray painting
are defined, along with a mathematical model of paint deposition on the surface. This
is followed by the third step, in which the proposed path planning algorithm extracts
geometrical information from the point cloud and generates a raster pattern. In the fourth
step, the robot velocity and spray-paint flux are calculated to guarantee that the paint film
thickness stays within a predetermined range. Finally, the obtained trajectory and the
parameters are converted into a robot program to carry out the task in a production line, as
depicted in Figure 1.
Sensors
Sensors2023,
2023,23,
23, x9634
FOR PEER REVIEW 4 of 23
4 of 23
Figure1.1.Autonomous
Figure Autonomousspray-painting
spray-painting system
system workflow.
workflow.
The
Themain
maincontributions
contributions ofof
the work
the presented
work in this
presented paper
in this to address
paper the challenges
to address the challenges
of autonomous trajectory planning can be described as follows:
of autonomous trajectory planning can be described as follows:
• The trajectory is generated using only a point cloud as the workpiece’s geometrical
• The trajectory is generated using only a point cloud as the workpiece’s geometrical
information. The point cloud can be generated through 3D scanning or generated
information. The point cloud can be generated through 3D scanning or generated
from a CAD model;
from a CAD model;
• An algorithm for generating spray-painting trajectories autonomously that achieve
• An coverage
full algorithmoffor generating
a complex spray-painting
surface while keepingtrajectories
the paint autonomously that achieve
film thickness within a
full coverage
given range; of a complex surface while keeping the paint film thickness within a
• Agiven range;
trajectory-generation algorithm capable of addressing the challenges presented
• A trajectory-generation
by complex surfaces like algorithm capable
complex shapes, of addressing
holes, the challenges
cavities, irregular presented
edges, and high by
complex surfaces like complex shapes, holes, cavities, irregular edges, and high
roughness;
• roughness;
The ability to handle workpieces in non-predefined orientations without the use of
• special fixtures
The ability to or established
handle positions;
workpieces in non-predefined orientations without the use of
• Aspecial
simulation of paint
fixtures thickness topositions;
or established validate the generated trajectory in a virtual environ-
• ment and use this
A simulation information
of paint to improve
thickness the the
to validate spraying parameters
generated as the
trajectory inpaint flux.envi-
a virtual
In more detail,
ronment Section
and use this 3information
presents a generalized
to improvemethodology
the spraying to automate the
parameters gen-paint
as the
eration of spray-painting paths and 3D surface reconstruction based on 3D point cloud
flux.
data; Section 4 provides the mathematical model used to calculate the paint deposition
In more detail, Section 3 presents a generalized methodology to automate the gener-
on free form surfaces; Section 5 describes the proposed path planning algorithm based on
ation of spray-painting paths and 3D surface reconstruction based on 3D point cloud data;
“wrapping” the point cloud to extract the surface of interest; Section 6 presents the robot
Section 4 provides the mathematical model used to calculate the paint deposition on free
end effector velocity calculation approach used on this research; and Section 7 details the
form surfaces;
variable Section
paint flux 5 describes
calculation the proposed
to improve path planning
the uniformity algorithm
on the paint based
film, of whichonthe
“wrap-
proposed algorithm was evaluated in a simulated environment to validate its efficacy and end
ping” the point cloud to extract the surface of interest; Section 6 presents the robot
effector velocity
efficiency. Severalcalculation
case studiesapproach usedworkpiece
with different on this research; anddiscussed
shapes are Section 7in details the8 var-
Section
iable
to paint the
illustrate fluxpotential
calculation to improve
to use the uniformity
our approach on the
to create paths for paint film,tasks,
spraying of which the pro-
followed
posed
by algorithm
a conclusion wasresearch
of the evaluated incompleted
work a simulated for environment to validate
this article in Section 9. its efficacy and
efficiency. Several case studies with different workpiece shapes are discussed in Section 8
3.
toMaterials
illustrate and Methods to use our approach to create paths for spraying tasks, followed
the potential
by aAutonomous
conclusion oftasks using computer
the research vision andfor
work completed robotic systems
this article can be described
in Section 9. as
a Sense–think–act process. In the case of autonomous spray painting, the “sensing” sec-
tion belongs to
3. Materials andthe 3D scanning process where the part’s geometry and environment
Methods
configuration are obtained; a computer performs the “think” section by applying specific
Autonomous tasks using computer vision and robotic systems can be described as a
algorithms to extract the geometrical information of the part; and finally, the spraying
Sense–think–act process.
paths and associated robotIn the caseinformation
trajectory of autonomous spray
for the painting,
robot the “sensing”
are generated section
to perform
belongs to the 3D scanning
the painting “action”. process where the part’s geometry and environment configu-
ration are on
Based obtained; a computer
a 3D point performs
cloud model the “think”
representing sectionaby
a workpiece, applying specific
spray-painting path isalgo-
generated to achieve total coverage of a 3D part with a complex shape. The point cloud ispaths
rithms to extract the geometrical information of the part; and finally, the spraying
and associated robot trajectory information for the robot are generated to perform the
painting “action.”
Sensors 2023, 23, x FOR PEER REVIEW 5 of 23
Sensors 2023, 23, x FOR PEER REVIEW 5 of 23
Figure 2. Autonomous
Figure 2.
2. spray-painting
Autonomousspray-painting system
spray-paintingsystem architecture.
systemarchitecture.
architecture.
Figure Autonomous
3.1. Acquisition of the 3D Point Cloud
3.1. Acquisition of the 3D Point Cloud
When working with the 3D point cloud data-based path planning for autonomous
When working with the 3D point cloud data-based path planning for autonomous
spraying implementation, the critical challenge is the model reconstruction of 3D scanned
spraying
workpieces. implementation,
The 3D pointthe
3D point critical
cloud challenge
model theisworkpiece
of the the model can
workpiece reconstruction
obtainedofin
be obtained in3Dtwoscanned
ways:
The cloud model of can be two ways:
workpieces. The 3D point cloud model of the workpiece can be obtained in two ways:
either directly
directlyfromfroma a3D3D scanning
scanning technique
technique or byortransforming
by transforming an existing 3D CAD
an existing 3Dmodel
CAD
either
into andirectly
STLan from as
format, a depicted
3D scanning technique
in Figure andor by to
transforming an existing 3Dpresent
CAD
model into STL format, as depicted in 3,
Figure then
3, and point
then to cloud
pointformat. In the
cloud format. In the
model into functions
approach, an STL format,
from the as depicted
open3D in Figure
library 3, and then
(version 0.15.0)to [19]
point are cloud
used format. In the
present approach, functions from the open3D library (version 0.15.0) [19] areto readto
used point
read
present
cloudcloudapproach,
data from functions from the open3D aslibrary (versionetc. 0.15.0) [19] are used to read
point data different
from differentfile formats such such
file formats ply,
aspcd,
ply, xyz,
pcd, xyz,Alternatively,
etc. Alternatively, a uniform
a uni-
point cloud
sampling data from
algorithm candifferent
transform file the
formats
STL such asinto
format ply,apcd,
3D xyz, etc.
point Alternatively,
cloud. The Poisson a uni-
disk
form sampling algorithm can transform the STL format into a 3D point cloud. The Poisson
form sampling
sampling method algorithm can
[20] is[20]
used transform the STL format into a 3D point cloud. The Poisson
disk sampling method is in
usedtheinpresent case because
the present it can evenly
case because distribute
it can evenly the points
distribute the
disk sampling
on the mesh method [20] is used in the present case because it can evenlyof distribute the
points on thesurface. Another
mesh surface. feature
Another of this
feature algorithm
of is that the
this algorithm number
is that the number sample points
of sample
points
can beon the mesh
defined, as surface.
wellasaswellAnother
the minimum feature of this algorithm
distance between is that
two the numberpoints.
neighboring of sampleThe
points can be defined, as the minimum distance between two neighboring points.
points
more can be points
sample defined, as well
used, the as theaccurate
more minimum the distance
3D between two
representation of neighboring
the object will points.
be, but
The more sample points used, the more accurate the 3D representation of the object will
The
a morecomputation
longer sample points timeused,
is the more
required to accurate
process the data.
the 3D representation of the object will
be, but a longer computation time is required to process the data.
be, but a longer computation time is required to process the data.
cloud to contain noisy or unnecessary information that should be removed. The steps to
prepare the point cloud are presented in Figure 3, depending on the source of the point
cloud data. First, remove unnecessary sections such as fixtures, floors, or other scenes
which were unavoidably recorded during the scanning process. Second, remove points at
which the number of neighbors is less than a threshold inside a given sphere radius around
them to eliminate sampling noise. Third, perform a point cloud down sampling; in this
case, 10,000–20,000 points are shown to be enough to represent a workpiece properly. If
the number of points exceeds that, a uniform sampling using the Poison disk algorithm is
performed. The last step is to adjust the position and orientation of the model according
to the actual pose during the spraying process, considering that the object can be hung or
mounted on a particular fixture.
1 n 1 n 1 n
n i∑ n i∑ n i∑
xm = xi , ym = yi , zm = zi (1)
=1 =1 =1
where n is the number of points in the 3D model. By subtracting the mean from each data
point, the data variance values can be computed as:
1 n
n − 1 i∑
σxx 2 = ( x i − x m )2 , (2)
=1
1 n
n − 1 i∑
σxy 2 = ( xi − xm )(yi − ym ), etc. (3)
=1
where σxx 2 is the variance of x and σxy 2 , the cross covariance between the x and y variables.
This gives as a result a 3-by-3 square matrix C:
3.3.2.3.3.2. Spherical
Spherical Mesh Mesh
GridGrid Generation
Generation
The most commonly
The most commonly used bounding used bounding volumes
volumes to “wrap”
to “wrap” or encapsulate
or encapsulate a point
a point cloudcloud
are AABB,
are AABB, oriented
oriented bounding
bounding boxes boxes
OBB,OBB, and and spheres
spheres [21],[21],
withwith
mostmost research
research focusing
focusing
on applications such as collision avoidance and 3D reconstruction. In the current case, thecase,
on applications such as collision avoidance and 3D reconstruction. In the current
theissphere
sphere is the
the most most generalized
generalized shape because
shape because its equation
its equation only requires
only requires a radiusaand
radius
the and
center coordinates, making computation easier in a variety of applications. For this appli- this
the center coordinates, making computation easier in a variety of applications. For
application,
cation, a sphere isa more
sphere is more advantageous
advantageous than AABB than
andAABB and OBB
OBB because because it surrounds
it surrounds an object an
object on all sides and is effective at encapsulating both irregular
on all sides and is effective at encapsulating both irregular and basic shapes. AABB and and basic shapes. AABB
and OBB are more suitable and limited to basic shapes
OBB are more suitable and limited to basic shapes with a “box-like” geometry. with a “box-like” geometry.
A sphere is created to “wrap” the working part, which is an organized set of points
A sphere is created to “wrap” the working part, which is an organized set of points
and its triangulation that is meant to suffer a deformation to obtain a surface shape. A
and its triangulation that is meant to suffer a deformation to obtain a surface shape. A
spherical mesh grid is shown to have better results when approximating complex surfaces
spherical mesh grid is shown to have better results when approximating complex surfaces
by obtaining more information about the curvature than AABB or OBB, with the challenge
by obtaining more information about the curvature than AABB or OBB, with the challenge
of finding a proper position for the center of the sphere. Firstly, the mesh grid is created
of finding a proper position for the center of the sphere. Firstly, the mesh grid is created
based on these parameters: sphere center Sc , sphere radius Sr , and sphere resolution Sdeg ,
based on these parameters: sphere center Sc, sphere radius Sr, and sphere resolution Sdeg,
which defines the angular separation between points (Figure 5a,b), with a smaller Sdeg value,
which defines the angular separation between points (Figure 5a,b), with a smaller Sdeg
but the number of points on the sphere S increases and the computation time also increases.
value, but the number of points on the sphere S increases and the computation time also
The data on this sphere are represented by a set of vertexes S = {(xi , yi , zi )} where i = 1, 2,
increases. The data on this sphere are represented by a set of vertexes S = {(xi, yi, zi)} where
3. . .m, and m is the number of points in the sphere. A set of normal vectors corresponding
i = 1, 2, 3…m, and m is the number of points in the sphere. A set of normal vectors corre-
to each vertex, SN = {(Nxi , Nyi , Nzi )} where i = 1, 2, 3. . .m, a triangulation between these
sponding
pointstoiseach vertex, Sby
represented N = {(Nxi, Nyi, Nzi)} where i = 1, 2, 3…m, a triangulation between
ST = {(p1i , p2i , p3i )} where i = 1, 2, 3. . .n, and n is the number of
thesetriangles
points isrepresenting
represented by theSsurface,
T = {(p1i, p2i, p3i)} where i = 1, 2, 3…n, and n is the number of
and p1i , p2i , p3i are the points in S that connected in
triangles representing the surface,
the order [p1i , p2i , p3i , p1i ] forms andthep1itriangle
, p2i, p3i are the points
i. Figure in S that
5a,b show theconnected in thegrid
spherical mesh
with different resolutions, while in Figure 6 a section of the triangulation is represented,
including points, normal vectors, and triangles.
Sensors2023,
Sensors 2023,23,
23,xxFOR
FORPEER
PEERREVIEW
REVIEW 88 of
of 23
23
(a)
(a) (b)
(b) (c)
(c) (d)
(d)
Figure5.5.(a)
Figure (a)Spherical
Sphericalmeshmeshgrid
gridand
andnormal
normalvectors
vectorswith
withSSSdeg
deg = 20°; (b)Spherical
20◦ ; (b) Sphericalmesh
meshgrid
gridand
and
Figure deg == 20°; (b) Spherical mesh grid and
normal
normal vectors with S deg = 5°; (c,d) Point cloud P and the spherical grid S for two metallic parts.
normal vectors
vectors with
with SSdeg = 5°;◦(c,d) Point cloud P and the spherical grid S for two metallic parts.
deg = 5 ; (c,d) Point cloud P and the spherical grid S for two metallic parts.
Figure6.6.Representation
Figure
Figure Representationof
Representation ofthe
of thedata
datacontained
containedon
onsphere
spheregrid,
grid,points
pointsp,p,normal
normal(S
normal (SNij
(S ),and
Nij),
Nij),
andtriangle
and triangle
triangle
inblue.
in
in blue.
blue.
3.3.3. Wrapping
3.3.3.Wrapping
WrappingMethod Method
Methodfor for Convex
forConvex
Convexand and Concave
andConcave Surfaces
ConcaveSurfaces
Surfaces
3.3.3.
After defining
Afterdefining
definingthe the sphere
thesphere
sphereSSand S and
anditsits center
itscenter S asas
centerSSc,c,as shownininFigure
shown Figure5c,d,
5c,d,the
thenext
next step
step
After c,
shown in Figure 5c,d, the next step isis
is
to to “wrap”
“wrap” the
the current
current point
point cloud
cloud by by
usingusing
the the
spheresphere
S. The S. The
methodmethod consists
consists of an of an
itera-
to “wrap” the current point cloud by using the sphere S. The method consists of an itera-
iterative operation
tive operation
operation of decreasing
of decreasing
decreasing thethe sphere
sphere radius
radius byby a givendistance
distance∆𝑑 ∆d on
on each
each iteration
tive of the sphere radius by aa given
given distance ∆𝑑 on each iteration
iteration
until
until it
it reaches
reaches the
the center
center S
S cc. At the same time, for each point on the sphere S,
. At the same time, for each point on the sphere S, aa neighbor
neighbor
until it reaches the center Sc. At the same time, for each point on the sphere S, a neighbor
search
searchis is performed
isperformed
performedto to find
to find any any point
pointon onthethepoint
pointcloudcloud Pwithin
withina agiven
given search radius
search find any point on the point cloud PPwithin search
a given search radius
radius rrs.s.
rWhen
s . When a point is found, the point on the sphere is projected in the point cloud P and
When aapoint pointisisfound,
found,the thepoint
pointon onthe
thesphere
sphereisisprojected
projectedin inthe
thepoint
pointcloud
cloudPPand andstops
stops
stops
moving moving
towards towards
the the center
center of the of the sphere
sphere S. In S. In Figure
Figure 7b, a 7b, a graphical
graphical representation
representation of the
moving towards the center of the sphere S. In Figure 7b, a graphical representation of the
of the algorithm
algorithm is is presented.
presented. As the As the
point pointgeometry
cloud cloud geometry
might mightfeatures
present present thatfeatures
allow that
for
algorithm is presented. As the point cloud geometry might present features that allow for
allow
finding forpoints
finding on points
the on the
inner innerofsurface
surface the ofas
part, the part, as
shown in shown
Figure in Figure
8a, a 8a, a condition
stopping stopping
finding points on the inner surface of the part, as shown in Figure 8a, a stopping condition
condition is added to the algorithm to prevent this from happening. In this case, a point pij
in S moving towards the center of the sphere will be stopped after one of the four adjacent
neighbor points finds a point in point cloud P. In Figure 8a, the red line represents points
that stopped after finding a point in the point cloud P without any stopping condition.
Sensors 2023, 23, x FOR PEER REVIEW 9 of 23
Sensors 2023, 23, x FOR PEER REVIEW 9 of 23
is added to the algorithm to prevent this from happening. In this case, a point pij in S
Sensors 2023, 23, 9634 ismoving
added towards
to the algorithm
the centertoofprevent
the sphere this from
will be happening.
stopped after In thisonecase,
of the a point pij 9inofS23
four adjacent
moving
neighbortowardspoints findsthe center
a pointofinthe sphere
point cloud will
P. be stopped
In Figure 8a,after
the redonelineof the four adjacent
represents points
neighbor
that stopped points finds
after a point
finding in point
a point in the cloud
pointP. cloud
In Figure 8a, the any
P without red stopping
line represents points
condition. In
that
Figurestopped
In Figure 8b,8b, after
thethe finding
redred line a point
represents
line represents in the
points point
pointsthat cloud
thatstoppedP without
stoppedafter any
afterfinding stopping
findingaapoint condition.
pointin in the
the point In
point
Figure
cloud
cloud PP 8b,orthe
or when
when redreaching
line represents
reaching aa given points that
given number
number of stopped after
of iterations
iterations afterone
after finding
one of
of the
thea adjacent
point in points
adjacent the point
points had
had
cloud
been P or when reaching a given number of iterations after one of the adjacent points had
been stopped.
stopped.
been stopped.
Once the
Once the surface
surface wrapping
wrapping is is complete,
complete, the normal vector vector SNN must must be be updated
updated to to
Once the
represent
represent the surface
theproper wrapping
properdirection
direction ofofis
the complete,
the local
local the section.
surface
surface normal
section.vector
At SN must
At same
the the time,be
same a updated
time, a normal
normal to
vec-
represent
vector
tor the proper
is calculated
is calculated direction
by obtaining
by obtaining of the
the local
average
average surface
of the
of the section.
normal
normal At theofsame
vector
vector of
each time,
each
line linea that
normal
that vec-a
connects
connects
a point
tor
point pijpwith
ij with
is calculated itsits
by adjacent
obtaining
adjacent neighbors
the average
neighbors ininallall
of directions.
the normal
directions. Figure
vector
Figure 7c7cof
shows
each the
shows thenormal
line normal between
that connects
between a
two points
point
two points
pij withininits
black
adjacent
black dotted
dotted lines, and
neighbors
lines, and thedirections.
in the
all averagenormal
average normal
Figureat at that
7cthat
shows point
point theisisnormal
shownbetween
shown ingreen.
in green.
Thepoints
two
The “wrapping
“wrapping in blackalgorithm”
dotted lines,
algorithm” contracting
and the average
by contracting the sphere
the sphere
normalis helpful
is helpful
at thatforfor
pointconvex
is shown
convex surfaces where
in green.
surfaces where
an exterior
The
an exterior
“wrapping surface is of
algorithm”
surface is of interest.
by contracting the sphere is helpful for convex surfaces where
an exterior surface is of interest.
(a) (b)
(a) (b)
Figure 8. Example of how the wrapping algorithm works on planar surfaces: (a) the inner surface
of the object
Figure
Figure is considered;
8.8.Example
Example ofofhow (b)wrapping
howthe
the a parameter
wrapping stops the
algorithm
algorithm wrapping
works
workson algorithm
onplanar
planar from
surfaces:
surfaces:(a)touching
(a)the
theinnerthe
inner inner
surface
surface
surfaces.
of the object is considered; (b) a parameter stops the wrapping algorithm from touching the
of the object is considered; (b) a parameter stops the wrapping algorithm from touching the innerinner
surfaces.
surfaces.
3.3.4. Surface Extraction and Preprocessing
3.3.4. As
Surface Extraction
described and Preprocessing
in Section
3.3.4. Surface Extraction and3.3.3, a surface triangulation ST is already defined to have an
Preprocessing
As described
organized in Section
set of data; however, 3.3.3,after
a surface triangulation
performing ST is already
the wrapping method, defined
onlyto have
the an
points
As described in Section 3.3.3, a surface triangulation ST is already defined to have an
organized
on sphere set
S of data;
that touch however,
the point after
cloud performing
P are of the wrapping
interest; as a method, only
consequence, the the
restpoints
of the
organized set of data; however, after performing the wrapping method, only the points on
on sphere S that
points touch the point cloud P are of byinterest; as
an aidentifier
consequence, the rest ofpoint
the
spheremust S thatbe ignored.
touch It is
the point easy
cloudtoPseparate
are of interest; adding
as a consequence, or
theflag
resttoofeach
the points
points
that mustatbe ignored. It during
is easy to theseparate by adding anthat
identifier or flag totoeach point
muststopsbe ignored.some points
It is easy to separate process, and
by adding points
an identifier goorallflag
the way
to each the center
point that
that
of stops
the at some
sphere are points during
ignored. Figure the
9a,bprocess,
present andthepoints
wrappingthat go all the way
algorithm after tocontraction,
the center
stops at some points during the process, and points that go all the way to the center of the
of
andthethe
sphere sphere
are areof
surface
ignored. ignored.
FigureFigure
interest is
9a,b 9a,b present
isolated.
present Inthe the wrapping
thewrapping
same way, algorithm
a growing
algorithm aftersphereaftercancontraction,
contraction, extract
and thein-
and the
formation surface
from of interest
concave or is isolated.
inner In
surfaces, the assame
shown way,
in a growing
Figure
surface of interest is isolated. In the same way, a growing sphere can extract information 9c,d. sphere can extract in-
formation
fromItconcave fromorconcave
is essential or inner
to mention
inner surfaces, surfaces,
that
as the
shown as
in shown
path-planning insystem
Figure 9c,d. Figure is 9c,d.
intended to work directly
on theItItis3Dessential
point to mention
cloud, so only that
thethe path-planning
set of a vertex in
is essential to mention that the path-planning system is intendedsystem
the is
sphere intended
S and its totocorresponding
work
workdirectly
directly
on the 3D point cloud, so only the set of a vertex in the sphere
on the 3D point cloud, so only the set of a vertex in the sphere S and its corresponding S and its corresponding
normal vectors are of interest for this process. The corresponding triangulation ST is useful
for paint deposition simulation and paint quality validation after the trajectory is created.
Sensors 2023,
Sensors 23,23,
2023, x FOR PEER
x FOR REVIEW
PEER REVIEW 1010ofof2323
(a)(a) (b)
(b) (c)(c) (d)
(d)
Figure
Figure9.9.Surface extraction byby“wrapping” the workpiece: (a) point cloud wrapping; (b) external
Figure 9. Surface extraction “wrapping” the workpiece: (a) point cloud wrapping; (b) external
surface
surfaceofof
interest; (c)(c)
interest; sphere growing
sphere toto
growing extract the
extract inner
the innersurface ofof
surface the workpiece;
the (d)
workpiece; internal
(d) sur-
internal sur-
surface of interest; (c) sphere growing to extract the inner surface of the workpiece; (d) internal
face of
face interest.
of interest.
surface of interest.
4.4.Paint
Paint
Paint Deposition
Deposition
Deposition Model
Model
Model ofofFree-Form
Free-FormSurface
Surface
The
The geometric shape of free-form surfacesand
geometric shape of free-form surfaces andthethesophistication
sophisticationofofspray spraypatterns
patterns
generated
generated by current paint atomizers make this challenging. In this work, the paintdepo-
generated bybycurrent
current paint atomizers
paint atomizersmake this
make challenging.
this challenging.In this work,
In this the paint
work, the paint
depo-
sition is modeled
deposition is as
modeled conical,
as and the
conical, andspray
the pattern
spray is circular
pattern is when
circular
sition is modeled as conical, and the spray pattern is circular when the spray gun is per- the
when spray
the gun
spray is per-
gun is
pendicular
perpendicularto a planar
to a surface,
planar as presented
surface, as by
presented [6]
byand
[6]shown
and in
shown Figure
in
pendicular to a planar surface, as presented by [6] and shown in Figure 10a, where r is the 10a,
Figure where
10a, r
whereis the
r is
distance
distance of
the distance any point
of any
of any point p in
point the
p inpthe point
in the cloud
point
point P
cloud
cloud within
P within the
P within spray
thethe circle
spray
spray to the
circle
circle center
to the
to the of
center
center it;
of of φ is
it; it;
φ isϕ
the
is angle
thethe
angle between
angle between
between thetheline
lineformed
the line from
formed
formed from the
thespray
from the nozzle
spray
spray totothe
nozzle
nozzle topoint
the p pand
the point
point andpthe
thecenter
and line
the center
center line
ofofthe
line conus;
of
the h hand
the conus;
conus; andhRand
Rare
aredefined
Rdefined ininTable
are defined 1.1. 1.
in Table
Table
(c)(c) (d)
(d)
(a)(a) (b)
(b) (e)(e) (f)(f)
Figure
Figure10.10.
Paint deposition
Paint deposition model
modelononfree
free form
formsurfaces.
surfaces. (a)(a)
Spray-gun
Spray-gun model with
model a circular
with pattern;
a circular pattern;
Figure
(b) 10. Paint deposition model onvarying
free form surfaces. (a) Spray-gun model with a circular pattern;
(b) beta paint distribution model for varying β; and a circular paint deposition model on aplanar
beta paint distribution model for β; and a circular paint deposition model on a planar
(b) beta
surface, paint distribution model for varying and a circular paint deposition model on a planar
surface,with
withradius RR= =5050
mmmmfor:
for:(c)(c)β β
= =1.5;
1.5;(d) ββ= =2;2;(e)(e)
β β= =4,4,(f)(f)β β
= =8.8.
β;
radius (d)
surface, with radius R = 50 mm for: (c) β = 1.5; (d) β = 2; (e) β = 4, (f) β = 8.
The
The coating
coating thickness delivery model isisessential for spray profile
profilepreparation
preparationand
efficiency coating thickness
The optimization. thickness delivery
delivery
Earlier
model is essential
essential for
modelimplemented
researchers for spray
spray profile
mathematical preparation
methods
and
and
totoim-
efficiency
efficiency optimization.
optimization. Earlier researchers
Earlier including
researchersthe implemented
implemented mathematical
mathematical methods
methodsoftoinfinite-
improveim-
prove
prove thethespraying
spraying simulations,
simulations, including theCauchy
Cauchy distribution
distribution mechanism
mechanism of infinite-
the spraying
range models simulations,
[25], the including the[26],
Cauchy distributionmodels
mechanism ofare
infinite-range
range
models models
[25], the[25], theGaussian
Gaussian Gaussian model
modelmodel [26],the
[26], the thefinite-range
finite-range
finite-range models
models
which
which which arethe
are the thepara-
para-
parabolic
bolic
bolic distribution
distribution model [27], β-distribution model [28], the ellipse dual-β distribution
distribution model model [27], β-distribution
[27], β-distribution model [28],model [28], the
the ellipse ellipse
dual-β dual-β distribution
distribution model [29],
model
model [29],
[29], and
and others.
others. All
Allthese
these models
models are
are based
based ononcurve
curvefitting
fitting that isisdesigned
that designed for
for
and others. All these models are based on curve fitting that is designed for specific spray
specific
specific spray
spray guns.
guns. However,
However, experimental
experimental methods
methods offer
offer higher
higher accuracy
accuracy ininthe approx-
the approx-
guns. However, experimental methods offer higher accuracy in the approximation for
imation
imation forforthis
thisspecific
specific task. AA2D 2Ddeposition model
modelrepresented bybya aGaussian deposition
this specific task. A 2D task.
deposition deposition
model represented represented
by a Gaussian Gaussian
deposition deposition
model is
model
model is built
is built where
where the
theconcept
concept is approximated
is approximated using
using a collection
a collection of
ofdata
data consisting
consisting ofof
built where the concept is approximated using a collection of data consisting of thickness
thickness
thickness measurements
measurements on allallspots sprayed onona aplanar sheet [30],
[30],which
whichisissupple-
measurements on all spotson sprayed spots
on asprayed
planar sheet [30],planar sheet
which is supplemented supple-
by using
mented
mented by using a similar method and approximation of the Gaussian parameters bybyus-
a similarby using aand
method similar method andofapproximation
approximation of the Gaussian
the Gaussian parameters parameters
by using the Bayesian us-
ing
ingthe
theBayesian
Bayesian structured
structured algorithm and andthe thegenetic algorithm [31].
structured algorithm and thealgorithm
genetic algorithm genetic
[31]. algorithm [31].
For this research, the β-distribution model is used as it offers more flexibility to repre-
sent different patterns, including parabolic distribution (β = 1.5) and Gaussian distribution
Sensors 2023, 23, x FOR PEER REVIEW 11 of 23
Sensors 2023, 23, 9634 For this research, the β-distribution model is used as it offers more flexibility to11rep-
of 23
resent different patterns, including parabolic distribution (β = 1.5) and Gaussian distribu-
tion (β = 8), by changing the value of the parameter β as shown in Figure 10b. A colormap
representation of different
(β = 8), by changing β values
the value is represented
of the parameter βinasFigure
shown10c–f.
in Figure 10b. A colormap
representation of different β values is represented in Figure 10c–f.
Table 1. Input and output parameters for an autonomous spray-painting system.
Table 1. Input and output parameters for an autonomous spray-painting system.
Input Parameters Output Parameters
Paint flux Q Input Parameters Radius ofOutput
spray Parameters
circle R
Desired thickness
Paint flux Q qd Overlap
Radius distance
of spray circle Rd
Allowed thicknessqdvariation qs
Desired thickness Spray-gun
Overlap distancevelocity
d v
β thickness variation qs
Allowed
Value Spray-gun velocity v
Value β
Spray-gun efficiency η
Spray-gun efficiency η
Spray-gun
Spray-gunangle
angle θθ
Spray-gun
Spray-gun standoff hh
standoff
The spray-paint parameters needed to create a trajectory can be divided into two
The spray-paint parameters needed to create a trajectory can be divided into two
groups: parameters defined by the user, or inputs; and parameters that need to be calcu-
groups: parameters defined by the user, or inputs; and parameters that need to be calculated,
lated, or output parameters. Table 1 shows the list of parameters. The outputs parameters
or output parameters. Table 1 shows the list of parameters. The outputs parameters are
are calculated
calculated as follows:
as follows:
R𝑅==hℎtan
𝑡𝑎𝑛(θ 𝜃
) (6)
(6)
The overlap
The distancedd of
overlap distance of two
two adjacent
adjacent passes
passesisis aa crucial
crucial parameter
parameterto tobe
be managed,
managed,
since the
since the paint
paint distribution
distribution onon aa planar
planar surface
surface is
is not
not uniform.
uniform. TheThe overlap
overlap distance
distance helps
helps
to compensate
to compensate forfor this
this difference
difference byby considering
considering twotwo paint
paint passes
passes on
on specific
specific sections
sections of
of
the surface along the path, as shown in Figure 11. Considering the β-distributed
the surface along the path, as shown in Figure 11. Considering the β-distributed model to model to
represent the paint thickness, a clear and more practical estimate of the overlap
represent the paint thickness, a clear and more practical estimate of the overlap distance distance is
feasible instead of approximating the paint distribution to parabolic or Gaussian.
is feasible instead of approximating the paint distribution to parabolic or Gaussian.
Figure
Figure 11.
11. Overlap
Overlapdistance
distance for
for aa circular
circular spray
spray pattern
pattern on
on aa planar
planar surface.
surface.
The
The coating deposition
depositiondiffusion
diffusionmodel
modelisisinfluenced
influenced byby several
several conditions
conditions to opti-
to optimize
mize the deposition
the deposition process;
process; typically,
typically, thethe variables
variables such
such asastemperature,
temperature,air
air pressure, and
and
humidity remain unchanged, as well as parameters such as the opening angle
humidity remain unchanged, well as parameters such as the opening angle of the spray of the spray
gun
gun θ andthe
θ and thepaint
paintflux.
flux.Therefore,
Therefore,thethe paint
paint thickness
thickness at aatgiven
a given point
point p canpbe
can be repre-
represented
sented as a β-distributed
as a β-distributed model model as described
as described below: below:
Z t 𝜂𝑄 𝛽 2𝑟 β−1
𝑞 𝑟 = ηQ0 β 1 −r 𝑑𝑡 𝑓𝑜𝑟 − 𝑅 𝑟 𝑅 (7)
q (r ) = 𝜋𝑅
2
1 − 𝑅2 dt f or − R ≤ r ≤ R (7)
0 πR R
β−0.5 ! β−1
. 4ηQ0 β R2 − r 2
q (r ) = f or − R ≤ r ≤ R (8)
πvR2β 2β − 1
Sensors 2023, 23, x FOR PEER REVIEW 12 of 23
Z t
1
q1 (r )𝑞= 𝑟 = f (r𝑓1 )𝑟dt 𝑑𝑡 −− 𝑅
R 𝑅≤ r1𝑟 ≤ R (10)
(10)
0
Z t2
q2 (r ) 𝑞= 𝑟 = f (r2𝑓)dt
𝑟 𝑑𝑡 −−d 𝑑≤ r𝑟2 ≤ 3R
R𝑅 − 𝑑d
3𝑅 − (11)
(11)
0
p p
( R2 𝑅− −
r2 )𝑟 ( R2 − (2R − d − r )2 )
t1 = 𝑡 = , ,t2 = 𝑡 = 𝑅 − 2𝑅 − 𝑑 − 𝑟 (12)
(12)
v 𝑣 v 𝑣
q𝑞1 (r 𝑟) and
andq2𝑞(r ) 𝑟areare
given
givenby by
Equation
Equation t1 and
(8), (8), t2 are𝑡 the
𝑡 and aretime
the of spraying
time on each
of spraying on
paint pass, respectively. The overlap distance is calculated using the
each paint pass, respectively. The overlap distance is calculated using the Min–Max opti- Min–Max optimiza-
tion algorithm
mization proposed
algorithm by [30]
proposed byto[30]
perform the task
to perform thequickly and straightforwardly.
task quickly The
and straightforwardly.
flowchart
The flowchart for the calculation is presented in Figure 12. The overlap distance d canbe
for the calculation is presented in Figure 12. The overlap distance d can be
calculated independently from the spray-gun velocity v giving a value
calculated independently from the spray-gun velocity v giving a value of one in this step. of one in this step.
Figure12.
Figure 12.Flowchart
Flowchartofofthe
thecalculation
calculationprocess
processtotoobtain
obtainthe
thebest
bestoverlap
overlapdistance.
distance.
Spray-gun
Spray-gunvelocity
velocity is considered as as an
aninput;
input;once
oncethe
theoverlap
overlap distance
distance hashas been
been ob-
obtained, thevelocity
tained, the velocityfor
fora aplanar
planarsurface
surfacecan
canbeberecalculated
recalculatedasaspresented
presentedby
by[27]:
[27]:
R0 2 2
( 21 R − d) 2
2R−d V (r, d ) dr + Vmax ( d ) + Vmin ( d )
vopt = 0
(13)
qd (( 12 R − d) 2R−d V 2 (r, d)dr + Vmax (d) + Vmin (d))
R
.
v q (r ) .
where V (r, d) = η , and q(r ) is given by Equation (8).
1
𝑅−𝑑 𝑉 𝑟, 𝑑 𝑑𝑟 𝑉 𝑑 𝑉 𝑑
𝑣 = 2
1 (13)
Sensors 2023, 23, 9634 𝑞 𝑅−𝑑 𝑉 𝑟, 𝑑 𝑑𝑟 𝑉 𝑑 𝑉 𝑑 13 of 23
2
𝑞 𝑟
where 𝑉 𝑟, 𝑑 = , and 𝑞 𝑟 is given by Equation (8).
When
When the
the surface
surface is is notplanar,
not planar, further
further calculationsare
calculations areneeded
neededtotoobtain
obtainthe
thevelocity,
velocity,
which must be recalculated after the path has been created to evaluate the uniformity ofof
which must be recalculated after the path has been created to evaluate the uniformity
the
the paint
paint applied
applied toto the
the surface.
surface. Further
Further details
details areare presented
presented in in Section
Section 5. 5.
5. 5. Path-PlanningAlgorithm
Path-Planning Algorithm
Material
Material deposition
deposition cancanbebe applied
applied inin many
many ways.
ways. However,
However, forfor
twotwo main
main material
material
depositionpatterns,
deposition patterns,the thetracer
tracermethod
methodisisconsidered
consideredone oneofofthe thebest
bestoptions
options[3];[3];conse-
conse-
quently,
quently, forfor continuous
continuous material
material deposition,
deposition, thethe raster
raster and
and spiral
spiral patterns
patterns areare commonly
commonly
used
used ininmostmost material
material deposition
deposition processes.Given
processes. Giventhe thenature
natureofof the
the target
target surfaces,
surfaces, thethe
raster
raster pattern
pattern is is
used
used inin
this research
this research leaving
leaving other
other options
options forfor
future
future research.
research. The
The next
next
step
step is is
autonomous
autonomous path
pathgeneration,
generation, inin
which
which thethesurface’s
surface’s complexity
complexity determines
determines how
how
robust the algorithm should
robust the algorithm should be. be.
Given
Given the extracted
the extracted surface
surface asasa section
a sectionofofthethesphere
sphere S,S,ininananorganized
organized way,
way,first wewe
first
select
select thethestarting
startingpoints
pointsas aasrow or column
a row or columnof thatof array to be to
that array thebefirst
thepaint
first pass,
paintandpass, then
and
a new
then paint
a newpass paintis needed
pass is to be equidistant
needed from the from
to be equidistant first pass. More
the first points
pass. More arepoints
formed are
byformed
interpolating the position
by interpolating thealong
positioneachalong
row each
or column
row orand its related
column and its normal
relatedvectors
normal
tovectors
improve the algorithm’s
to improve accuracy.
the algorithm’s Then, the
accuracy. Then, cumulative
the cumulativedistance from from
distance the starting
the start-
point is calculated until the cumulative distance is equal to
ing point is calculated until the cumulative distance is equal to or greater than or greater than 2R-d, as shown
2R-d, as
inshown
Figurein 13a. At this
Figure 13a.moment, this point
At this moment, thiswill
pointbe will
usedbe inused
the following paint pass,
in the following paintandpass,
this
and process is repeated
this process until until
is repeated it reaches the last
it reaches point
the last on the
point on thesurface.
surface. Once
Once thethe
process
process
is is
conducted
conducted forfor
allall
the rows
the rows ororcolumns,
columns, the
thepasses
passes are organized
are organized inina raster
a rasterpattern
pattern toto
generate the path. Figure 13b shows a graphical description
generate the path. Figure 13b shows a graphical description of the process. of the process.
(a) (b)
Figure 13. Path-planning algorithm based on point cloud: (a) front view of path planned; (b) path
Figure 13. Path-planning algorithm based on point cloud: (a) front view of path planned; (b) path
points extraction based on cumulative distance.
points extraction based on cumulative distance.
InIn this
this section,
section, each
each paint
paint pass
pass path
path is is evaluated
evaluated toto remove
remove noisy
noisy points,
points, representing
representing
a change
a change ininthethe position
position and
and orientation
orientation ofof the
the tool
tool outside
outside a given
a given boundary.
boundary. Afterthat,
After that,
the path is smoothed using spline approximation, generating a more suitable
the path is smoothed using spline approximation, generating a more suitable trajectory fortrajectory
for robot
robot operation.
operation.
6. 6. Robot
Robot Velocity
Velocity Calculation
Calculation
Whenthe
When thesurface
surfaceisisnot
notplanar,
planar, the
the uniformity of of the
thepaint
paintapplied
appliedononthe surface
the can
surface
bebe
can evaluated based
evaluated on on
based thethe
selection of the
selection optimal
of the robot
optimal endend
robot effector velocity
effector v. A v.
velocity multi-
A
multi-objective optimization
objective optimization algorithm
algorithm basedbased
on a on a genetic
genetic algorithm
algorithm (GA)(GA) is used.
is used. The
The global
global average paint thickness differs from the desired qd in this case. Therefore, the global
velocity optimization value is formulated using a weighted-sum approach proposed by [32].
Sensors 2023, 23, x FOR PEER REVIEW 14 of 23
average paint thickness differs from the desired qd in this case. Therefore, the global ve-
Sensors 2023, 23, 9634 locity optimization value is formulated using a weighted-sum approach proposed by 14 [32].
of 23
The paint thickness model for a point cloud P representing a surface with n points can be
described in [6] by Equations (14) and (15) with a graphical representation in Figure 14.
The paint thickness model for a point cloud P representing a surface with n points can be
described in [6] by Equations ⎧ 𝑚 ℎ cos 𝛾
⎪(14) and (15) with a graphical
𝑞 𝑟 𝛾 representation
90° in Figure 14.
𝑞 = 𝑣 𝑙 𝑐𝑜𝑠 𝜃 (14)
P⎨path 2 cos γ .
( )
⎪ m p
90◦
∑ voptn0 lhp cos3 θ q(r ) γ𝛾p ≤ 90°
⎩
n = 2 ( p)
qp = (14)
0 𝑞 𝑟 = 𝜂𝑄 𝛽 1 − 𝑟 γ p ≥ 90◦
(15)
𝜋𝑅 𝑅
β −1
r2 cloud P; 𝑚 is the Euclidian distance
where 𝑞 is the paint thicknessq.at (rpoint
) = p in
ηQ0 βthe point
1 − (15)
2 2
between the current path point and theπR next; 𝑙 is R the distance between the spray-gun tip
and point
where the𝛾 paint
qt is p; is the angle formed
thickness at point bypthe average
in the pointnormal
cloud P;ofmthe surface section and the
n is the Euclidian distance
spray-gun
between current𝜃path
thenormal. is the angle
point andthat
the the
next;normal vector
l p is the at point
distance p makes
between thewith the vector
spray-gun tip
that point
and pointsp;fromγ p isthe
thesurface point pby
angle formed to the
the average
spray-gun center;
normal of 𝑣 is the optimal
the surface velocity
section and the
for the paint
spray-gun pass; 𝑞θ p𝑟is is
normal. thegiven
angle bythat
Equation (15). The
the normal vectortotal
at paint
pointthickness
p makes withat each
thetriangle
vector
is then
that calculated
points from the by adding
surface all the ppaint
point to thethickness
spray-gun values fromvEquation
center; (14) based
opt is the optimal on the
velocity
.
number
for of times
the paint pass; aq(single pointbyisEquation
r ) is given sprayed (15).[32]. TheThen, thepaint
total optimization
thickness problem can be
at each triangle
is then calculated
formulated by adding all the paint thickness values from Equation (14) based on
as follows:
the number of times a single point is sprayed min F =[32].𝐹 Then,,𝐴 the optimization problem can be
formulated as follows: (16)
𝐹 = |𝑞 − 𝑞=| 𝑎𝑛𝑑 Fp , A𝐴 = 𝑃 − 𝑃
minF
(16)
Fp = (|qt − qd |) and A = P − Pqd
where 𝑞 is given by Equation (14), 𝑞 is the desired thickness, P is the total number of
points qon
where p is
the given
surface, and 𝑃 is
by Equation theqtotal
(14), d is the
numberdesired withPa is
thickness,
of points the thickness
paint total number withinof
points on thevariation
the allowed surface, and ∆𝑞 P=qd𝑞is the𝑞 total
. Here, 𝐴 is included
number of points because
with a paint thickness
minimizing 𝐹 within
is not
the allowed
enough; number of∆q
the variation points d ± qs . the
d = qwithin Here, A is∆𝑞
range included
must be because minimizing
maximized. Fp is not
From Equation
enough; the number of points within the
(9), the objective functions 𝐹 and 𝐴 are conflicting. range ∆q must be maximized. From
d Also, for a surface represented withEquation (9),a
the objective functions
total of P points, the number F p and A are conflicting. Also, for a surface represented
of equations to be solved is P + 1. To reduce the number of with a
total of P points, the number of equations to be solved is P +
equations, the authors proposed converting the function 𝐹 into a single function W using1. To reduce the number of
equations,
the weighted thesumauthors proposed
approach [32],converting
which is given the function
by: Fp into a single function W using
the weighted sum approach [32], which is given by:
To achieve a practical solution for minimizing F, the weight w p for each value of Fp is
considered to be one, as we need to know which points are out of the allowed thickness
range and this simplifies the proposed optimization. This optimization problem is solved
Figure 14. Free-form surface and projected spray-gun pattern.
Figure
Figure 15.
15. Overall
Overall procedure
procedure to
to evaluate
evaluate aa trajectory
trajectory with
with variable
variable paint
paint flux.
flux.
Sensors 2023,
Sensors 23,23,
2023, x FOR
9634 PEER REVIEW 1616of of
23 23
(a) (b)
(c) (d)
Figure
Figure16.
16. The
Theplots
plots show
show the
the calculated variable paint
calculated variable paintflux
fluxfor
for(a)
(a)a aplanar
planarsurface;
surface;
(b)(b) a convex
a convex
surface; (c) a motorcycle transmission cover; and (d) a car clutch shell.
surface; (c) a motorcycle transmission cover; and (d) a car clutch shell.
8.8.Simulation
SimulationResults
Results
Todemonstrate
To demonstrate thethe robustness
robustness and
andeffectiveness
effectivenessofofthe
theproposed
proposedapproach,
approach,four test
four test
cases have been set up, including a planar surface, a convex surface, a motorcycle
cases have been set up, including a planar surface, a convex surface, a motorcycle engine engine
cover,and
cover, andaa car
car clutch
clutch shell
shell with
with highly
highlycomplex
complexgeometry
geometryasasshown
shownin in
Figure 17.17.
Figure
(a) (b)
(c) (d)
Figure
Figure17.
17.Sample
Samplegeometries
geometries used for testing
used for testing the
theproposed
proposedsystem
systembased
basedonona CAD
a CAD model
model or or from
from
3D
3Dscanning
scanningandand the
the corresponding point cloud:
corresponding point cloud: (a)
(a) aaplanar
planarsurface;
surface;(b)
(b)a aconvex
convex surface;
surface; (c)(c)
a a
motorcycle transmission cover; and (d) a car clutch shell.
motorcycle transmission cover; and (d) a car clutch shell.
More detailed information on these cases, including the surface coverage and thick-
ness variation achieved by the algorithm, is shown in the following tables. Table 2 lists the
Sensors 2023, 23, 9634 17 of 23
Figure 18. Python user interface to load point cloud, create and visualize the path, and simulate
Figure
Figure 18. Python
Python user
userinterface
interfacetotoload
load point
point cloud,
cloud, create
create andand visualize
visualize the path,
the path, and simulate
and simulate paint
paint thickness.
paint thickness.
thickness.
Figure
Figure19.
19.Motion-planning
Motion-planningalgorithm
algorithmeffect
effectin
inthe
theoriginal
originalgenerated trajectory.
Figure 19. Motion-planning algorithm effect in the original generated trajectory.
Sensors 2023, 23, x FOR PEER REVIEW 18 of 23
Input used
Table 2. Input parameters Parameters
to test the system. Output Parameters
Paint flux Q (max) 1000 mm3/s
Desired thicknessInputqd Parameters 0.025 mmOutput Parameters
Paint flux Q (max) variation qs 1000 3
mm /s
Allowed thickness −20%/+50%
Desired thickness qd 0.025 mm
Value β 2
Allowed thickness variation qs −20%/+50%
Spray-gun
Value β angle θ 2 20°
Spray-gun
Spray-gunefficiency
angle θ η 20◦1
Spray-gun efficiency
Spray-gun standoff hη 1 100 mm
Spray-gun standoff h 100 mm
According to the simulation results presented in Table 3, the proposed approach
achieved 100% surface
According to thecoverage
simulation for the planar
results surface, in
presented with 96.08%
Table of the
3, the thickness
proposed within
approach
the allowed
achieved 100%range when
surface using afor
coverage constant
the planarpaint flux and
surface, with98.01%
96.08%whenof theusing a variable
thickness within
paint flux with
the allowed the calculated
range when using spray-gun
a constant velocity.
paint fluxSimilarly, 100% when
and 98.01% surface coverage
using was
a variable
achieved
paint fluxfor thethe
with convex surface,
calculated and the velocity.
spray-gun thicknessSimilarly,
within the allowed
100% surfacerange increased
coverage was
from 93.18%
achieved forwith a constant
the convex paint flux
surface, and to the97.45% withwithin
thickness a variable
the paint
allowedflux. The approach
range increased
achieved
from 93.18% 94.20%with ofathe thickness
constant paint within
flux tothe97.45%
allowed withrange for the motorcycle
a variable paint flux. The engine cover
approach
achieved
with 94.20%
a constant of the
paint thickness
flux. within the improved
The performance allowed range for the
to 96.63% motorcycle
with a variable engine
paint cover
flux.
with
For a constant
the car clutchpaintshellflux. The performance
case with a constant paint improved
flux, onlyto 96.63%
73.68% withof thea thickness
variable paintwas
flux. For
within thethe car clutch
allowed range, shell case
while thewith a constantimproved
performance paint flux, to only
81.33% 73.68%
with aofvariable
the thickness
paint
was within
flux; however, the the
allowed
surfacerange, while the
coverage wasperformance
still high atimproved
96.65%. The to 81.33%
proposedwith approach
a variable
showed promising results in achieving thickness uniformity and surface coverageapproach
paint flux; however, the surface coverage was still high at 96.65%. The proposed for var-
showed
ious promising
surfaces. From results in achieving
the histogram thickness
information in uniformity
Figures 21–23 and options
surface ecoverage
and f, the for
various surfaces. From the histogram information in Figures
thickness variation tends to be within the range in planar or more regular surfaces, while 21–23 options e and f, the
thickness
for more variation
complex tends surfacesto beaswithin the range
in Figure 24,inthe
planar or more
number of regular
areas surfaces,
underpaintedwhile for or
more complex
overpainted surfacesFigure
increases. as in Figure
25 depicts 24, the
thenumber of areasand
underpainted underpainted
overpainted or areas
overpainted
in the
increases.
car Figurepart,
clutch cover 25 depicts
where it theis underpainted
possible to seeand thatoverpainted
these variations areasdepend
in the caronclutch cover
the surface
part, where it is possible to see that these variations depend
complexity and are most likely to occur in sections with abrupt geometry changes, such on the surface complexity and
are most likely to occur in sections with abrupt geometry changes,
as edges, cavities, or areas with high roughness, because each robot tool orientation is such as edges, cavities, or
areas with high roughness, because each robot tool orientation
calculated as the average of the surface normal in the affected sections, and some areas is calculated as the average
of the
end upsurface
receivingnormal in theinaffected
the paint sections,direction.
a non-optimal and someAnotherareas end up receiving
reason the paint
is that some of the in
a non-optimal
path poses have direction. Another
been altered to reason
avoid issingularities
that some ofor theundesirable
path poses haverobotbeen altered to
movements.
avoid singularities or undesirable robot movements. Furthermore,
Furthermore, spray-gun velocity and spray flux have a direct impact on the coat; when spray-gun velocity and
spray flux have a direct impact on the coat; when attempting
attempting to improve film quality in some areas, the immediate surroundings may be to improve film quality in
some areas,
affected as well. the immediate surroundings may be affected as well.
(a) (b)
Figure
Figure20.
20.Total
Totalcoverage
coveragetrajectory
trajectoryvalidation
validationin
inaa6-DOF
6-DOFrobotic
roboticarm
arm(Motoman
(MotomanGP50)
GP50)using
usingaalight
light
source simulating the spray gun. (a) System setup and (b) the light projected on the surface.
source simulating the spray gun. (a) System setup and (b) the light projected on the surface.
Sensors2023,
Sensors 23,x 9634
2023,23, FOR PEER REVIEW 19 19
of of
2323
Sensors 2023, 23, x FOR PEER REVIEW 19 of 23
Figure 25.The
Figure25. Theimages
imagesshow
showthethetest
testresults
resultson
onaacar
carclutch
clutchshell
shellshowing
showingthe
theoverpainted
overpaintedareas
areas
(green)
(green)and
andunderpainted
underpaintedareas
areas(red).
(red).
Table3.3.Comparison
Table Comparisontable
tableofofthe
theresults
resultsofofthe
thesimulation
simulationonondifferent
differentsurfaces.
surfaces.
9.9.Conclusions
Conclusions
This
Thispaper
paperdescribes
describesaanovel
novelmethod
methodfor forautonomously
autonomouslygenerating
generatingspray-painting
spray-painting
trajectories
trajectorieswith
witha arobotic
roboticarm.
arm.AApoint
pointcloud
cloudrepresentation
representationofofthethepart
partisisall
allthat
thatisisneeded
needed
for path planning, while a 3D reconstruction is not required. The proposed
for path planning, while a 3D reconstruction is not required. The proposed path-planning path-planning
system
systemcan
cangenerate
generatetrajectories forfor
trajectories objects of of
objects complex
complex geometries
geometrieswith total
with parts
total coverage
parts cover-
while minimal user interactions are required. A user interface (GUI) is designed
age while minimal user interactions are required. A user interface (GUI) is designed to createto
trajectories given thegiven
create trajectories inputthe
of painting
input of parameters and showand
painting parameters a visualization of the trajectory
show a visualization of the
generated
trajectoryand a colormap
generated and asimulation of paint film
colormap simulation ofquality. This
paint film path-generation
quality. system is
This path-generation
suitable
system for use in afor
is suitable variety
use inofaconveying systems and
variety of conveying does not
systems andrequire
does nottherequire
use of special
the use
fixtures
of special fixtures because it is not dependent on a predefined workpiecepose.
because it is not dependent on a predefined workpiece position and position and
The overlap distance between paint passes is calculated based on a planar surface
pose.
model, then
The a raster
overlap patternbetween
distance path is generated
paint passes autonomously
is calculated based
based onon the given surface
a planar input
parameters.
model, then a raster pattern path is generated autonomously based on the givenpaint
The spray gun’s optimal constant velocity value is calculated using the input
deposition model and paint deposition simulation. The kinematic feasibility
parameters. The spray gun’s optimal constant velocity value is calculated using the paint of the path
generated is evaluated and modified in a simulation environment for use in a robot arm. The
deposition model and paint deposition simulation. The kinematic feasibility of the path
simulation shows that the thickness variation is kept within the allowed variation. While
generated is evaluated and modified in a simulation environment for use in a robot arm.
the average thickness is close to the desired thickness, the variation is still considerable
The simulation shows that the thickness variation is kept within the allowed variation.
when the part’s complexity is high. The complexity of the geometry, the accuracy of the
While the average thickness is close to the desired thickness, the variation is still consid-
approximation of the spray-gun model, and the robot’s kinematic feasibility will directly
erable when the part’s complexity is high. The complexity of the geometry, the accuracy
Sensors 2023, 23, 9634 22 of 23
affect the quality of the coating film. The experiments show promising results in terms of
total coverage when generating a path subject to a given paint quality requirement.
Further tests on more samples with varied shapes will be needed to fully identify
the presented method’s weaknesses. Painting experiments on real objects are needed
to compare the simulated results. Further improvements are required to construct a
completely autonomous robotic spray-painting system capable of handling the high-mix
and low-volume production lines. Robot motion planning must be studied in more detail
to minimize the effect of the robot motion constraints on the final paint thickness.
References
1. Boscariol, P.; Gasparetto, A.; Scalera, L. Path Planning for Special Robotic Operations. In Robot Design: From Theory to Service
Applications; Carbone, G., Laribi, M.A., Eds.; Mechanisms and Machine Science; Springer International Publishing: Cham,
Switzerland, 2023; pp. 69–95.
2. Woods, A.; Pierson, H.A. Developing an ergonomic model and automation justification for spraying operations. In Proceedings
of the IISE Annual Conference and Expo 2018, Orlando, FL, USA, 19–22 May 2018; pp. 293–298.
3. Chen, W.; Wang, X.; Liu, H.; Tang, Y.; Liu, J. Optimized Combination of Spray Painting Trajectory on 3D Entities. Electronics 2019,
8, 74. [CrossRef]
4. Chen, H.; Fuhlbrigge, T.; Li, X. Automated industrial robot path planning for spray painting process: A review. In Proceedings of
the 2008 IEEE International Conference on Automation Science and Engineering, Washington, DC, USA, 23–26 August 2008;
pp. 522–527.
5. Weber, A.M.; Gambao, E.; Brunete, A. A Survey on Autonomous Offline Path Generation for Robot-Assisted Spraying Applications.
Actuators 2023, 12, 403. [CrossRef]
6. Andulkar, M.V.; Chiddarwar, S.S.; Marathe, A.S. Novel integrated offline trajectory generation approach for robot assisted spray
painting operation. J. Manuf. Syst. 2015, 37, 201–216. [CrossRef]
7. Cooper, I.; Nicholson, P.I.; Pierce, S.G.; Mineo, C. Introducing a novel mesh following technique for approximation-free robotic
tool path trajectories. J. Comput. Des. Eng. 2017, 4, 192–202. [CrossRef]
8. McGovern, S.; Xiao, J. A General Approach for Constrained Robotic Coverage Path Planning on 3D Freeform Surfaces. IEEE
Trans. Autom. Sci. Eng. 2023, 20, 1–12. [CrossRef]
9. Pan, Z.; Polden, J.; Larkin, N.; Van Duin, S.; Norrish, J. Recent progress on programming methods for industrial robots. Robot.
Comput.-Integr. Manuf. 2012, 28, 87–94. [CrossRef]
10. Bedaka, A.K.; Lin, C.-Y. CAD-based robot path planning and simulation using OPEN CASCADE. Procedia Comput. Sci. 2018, 133,
779–785. [CrossRef]
11. Bedaka, A.K.; Mahmoud, A.M.; Lee, S.C.; Lin, C.Y. Autonomous Robot-Guided Inspection System Based on Offline Programming
and RGB-D Model. Sensors 2018, 18, 4008. [CrossRef] [PubMed]
12. Open Cascade. Available online: https://www.opencascade.com/ (accessed on 20 September 2023).
13. Gleeson, D.; Jakobsson, S.; Salman, R.; Ekstedt, F.; Sandgren, N.; Edelvik, F.; Carlson, J.S.; Lennartson, B. Generating Optimized
Trajectories for Robotic Spray Painting. IEEE Trans. Autom. Sci. Eng. 2022, 19, 1380–1391. [CrossRef]
14. Chen, H.; Sheng, W.; Xi, N.; Song, M.; Chen, Y. Automated Robot Trajectory Planning for Spray Painting of Free-Form Surfaces in
Automotive Manufacturing. Ind. Robot. Int. J. 2002, 29, 426–433. [CrossRef]
15. Xu, Z.; He, W.; Yuan, K. A real-time position and posture measurement device for painting robot. In Proceedings of the 2011
International Conference on Electric Information and Control Engineering, ICEICE 2011—Proceedings, Wuhan, China, 15–17
April 2011; pp. 1942–1946. [CrossRef]
Sensors 2023, 23, 9634 23 of 23
16. Masood, A.; Siddiqui, R.; Pinto, M.; Rehman, H.; Khan, M.A. Tool Path Generation, for Complex Surface Machining, Using Point
Cloud Data. Procedia CIRP 2015, 26, 397–402. [CrossRef]
17. Wang, G.; Cheng, J.; Li, R.; Chen, K. A new point cloud slicing based path planning algorithm for robotic spray painting. In
Proceedings of the 2015 IEEE International Conference on Robotics and Biomimetics, IEEE-ROBIO 2015, Zhuhai, China, 6–9
December 2015; pp. 1717–1722.
18. Posada, J.R.D.; Meissner, A.; Hentz, G.; Agostino, N.D. Machine learning approaches for offline-programming optimization in
robotic painting. In Proceedings of the ISR 2020; 52th International Symposium on Robotics, Online, 9–10 December 2020; pp. 1–7.
19. Zhou, Q.-Y.; Park, J.; Koltun, V. Open3D: A Modern Library for 3D Data Processing. arXiv 2018, arXiv:1801.09847.
20. Bowers, J.; Wang, R.; Maletz, D.; Wei, L.Y. Parallel Poisson Disk Sampling with Spectrum Analysis on Surfaces. ACM Trans. Graph.
2010, 29, 1–10. [CrossRef]
21. Arcila, O.; Dinas, S.; Bañón, J.M. Collision detection model based on Bounding and containing Boxes. In Proceedings of the 2012
XXXVIII Conferencia Latinoamericana En Informatica (CLEI), Medellin, Colombia, 1–5 October 2012; pp. 1–10.
22. Wang, Z.; Fan, J.; Jing, F.; Liu, Z.; Tan, M. A pose estimation system based on deep neural network and ICP registration for robotic
spray painting application. Int. J. Adv. Manuf. Technol. 2019, 104, 285–299. [CrossRef]
23. Chhay, S.; Adams, M.D. Visually aided feature extraction from 3D range data. In Proceedings of the 2010 IEEE International
Conference on Robotics and Automation, Anchorage, Alaska, 3–8 May 2010; pp. 2273–2279.
24. Lin, C.-H.; Chen, J.-Y.; Su, P.-L.; Chen, C.-H. Eigen-feature analysis of weighted covariance matrices for LiDAR point cloud
classification. ISPRS J. Photogramm. Remote Sens. 2014, 94, 70–79. [CrossRef]
25. Antonio, J.K. Optimal trajectory planning for spray coating. In Proceedings of the IEEE International Conference on Robotics and
Automation, San Diego, CA, USA, 8–13 May 1994; pp. 2570–2577. [CrossRef]
26. Freund, E.; Rokossa, D.; Rossmann, J. Process-oriented approach to an efficient off-line programming of industrial robots. IECON
Proc. (Ind. Electron. Conf.) 1998, 1, 208–213. [CrossRef]
27. Chen, H.; Xi, N.; Sheng, W.; Chen, Y. General framework of optimal tool trajectory planning for free-form surfaces in surface
manufacturing. J. Manuf. Sci. Eng. 2005, 127, 49–59. [CrossRef]
28. Sahir Arikan, M.A.; Engelberger, J.F.; Balkan, T. Modeling of paint flow rate flux for elliptical paint sprays by using experimental
paint thickness distributions. Ind. Robot. Int. J. 2006, 33, 60–66. [CrossRef]
29. Fogliati, M.; Fontana, D.; Garbero, M.; Vanni, M.; Baldi, G.; Dondè, R. CFD simulation of paint deposition in an air spray process.
J. Coat. Technol. Res. 2006, 3, 117–125. [CrossRef]
30. Wang, Z.; Liu, C.; Cheng, L.; Fan, X. Optimization of spraying path overlap rate based on MATLAB. In Proceedings of the 2012
2nd International Conference on Consumer Electronics, Communications and Networks, CECNet 2012—Proceedings, Yichang,
China, 21–23 April 2012; Volume 1, pp. 2731–2734. [CrossRef]
31. Yu, S.; Cao, L. Modeling and prediction of paint film deposition rate for robotic spray painting. In Proceedings of the 2011
IEEE International Conference on Mechatronics and Automation, ICMA 2011, Beijing, China, 7–10 August 2011; pp. 1445–1450.
[CrossRef]
32. Andulkar, M.V.; Chiddarwar, S.S.; Paigwar, A.K. Optimal velocity trajectory generation for spray painting robot in offline mode.
In Proceedings of the 2015 Conference on Advances in Robotics, Goa, India, 2–4 July 2015; pp. 1–6.
33. SSPC. SSPC-PA 2 Procedure for Determining Conformance to Dry Coating Thickness Requirements; Society for Protective Coatings
Paint Application Standard: Houston, TX, USA, 2015; pp. 1–4.
34. Trigatti, G.; Boscariol, P.; Scalera, L.; Pillan, D.; Gasparetto, A. A Look-Ahead Trajectory Planning Algorithm for Spray Painting
Robots with Non-spherical Wrists. In Mechanism Design for Robotics: Proceedings of the 4th IFToMM Symposium on Mechanism Design
for Robotics, Udine, Italy, 11–13 September 2018; Springer International Publishing: Cham, Switzerland, 2018; pp. 235–242.
35. Görner, M.; Haschke, R.; Ritter, H.; Zhang, J. MoveIt! Task Constructor for Task-Level Motion Planning. In Proceedings of the
2019 International Conference on Robotics and Automation (ICRA), Montreal, QC, Canada, 20–24 May 2019; pp. 190–196.
36. Koubâa, A. Robot Operating System (ROS); Polish Academy of Sciences: Warsaw, Poland, 2017; Volume 1.
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.