# Painting Path Planning for a Painting Robot with a RealSense Depth Sensor
## 5 Experiments and Results
The red parts denote the detected obstacles, notably the door and the window, as can be seen in Figure 8a,b. The blue areas represent the frames of the door and window in the image. Since the depth camera sees through the glass, the door and the window areas are detected as distant objects in the depth image and are successfully separated from the wall area. Finally, Figure 8a-c shows the painting process simulation. Again, it should be noted that the red, blue, and purple lines show the movement of the painting head. It is easy to notice that the panting head avoids the door and window during the painting process. The next example will show the segmentation process and the painting simulation process for an indoor wall in a room. Figure 8: (**a,b**) The painting robot during the painting simulating process on the detected wall surface. (**c**) The painting robot in the painting simulating process on the detected wall surface based on the real point cloud. Figure 7: (**a**) The experiment setup. (**b**) The painting robot during RTAB mapping process used to form the point cloud of the wall surface. (**c**) The resulting merged point cloud of the wall surface with a door and window. Figure 9a shows the window surrounded by the wall to be painted. Figure 9b,c shows the painting robot during the RTAB mapping process used to form the point cloud of the complex surface. Again, the point cloud was formed successfully using the previously explained procedure. The next step involved detecting the wall area to be painted. The goal of the wall detection step was to avoid the window, which was not to be painted. The plane extraction process was again performed successfully. In this example, the wall area was extracted and is colored green in the image. The red parts denote the detected obstacles, notably the window, as can be seen in Figure 10a,b. In this example also, the depth camera was able to see through the glass and the window area was detected as a distant object in the scene of the depth image, and was successfully separated from the wall area. Finally, Figure 10a-c shows the painting process simulation. The red, blue, and purple lines show the movement of the painting head. It is easy to notice again that the panting head avoided the window during the painting process. Figure 10: (**a,b**) The painting robot during the painting simulating process on the detected wall surface. (**c**) The painting robot during the painting simulating process on the detected wall surface based on the real point cloud. Figure 9: (**a**) The experiment setup. (**b**) The painting robot during the RTAB mapping process used to form the point cloud of the wall surface. (**c**) The resulting merged point cloud of the wall surface with the windows included. Finally, in order to verify the experiments, the simulation results are summarized in brief. Figure 11a-f shows the simulation process performed with Gazebo. During the simulation, the movement of the 5 DOF robot can be seen. In this example, a wall was simulated, whereby small cubes were placed as obstacles. Figure 11a shows the simulation setup, i.e., the wall with the obstacles. Figure 11b,c depicts the wall scanning process, which is analogous to the RTAB mapping process. Figure 11d,e illustrates the point cloud of the wall with the detected obstacles and the path planning process. Finally, Figure 11f shows the wall painting process in the simulation environment. As can be seen in the verification example in Figure 11, the testing results for the actual scenarios are consistent with the simulation results. Since the client's requirement, and the main goal of the project, was the separation of the wall and windows, this goal was fulfilled. The windows would be covered with a protective foil in real life, as in any other painting job. The reason for covering the window is that even the best spray guns are not precise enough to avoid painting some parts of the edges of windows, while light winds and dripping paint can also damage the window.