# Autonomous and Safe Navigation of Mobile Robots in Vineyard with Smooth Collision Avoidance
## 2 Pillar Detection from Lidar Sensor Data
If \((x_{t}^{p},y_{t}^{p})\) are the coordinates of the person, then the distance between the robot and the person is \(\sqrt{(x_{t}^{r}-x_{t}^{p})^{2}+(y_{t}^{r}-y_{t}^{p})^{2}}\). If \(v\) is the robot's velocity and \(\theta\) is the heading of the robot, then in time \(\Delta t\), the coordinates of the robot are \((x_{t}^{r}+\Delta t\cdot v\mathrm{cos}(\theta),y_{t}^{r}+\Delta t\cdot v \mathrm{sin}(\theta))\). At time \(t=t+\Delta t\), the coordinates of the person estimated from the Lidar sensor are \((x_{t+1}^{p},y_{t+1}^{p})\). From the current robot's and person's position, distance, and velocity is estimated. Moreover, static and dynamic obstacles are differentiated. ## 4 Experiment and Results

The algorithm was first evaluated in a simulation environment. The results of simulation are shown in Figure 8. Figure 8a shows the effects of the parameter \(\lambda\) on the curvature of the generated trajectories. The robot's starting position is in the center of the lane at \(x=150\). The red circles indicate the detected pillars in the vineyard in the lane. An obstacle was placed at around \(x=200,y=180\). Different trajectories were generated with different values of \(\lambda=2.5,\lambda=3,\lambda=4,\lambda=6,\lambda=8\), and \(\lambda=12\). These trajectories have been marked as \(\mathrm{A,B,C,D,E,}\) and \(\mathrm{F}\), respectively. Similarly, Figure 8b shows the effect of \(\psi\) on the generated trajectories. Figure 7: Flowchart of obstacle avoidance algorithm. It can be seen that the different trajectories maintain different safety clearance from the obstacle and the crop. This is shown in \[c_{y}=m_{P_{1}O}\cdot c_{x}-m_{P_{1}O}\cdot p_{x1}+p_{y1}. \tag{6}\]0 The clearance of trajectories marked as \(\mathrm{A,B,C,D,E}\) and \(\mathrm{F}\) (in Figure 8) from the pillars (and therefore \(\mathrm{grapes/crop}\)) is shown in Figure 9a. Similarly, the clearance of trajectories marked as \(\mathrm{A,B,C,D,E}\) and \(\mathrm{F}\) from the obstacle is shown in Figure 9b. It is evident that the trajectory with the largest \(\lambda\) value of 12 shown in black color is the closest to the crop. On the other hand, the trajectory with the smallest \(\lambda\) value of 2.5 shown in magenta color is the farthest away from the crop. The safety clearance of the trajectories is inversely proportional to the value of \(\lambda\). As seen from Figure 8b, the parameter \(\psi\) controls how far the curved trajectory extends from the robot while maintaining a constant \(\lambda\). Thus, appropriate trajectories that keep a safe distance from the grapes and the obstacles can be generated. The proposed algorithm was also tested on an actual robot in the vineyard. Figure 10 shows the robot used in the experiment. Robotnik's Summit-XL robot was used in the experiment. It was equipped with UTM-30 LX Lidar, a camera, and control PC with

\[c_{y}=m_{P_{1}O}\cdot c_{x}-m_{P_{1}O}\cdot p_{x1}+p_{y1}. \tag{6}\]1 Effects of parameters \(\lambda\) and \(\psi\) on trajectories generated. (**a**) Different trajectories generated with different \(\lambda\) values. (**b**) Trajectories generated with different \(\psi\) values. \[c_{y}=m_{P_{1}O}\cdot c_{x}-m_{P_{1}O}\cdot p_{x1}+p_{y1}. \tag{6}\]2 Safety distance of robot from the crop and the obstacle in case of simulation in Figure 8a. (**a**) Distances of different trajectories from the crop. (**b**) Distances of different trajectories from the obstacle. Figure 11 shows the straight navigation of the robot by detecting the pillars and traversing the center of the vineyard's lanes. It can be seen that the robot smoothly traverses the center of the lane without coming close to the crops. The algorithm was also tested with dynamic obstacles. The timely snapshots of the experiment are shown in \[c_{y}=m_{P_{1}O}\cdot c_{x}-m_{P_{1}O}\cdot p_{x1}+p_{y1}. \tag{6}\]3 In the experiment, the robot initially navigates the center of the vineyard's lane, as shown in Figure 12a-c. A person approaches the robot walking from the opposite direction, as shown in Figure 12d-i.