## 4 Solution Proposal for UAV Applications in Greenhouses  
UAVs need to be developed for smart greenhouses. However, to perform tasks in the greenhouse with a fully autonomous UAV, the solutions proposed for autonomous mobile robots should be examined. Since most of the tasks in the greenhouse are repetitive applications, such as monitoring, control, etc., mobile robotics are very suitable as an application. Instead of people constantly visiting the greenhouse and watching changes, it is more logical for these activities to be performed by a UAV, which is in the greenhouse and performs tasks at certain time intervals. The basic need for this is to provide the UAV with localization and mapping ability in the indoor environment. With this ability, the 3D position of the UAV in the greenhouse can be obtained at any time. In this way, UAV solutions that assess plants individually, collect data and develop predictions such as the yield and growth of plants can be applied in a greenhouse (or indoor environment). The SLAM [96, 97] solution is essential for autonomous UAVs in an indoor environment. SLAM is one of the main problems to be solved in autonomous mobile robotics. In fact, the goal is just a robot moving in an unknown environment. For this, the environment must be mapped, and simultaneously, the robot must be localized within the constantly growing map [98]. If a mobile robot can solve the SLAM problem, that robot can move independently in the environment and perform tasks. SLAM is the first problem to be solved for localization, mapping and path planning tasks required for autonomous movement [99]. SLAM simultaneously performs the process of creating an environment map consisting of different properties (markers, obstacles, etc.) and determining the absolute position of the robot using this map. In this way, the robot recognizes its environment, determines its own position (ego-motion) accordingly and finally becomes ready to perform the task assigned to it. Localization in outdoor environments is generally carried out with GPS. Since the accuracy of GPS is low in indoor environments, UAVs should also be localized in cases where GPS is not available. In addition, GPS signals can easily be distorted due to weather factors, electromagnetic noise and tall buildings at high density. Therefore, the UAV must be localized indoors with sensors such as a camera (visual SLAM (VSLAM)), inertial measurement unit (IMU), LIDAR, etc. Although it is difficult for the UAV to perform tasks in indoor environments, studies on SLAM applications for UAV localization in indoor environments have recently increased. In a SLAM study that we previously conducted [100], the results of the previous indoor state-of-the-art visual-inertial SLAM (VISLAM)/visual-inertial odometry (VIO) studies and the method that we suggested were compared. With the deep learning-based approach, more successful localization (odometry) was achieved with UAV indoors. Figure 7 is a screenshot of the implementation of this previous study. The trajectory curve shows that the DJI Tello drone is localized in our indoor lab (this lab can be thought of as a greenhouse) in real time using visual and IMU data. If such applications are made in the greenhouse, the instantaneous position of the UAV can be known, as seen in Figure 7. In this way, different tasks can be assigned to the UAV, and the UAV can be directed to a specific coordinate. It can perform a special treatment on a particular plant at this coordinate. In this way, desired measurements and images can be taken from certain points or certain plants. The development of such applications will also make a significant contribution to smart greenhouses in the future. Since the SLAM area has been an active topic for mobile robotics for many years, new studies and techniques are still being developed. It is a very rapidly developing area but still not fully resolved. Therefore, a large number of different methods have been proposed for SLAM solutions indoors.