# Autonomous and Safe Navigation of Mobile Robots in Vineyard with Smooth Collision Avoidance
## 2 Pillar Detection from Lidar Sensor Data
Robust detection of pillars makes navigation easy as the robot only needs to keep track of the pillars on the left and right side of a lane in the vineyard. The end of a particular lane is marked by the absence of pillars. Once the robot has finished traversing a particular lane, it will turn into another lane at the end while detecting the pillars. The Lidar attached to the robot will also sense the presence of static and dynamic obstacles. Upon obstacle detection, the robot must change its trajectory and avoid it. This is explained in the next section. Figure 4: Grape stem, weed, and pillar in a vineyard. The Lidar sensor is setup at a height greater than that of the weeds. Hence, noise from weeds does not affect the accuracy of pillar detection. Figure 5: Simulation result of pillar detection. Lidar data are shown in blue, whereas its symmetric derivative is shown in orange color. The detected pillar is shown in red circle between the rising and falling edges of the symmetric derivative. ## 3 Obstacle Avoidance with Path Smoothing

In this section, we explain static and dynamic obstacle avoidance while maintaining a smooth (i.e., no abrupt stoppage, and no sharp turns) trajectory. Obstacle avoidance incorporated with smoothing has been proposed in many previous works such as [34; 35; 36; 37], and a review of all the works can be found in [38; 39; 40; 41]. A modified algorithm [42] suited for vineyards in the context of robot navigation using extraction of pillar positions is briefly explained here. Path planning is basically divided into two stages of global and local planning. Global planning is performed using algorithms such as [PERSON]'s algorithm [43], A-star path planner [44], D-star path planner [45; 46], PRM [47], or RRT algorithm [48; 49; 50]. These algorithms generate a path with sharp turns, which is not good for the robot. The necessity and advantages of robot's path smoothing or smooth trajectory generation is a well-studied problem in robotics, and an excellent review can be found in the review work [38], which summarizes the state-of-the-art. In terms of kinematic feasibility, a robot may not execute these sharp turns suddenly. In terms of navigational safety, such sudden stops and sharp turns are not favorable and may even cause accidents. This is because from an external person's point of view in the same vineyard, such erratic robot motion is unnatural, and it is difficult to predict the robot's next position to avoid collision. If a robot navigating in front of a person suddenly stops, the person coming from behind might dash into the robot causing injury. The same is true for sudden and abrupt changes in trajectories, which can be unexpected for farmers working in the vineyard. In fully automated vineyards, robots will be expected to carry tasks, such as weed removal, harvesting, and moving harvested grapes from the field to the local storage facilities. In such scenarios, a smooth navigation is preferred over trajectories with abrupt stops, suddenly lowering velocities, or sharp turns. Path smoothing is performed in the next step, which involves local planning in which the local obstacles are avoided. Our approach directly builds upon the path generated by the global planner. The robot only needs to maneuver itself to the start of a lane using any of the global path planners. From there, the detected pillars can be used to localize the robot, center itself in the lane, and navigate. Obstacle avoidance is also performed while keeping a safe distance from both the crop and the obstacle. Figure 6a shows a scenario where an obstacle (shown as light blue box) is kept in one of the lanes of the vineyard. Using traditional algorithms such as A-star or PRM, the generated angular path SABCG with sharp turns at point A, B, and point C are shown. The coordinates of A (\(x_{1},y_{1}\)), B (\(x_{2},y_{2}\)), and C (\(x_{3},y_{3}\)) are also shown. Although the entire path needs to be smoothed out, we only explain smoothing a section of the path for the sake of simplicity.