Target position and safety margin effects on path planning in obstacle avoidance

This study examined how people choose their path to a target, and the visual information they use for path planning. Participants avoided making contact with an obstacle as they walked to a bookcase and picked up a cup from different locations on a shelf. Participants chose a path with a smaller deviation angle from a straight line to the target and chose a side of the obstacle which was closer to them. Unlike previous studies which have not included a safety margin in their analyses, we found that the right and left safety margins combined to account for 26% of the variability in path planning decision making. In some cases, participants chose a longer path around the obstacle even when the available safety margin which would have resulted in a straight line to the target was large enough to allow passage. Gaze analysis findings showed that participants directed their gaze to minimize the uncertainty involved in successful task performance and that gaze sequence changed with obstacle location. Early in their walk to the target, the greatest allocation of gaze was on the safety margin and target, later in their walk, gaze shifted to the safety margin when it was small, and then gaze shifted primarily to the target after the participant passed the obstacle. Our results of a path selection judgment test showed that the threshold for participants abandoning their preferred side for circumventing the obstacle was 15 cm to the left of the bookcase shelf center.


Introduction
When walking through the environment, we often take a path that circumvents obstacles on the way to our designated goal. Humans are capable of avoiding obstacles during gait to designated target locations. This requires the recognition of objects in the environment which might interfere with arrival at the target location. Safe avoidance strategies are characterized by appropriate path and speed selections which depend on the obstacle crossing angle and estimation of the minimum distance 1, 2 . According to Baxter and Warren 1 , there are two alternative options for path selection when an obstacle exists in the pathway to an intended endpoint. First, participants might select the path which has a smaller deviation angle from the straight line. Second, participants might select the path which is closer to the edge of the obstacle. This description does not address the importance of safety margins in the circumvention of obstacles. The role of the safety margins in path planning during gait has not been previously studied. In the present study, the safety margin was defined as the distance between the outer edge of an obstacle and the edge of the pathway. While previous studies have manipulated deviation angle and/or minimum distance for path planning [1][2][3][4][5] , in the present study we also considered safety margin as a factor for decision making related to path planning.
Although path planning may be achieved using different sensory systems such as audition 6 to inform the motor system of adjustments necessary for path selection, the visual system provides the most precise environmental information about the pathway. Previous studies on goal directed gait demonstrated that subjects adjust their gaze density 7 and location characteristics such as position and duration [8][9][10] during performance. While these earlier studies demonstrated the importance of gaze location and density in different environmental contexts, they did not evaluate subjects' gaze sequence. The order in which gazes are made during path planning may provide critical information not only about what environmental information is being extracted and used as a person walks to a target, but also about the order in which that information is obtained.
The purpose of this study was therefore to determine how safety margin and target position interact in controlling path planning and gaze selection behavior (gaze density and gaze sequence) while a person walks to a target. To gain a better understanding of the role played by target location on path selection we also subjectively assessed subjects' path planning for different target locations. This test allowed us to determine a threshold value for target location along the bookcase shelf at which the path direction around an obstacle would be changed.

Path planning results
The probability of walking to the right of the obstacle for different decision-making parameters is shown in Figure 4. Figure 4A shows the influence of ∆D on the probability of walking to the right of the obstacle for different target locations. It can be seen when ∆D was equal to zero, the situation when the obstacle was equidistant from where the participant was standing by the starting position, the probability of walking to the right side was 70% when the target was located in the middle, was 95% when the target was on the right side and was 40% when the target was on the left side of the bookcase. As ∆D became negative (the distance to the right edge of the obstacle is smaller than the distance to the left side), the probability of walking to the right-side increases for all of the target locations. When ∆D was equal to or less than -10 cm, participants always walked on the right side of the pathway (since the probability was equal to 100%). Also, when ∆D became positive (distance to the left side is smaller than the distance to the right side), the probability of walking to the right side of the pathway decreased. When ∆D was bigger than 5 cm (the left edge of the obstacle was 5 cm closer than the right side of the obstacle), the probability of selecting and walking on the left side was equal to or higher than that of the right side. Figure 4B shows the influence of ∆θ on the probability of walking to the right of the obstacle. It can be seen that when ∆θ was equal to zero -the target (cup) was positioned in the middle of the shelf, the probability of walking to the right side of the obstacles was 90%. As ∆θ became negative (the right angle was smaller than the left angle or the cup was positioned to the right), the probability of walking to the right-side increased. When ∆θ was equal or less than -5°, participants always walked on the right side of the pathway since the probability was equal to 100%. Also, for positive ∆θ measures (the right angle was larger than the left angle or the cup was moved to the left side), the probability of walking to right side decreased. Figure 4C shows the influence of the safety margin on the probability of walking to the right of the obstacles. It can be seen that when the target was in the middle of the bookcase shelf (red line), and the safety margin was equal to 1, (the situation where the right and left safety margins were equidistant from the edge of the pathway), the probability of walking to the right side was around 90%. With an increase of the width of the right safety margin relative to the left side, the probability of walking to the right side of the obstacle increased. However, when the width of the left safety margin increased, participants started to select walking past the left side of the obstacle in their approach to the target. When the target was on the right side (pink line), participants chose to pass the right side of the obstacle as they walked to the target since the safety margin ratio was 0.5. When the target was on the left side (blue line), participants walked past the left side of the obstacle in their approach to the target since the safety margin ratio was 1.4. Table 2 shows the result of the univariate logistics regression analysis. It can be seen that when the target shifted to the left side (increasing ∆θ ), the logit-probability of walking to the right side significantly decreased by coefficient 0.34. Also, when ∆D increased (the distance to the right edge of obstacle increased as opposed to the distance to the left edge) the logit-probability of walking to the right side significantly decreased by coefficient 0.35. The SMR coefficient shows that when the ratio of the width of the right safety margin and left safety margin increased by 1, the logit-probability of walking to the right side significantly increased by coefficient 4.67. Figure 5 shows the result of the importance of relative distance, relative angle and safety margin in path planning decision making. In this multivariate logistics regression model, the selected path was the response variable while the three decision making parameters (∆θ , ∆D, SMR) were the predictor variables. All three predictor variables played a significant role in the decision about the path to take to the target (p (∆θ ) = 2.0E-16, p(∆D) = .034, and p(SMR) = .014 ). The model accuracy using LOOCV reached 85.1±2.07% (mean±SD). It can be seen in Figure 5 that the most important factor which accounted for more than 39% of the variance in path planning was ∆θ (an indicator of target position) and ∆D accounted for more than 35% of the variance in path planning. However, including SMR in the model accounted for approximately 26% of the variance in path planning decision making. Figure 6 shows the gaze density analysis for the different obstacle conditions and target positions. It can be seen that when the safety margins decreased, gaze density in the safety margin area increased. The repeated measures ANOVA performed on the gaze frequency showed that there were significant main effects for obstacle arrangement, F(7, 77) = 3.446, p = .008, η 2 = .485, and gaze position, F(2, 22) = 806.64, p = 2.6E-21, η 2 = .987. In addition, Obstacle Condition × Gaze Position, F(14, 154) = 39.383, p = 1.13E-43, η 2 = .782, Gaze Position × Target Position, F(4, 44) = 5.586, p = .001, η 2 = .337 , and Obstacle Condition × Target Position × Gaze Position, F(28, 308) = 11.92, p = 1.3E-34, η 2 = .52, interactions were all significant. Figure 7 is a visual representation of the gaze object sequence for each of the eight obstacle conditions. Blue sections indicate gaze on the target area, Red sections indicate gaze on the safety margin area, and the White sections indicate gaze directed within the path area. Some differences in gaze sequence were observed within the initial 60% of the trial time. These differences included variable amounts of time spent looking at the target areas and obstacles. However, in the last 40% of the total trial time, no differences were observed between the different obstacle arrangements. Table 3 shows the similarity scores from the different gaze object sequences computed across the different obstacle conditions. Kolmogorov-Smirnov tests showed that the distributions of the similarity scores across the different obstacle conditions were normal (p = .51). There was a greater similarity score within obstacle conditions as shown with red fonts. This indicates that participants had similar gaze sequence behavior within each obstacle condition. Similarity scores between the NOBST condition and those conditions with an obstacle were small as supported by a significant effect for condition (F(6,9065) = 11014, p = .001, η 2 = .879) indicating that gaze sequence changed as a function of safety margin. Post hoc comparisons showed that Condition 2 significantly differed from Conditions 6, 7 and 8 (p<.05). Condition 3 significantly differed from Conditions 6, 7 and 8 (p<.05). Condition 4 was significantly differed from Conditions 5, 6, 7 and 8 (p<.05). Condition 5 significantly differed from Conditions 6, 7 and 8 (p<.05). All other remaining comparisons were not significant. Figure 8 illustrates the results of the path selection judgement test. The dashed line represents when there was a 50% probability of choosing to walk to the right side of the obstacle/pathway. Probabilities higher than 50% means that the participant preferred to choose walking on the right side of the obstacle to reach the target. However, it can be seen that participants chose to walk on the left side of the obstacle/pathway when walking to the target when the target was shifted as close as 15 cm to the left side relative to the middle of the shelf.

Discussion
Path selection around obstacles by participants was systematic. The aim of this study was to discover how people choose their path and the visual information used in path selection. This study examined obstacle avoidance strategies in response to stationary obstacles. The unique contributions of the present study on obstacle avoidance were the investigation of the role of the safety margin on path selection, the objective measurement of a baseline pathway to the target which has not previously been provided by research on the topic of obstacle avoidance 1,4,11 , and the analysis of gaze characteristics dependent on the safety margin, target, and obstacle relationship to the start position.
Path selection during obstacle avoidance requires the participant to make a decision based on a weighting of upcoming environmental variables. In this study, we manipulated three environmental variables: distance to the left and right edges of the obstacle, the target position, and the left and right safety margins. We found that all three variables played key roles in how participants made their path selections (Table 2). Specifically, we found that the obstacle with the closest proximity to the participant (relative distance) was used for path selection ( Figure 4A). It can be seen in Figure 4A that when ∆D was equal to zero, there was an 85% probability of walking to the right side of the obstacle. This preferred path selection most likely occurred because all of our participants were right hand and foot dominant. When the right edge of the obstacle was closer to the participant (negative ∆D), all participants still chose to walk on the right side of the obstacle as they walked to the target. However, the probability of choosing the right-side decreased when the left edge of the obstacle was closer to the participant. The use of smallest relative distance for the selected path to the target coincided with the shortest path to the target and reduced the energy usage for a path selection to the target. This finding is consistent with Rosenbaum 5 who showed that participants chose the shortest distance to walk to the target.
To assess the effect of target location on path selection ( Figure 2), we computed deviation angles (θ L and θ R ) which were the angles between the left and right edges of the obstacle and the path taken to the target by the participant in the baseline condition (NOBST). This procedure allowed us to objectively measure the deviation angle to the target. This differs from the procedures used in previous studies 1, 4 which used an assumed straight-line path to the target. Our findings using the deviation angle showed that participants selected a path to the target that had the smallest deviation angle ( Figure 4B). When ∆θ was zero and the target was on the middle of the bookcase, there was a 90% probability that the participant would walk to the right side of the obstacle, and the remaining 10% of path selection was accounted for by other variables. When ∆θ was negative and the target was on the right side of the bookcase, there was a 100% probability that the participant would walk to the right side of the obstacle. Therefore, the participant did not consider the relative distance to the obstacle nor the safety margins for path selection. However, when the ∆θ was positive (15 deg) and the target was on the left side of the bookcase there was just a 15% probability that the participant would walk to the right side of the obstacle. These findings indicate that participants used a smaller deviation angle which resulted in a less curved path to the target to decide on which path they would take to get to the target.
Our results also showed that changes in the safety margin between the left and right edges of the obstacle affected the path selected to the target ( Figure 4C). Participants chose their path based on the safety margin that had the greatest effect of minimizing a collision from occurring. When the right safety margin was equal to the left safety margin and the target was in the middle of the bookcase, there is an 80% probability of walking to the right side of the obstacle. When the right safety margin was wider than the left safety margin, participants chose the right side of the obstacle to approach the target. However, the probability of choosing the right-side decreased when the left safety margin was wider than the right safety margin. In the case when the safety margin was greatly reduced in size, but participants had enough space to avoid a collision, they chose the larger safety margin to approach the target. It is important to point out here that they chose to not take the shortest path to the target, but instead chose to take the longer path to the target (the one that deviated most from a straight line). This was in spite of the fact they knew they could safely circumvent the obstacle. We suggest this was because they chose the path that required less cognitive effort. The shorter path with a smaller safety margin would have required a greater number of adjustments in gait to circumvent the obstacle. In addition, this additional processing might have slowed their gait. So, they chose to take the longer route to the target by which they would have less cognitive effort and be able to use a faster gait to the target.
The use of a multivariate logistics regression analysis showed that ∆θ , an indicator of target location, was more important than other variables in path planning ( Figure 5). The second most important variable in this analysis was ∆D which indicates distance to the obstacle. These results jointly indicate that a smaller deviation angle which results in a straighter path to the target is the most important consideration in path planning. This finding indicates that participants preferred the path that minimized local variables D and θ . This finding is consistent with the finding of Gérin-Lajoie and Warren 12 . When the ∆D and ∆θ agreed, responses overwhelmingly favored the path with the smallest distance and deviation angle. However, when ∆D and ∆θ were in conflict, participants chose the path with the smallest deviation angle (∆θ ) to the target and not the path with the smallest distance to the edge of the obstacle (∆D). A possible reason for this discrepancy is that the straighter path to the target might be more important than shorter or curved paths to the target. Our findings are not consistent with those of Silva et al 13 which showed that participants used only the minimum distance for path selection.
Unlike previous studies 1-5 which have not included the safety margin in their analyses, we found that the right and left safety margins combined accounted for 26% of the variance in decision making related to path planning. Research 14,15 has demonstrated that individuals tend to initiate an avoidance behavior 4 m from an obstacle. However, to our knowledge there has not been a study which has addressed the importance of safety margins in path planning. Our findings are different from those studies that have restricted path selection using vertical poles 3,16 . These studies showed that individuals do not choose the path between two poles when the distance between the poles is less than 1.4 times of their shoulder width. Our results showed that in addition to ∆D and ∆θ , our participants may have selected a path with the widest safety margin which required the least amount of cognitive effort 17 . Therefore, this finding is consistent with the framework proposed by Harrison et al. 18 allowing for the influence of "soft" constraints (cognitive effort) together with "hard" constraints (∆D and ∆θ ) on behavior.
Knowledge of the intervening obstacle and monitoring body position are necessary for trajectory modifications during gait to the target 19 . The extent to which gaze movement was deployed during visual scene processing in path planning was investigated by comparing gaze distributions and sequences for different obstacle conditions. The allocation of the participant's gaze time was located on the target location, path area, and safety margins is shown in Figure 6. When the obstacle was not present (NOBST condition) the role of vision was modest. In this condition, participants looked primarily at the target location with only a few gazes on the path. Gazes on the target were used to describe the direction of gait to the target location. When an obstacle was present participants looked at the target location, as well as the safety margin and path area. A notable finding was that the gaze sequence on the target location, path area, and safety margin areas changed with the obstacle condition ( Figure 7). The greatest proportion of gaze time was on the target. As participants got closer to the target (time > 80%), gazes on the path or safety margin areas decreased to almost zero. This could be due to participants using their peripheral vision to navigate the path as they approached the target. Earlier along the travel path (time < 10%) there were some gazes on the safety margin and target areas. These gazes allowed for path planning and suggest that the use of visual information (∆θ , ∆D , SM − L, and SM − R) was emphasized. Later in the path taken to the target (25% < time < 45%), participants' gaze shifted to the safety margin area. Gazes shifted to the safety margins when the width of the safety margins was small. After passing the obstacle (45% < time < 80%), there were few gazes on the path area and a greater number of gazes on the target location. Our results collectively support the findings of previous study 19 showing that visual information is needed for path planning to the target. Participants need to know the location of the target, and this information is provided by gazes on the target and path area. When they encounter an obstacle in the path between them and the target, participants need to know the magnitude of the change in direction necessary to circumvent the obstacle. Gazes on the safety margin area are useful for this purpose. When they encounter an obstacle in the path between them and the target, participants need to know the magnitude of the change in direction necessary to circumvent the obstacle. Gazes on the safety margin area are useful for this purpose. While other studies 4,19,20 have generally showed gaze data is used for safe travel during obstacle avoidance, our analyses specified the magnitude for use of gazes in terms of both density and sequencing according to safety margins, path, and target area. Results of the gaze sequence similarity scores (Table 3) showed that when there was an obstacle in the path to the target, and there was a decrease in the width of the safety margin, a different gaze sequence pattern was used by participants. Optimum performance requires gaze to be directed in a way that reduces uncertainty of variables necessary to complete a given task 21,22 .
The finding that the target position had the strongest effect on path selection, and that participants chose a path with the smallest deviation angle from the straight path to the target, is of notable importance for understanding obstacle avoidance. The purpose of the path selection judgement test was to provide a more complete analysis of the weighting given to target location in path selection. The findings for the path selection judgment test (Figure 8) showed that when the target was in the center of the bookcase shelf the probability of walking to the right side of the obstacle was almost 80%. When the target was placed 35 cm on the right from the center of the shelf, the probability of walking to the right side of the obstacle was 100%. When the target was placed 35 cm on the left from the center of the shelf, the probability of walking to the left side of the obstacle was almost 88%. These finding were consistent with our findings in path selection trials for which the participants walked to the target. A notable finding was that when the target was placed 15 cm to the left side of the bookcase center the probability of walking to the right side and left side of the obstacle was equal. The sensitivity of the path selection decision making process is highlighted by the finding that a change in target location of one additional centimeter to the left side (i.e., to 16 cm), which is the equivalent of 0.076 degrees of change in the visual angle, resulted in the participant changing their path selection to the left side of the obstacle. Therefore, the threshold for participants abandoning their preferred side for circumventing the obstacle was 15 cm to the left of the bookcase shelf center.

Conclusion
This study investigated how people choose their path and the visual information used for obstacle avoidance. Furthermore, this study is the first to show that safety margin, target location, and distance to the left and right edges of an obstacle play an important role in path selection. Our findings showed that participants chose a path with a smaller deviation angle from a straight line to the target. In addition, participants chose a side of the obstacle which was closer to them. Unlike previous studies which have not included the safety margin in their analyses, we found that the right and left safety margins combined to account for 26% of the variability in decision making related to path planning. We found that in some cases participants chose a longer path around the obstacle even when the available safety margin which would have resulted in a straight line to the target was large enough to allow passage.
Our gaze analysis findings showed that participants directed their gaze to minimize the uncertainty involved in successful task performance. Gaze allocation was directed to optimize information pick up for successful task performance, and reflected the interaction of target location, path area, and safety margins. Gaze sequence changed with obstacle location. Early in their walk to the target, the greatest allocation of gaze was on the safety margin and target, later in their walk, gaze shifted to the safety margin when it was small, and then gaze shifted primarily to the target after the participant passed the obstacle.
Results of the path selection judgment test showed that when the target was placed 15 cm to the left side of the bookcase center the probability of walking to the right side and left side of the obstacle was equal. Therefore, the threshold for participants abandoning their preferred side for circumventing the obstacle was 15 cm to the left of the bookcase shelf center.

Participants
Twelve normally sighted college students (mean age ± standard deviation: 20.3 ± 1.4 years, ten female) participated in the study. All participants completed the Edinburgh Handedness Inventory 23 , and were right-hand (score 86.1 ± 9.05) and right-foot dominant. None of the participants had a history of neurological and musculoskeletal disorders, or any other conditions that limited their mobility at the time of participation, according to self-report. The experimental protocol was approved by and performed in accordance with the relevant guidelines and regulations of the Indiana University Bloomington at Institutional Review Board and and was conformed to the standards set by the Declaration of Helsinki. All participants provided written informed consent prior to participation.

5/16
Apparatus Figure 1 shows the experimental set-up. The start position was located 7.5 m away from and directly opposite to a 1.84 m (height) × .90 m (width) × .22 m (depth) bookcase with two shelves. The lower shelf was .88 m above the ground. An empty 16 oz cup (the "target") measuring 15.87 cm in height and 8.30 cm in diameter and weighing 275.23 g was on the lower shelf. Three wooden boxes each measuring 45 cm (length) × 32 cm (width) × 24 cm (height) were used to create three obstacles of different widths by arranging the boxes end-to-end so that the total width of the obstacles were 45 cm (one box), 90 cm (two boxes), and 135 cm (three boxes). These obstacles were arranged across the middle of the walkway which was 213 cm in width. The left and right edges of the walkway were marked by a 5 cm wide strip of red tape. The right safety margin (SM R ) was the distance between the right outer edge of the obstacle and the right edge of the walkway, and the left safety margin (SM L ) was the distance between the left outer edge of the obstacle and the left edge of the walkway. The task was to walk to the bookcase at a self-selected pace while avoiding the obstacle and pick up the cup.
Participants' eye movements were measured using a mobile eye tracker from Pupil Labs. Eye movement data was updated at 120 Hz and processed using the attached computer. The eye-tracking software developed by Pupil Labs 24 was used to extract eye tracking data from the recorded videos. A nine-point calibration was performed.
Participants' position in the room was tracked using two Microsoft Kinect cameras. A customized visual studio C++ application based on the Kinect SDK 2.0 was developed and used to detect, track, and record the human motion for post-analysis. For more details of the eye tracker and Kinect, setup see 25 .

Task and Design
The task was to walk from the start position to the bookcase and pick-up the cup positioned on the lower shelf of the bookcase while avoiding an obstacle placed between the start position and the bookcase. There were eight obstacle conditions (As shown in Table 1). Each obstacle condition was determined by left-side and right-side safety margins. In Condition 1 (NOBST), no obstacles were present within the walkway. This condition provided a baseline for validation of the assumption in the literature 1 that the path taken to the cup from the start position would be a straight-line in the absence of an intervening obstacle. This condition also provided a baseline from which the findings for the other obstacle conditions could be interpreted.
The safety margin conditions were crossed with three target (cup) location conditions. The cup was positioned either on the center of the lower bookcase shelf, 30 cm to the left of the lower bookcase shelf center, or 30 cm to the right of the lower bookcase shelf center. Participants walked to the cup three times in a blocked order for each of the safety margin conditions. These experimental manipulations resulted in an 8 (safety margins) × 3 (cup position) × 3 (trials) repeated measures design.

Procedure
At the beginning of each trial, participants stood barefoot at the start position with both feet side-by-side, and shoulder width apart. Participants were then informed which of the safety margin conditions they would perform. They were instructed that they would receive a verbal "ready" command followed by a verbal "start" command from the experimenter, and that they were to commence walking to the bookcase and pick-up the cup when they received the "start" command. Participants were instructed to walk at a comfortable, self-selected pace to the bookcase and pick-up the cup. In those trials when an obstacle was present, participants were instructed to avoid making contact with the obstacle, but that they were free to take any path they liked to reach the bookcase and pick-up the cup. Therefore, participants were not instructed about which side of the walkway they should use to walk to the cup. Participants were also instructed not to step on or over the red tape marking the boundary of the experimental walkway. After participants had picked up the cup at the end of a trial, they placed the cup back to its original position and returned to the start position.
Upon completion of performing the eight obstacle conditions for each of the cup positions, participants were administered a path selection judgement test. For this test, participants were asked to stand at the start position and the cup was placed in the center of the lower shelf of the bookcase and the walkway was setup as that for Condition 3 (i.e., an obstacle was placed in the middle of the walkway such that the left and right safety margins were 61 cm each). The cup position was then successively changed by 5 cm to the left side up to a distance of 35 cm from the center of the shelf. Participants were asked to rate on a 0-10 Likert Scale which side of the obstacle they would walk around to reach the cup when it was in the middle of the shelf and for each 5 cm displacement of the cup. The same procedure was repeated by moving the cup from the center to the right side of the bookcase shelf.

Path data
In this study there were three parameters that may have affected obstacle avoidance, the: a.). Relative distance to the obstacle; b.). Relative angle to the target; and c.). Safety margin. As shown in Figure 2, D L and D R correspond to the distance from the center of the starting position to the left and right edges of the obstacle, respectively. Relative distance is the difference in the 6/16 distance between the right and left sides of the obstacle and can be computed as ∆D = D R − D L . If ∆D is equal to zero, that means that the distance to the right and left sides of the obstacle were equal. If ∆D is positive, that means that the distance to the right side of the obstacle was longer than the distance to left side of the obstacle. The converse is true for a negative ∆D.
The angle between the straight line connecting the target from the starting position and the line connecting the outer left edge of the obstacle from the starting position is the left deviation angle (θ L , see Figure 2). Similarly, θ R represents the right deviation angle and is defined as the angle between the straight line connecting the target from the starting position and the line connecting the outer right edge of the obstacle from the starting position. The relative angle is the difference in the deviation angle between the right and left sides and can be calculated as ∆θ = θ R − θ L . Positive ∆θ indicates that the right deviation angle was larger than the left deviation angle. The converse is true for negative ∆θ . When ∆θ = 0, this indicates that the deviation angles of the right and left sides were equal. The deviation angle from the straight line in the NOBST condition was also calculated for different target positions.
As previously described, the SM R represents the right safety margin and was calculated as the distance between the outer edges of the right obstacle and the walkway. Similarly, the SM L represents the left safety margin and was calculated as the distance between the outer edges of the left obstacle and walkway. Safety margin ratio (SMR) was calculated as SM R divided by SM L . A Safety margin ratio equal to 1.0 means that the right and left safety margins were equal in size. A safety margin ratio greater than 1.0 means that the right safety margin was greater than the left safety margin. The converse is true for safety margins less than 1.0.
Variations in the difference in relative distance (∆D), relative angle (∆θ ) and the safety margins between the left and right sides, were achieved by manipulating the obstacle orientation and target positions. For example, when obstacles were positioned in the middle of the pathway, ∆D was equal to zero and the SM R and SM L were equal in value. In this situation, if the target (the cup) was located in the middle of the shelf, ∆θ was also zero. When the target was moved to the left and right, ∆θ was positive and negative in value, respectively. When obstacles were moved to the right side of the pathway, ∆D was positive and SM R was smaller than SM L . When obstacles were moved to the left side of the pathway, ∆D was negative and SM R was greater than SM L . For each participant, we calculated ∆θ , ∆D, SM R and SM L for a total of 24 levels (8 levels of obstacles × 3 levels of target position).

Eye Tracking Data Calculating gaze density
Gaze behavior across the different target and obstacle conditions was analyzed to determine the information used by the participants for path selection. Records of each participant's trials were processed manually using the recorded trials. To calculate the gaze density, for each frame of the eye recordings we found 2D gaze vector and projected that vector to the ground plane with the reference set at the start position. As a result, gaze density in each trial was calculated using a Gaussian density estimate. These Gaussians were normalized by the total duration of each trial. When we found the coordination of gaze density for each trial, we scaled the result from 0 to 10 and drew a 3D counter plot for each of the different safety margins. Note that the total number of recorded frames in each trial was larger than the number of frames with gazes on the three possible locations (target, safety margin, and path area) because not all of the participants' gaze vectors intersected the three possible locations. Gaze frequency was also calculated as the sum of gazes on each of the area of interests for trials.

The Gaze Object Sequence
To assess gaze order, we quantified each subjects' gaze object sequence and the duration of their gaze sequence. The models of Haji Fathaliyan et al. 26 and Pan et al. 27 were used to calculate gaze object sequence. Gazes on the area of interests were analyzed. A color was assigned for each area of interest, red for safety margin, blue for target, and white for path. Gazes outside areas of interest were not analyzed. Because different trials had different durations, each trial was normalized to the total duration and divided into 100 equal segments (see Figure 3). Gaze sequences were converted to matrix form. Each matrix represents one safety margin condition. In matrix A, different rows (N) indicate number of trials in each safety margin condition. Each column in this matrix represents the gaze position. Then each gaze sequence was represented by a (1 × 100) set of segments. In the first row of this example, the gaze position transitioned from the target to path and then to the target. Then for matrix B, we scaled the result to integer numbers (e.g., "2" indicates target area, "5" indicates path, and "10" indicates safety margin). Matrix C shows average result for a safety margin condition. Based on Matrix C, a plot for every safety condition was generated.
To compare gaze sequences in different obstacle positions we used the "ScanMatch" model 28 which is based on the Needleman-Wunsch algorithm used in bioinformatics to compare DNA sequences. This model aligns one string with one another to maximize a similarity score. For this reason, we calculated a similarity score between different trials. The mean of the similarity scores between obstacle positions were calculated.

Data analysis
Univariate logistic regressions were performed on ∆D, ∆θ , SMR to assess the relationship of each of these parameters on path planning. Ground truth binary labels were Right side = 1 and Left side = 0.
To assess the effect of all parameters together (∆D, ∆θ , SMR) on path selection, a multivariate analysis model was performed. In this model we used a machine learning logistic regression model with a sparse set of features determined by L1 regularization (LASSO) to predict whether a selected path was right or left. To evaluate model performance, we used a leave-one-out cross validation method (Bent et al., 2020). We then calculated the "Variance account for each of parameters" in path planning. The Logistics regression was implemented in Python using the scikit-Iearn machine-learning library.
An 8 (obstacle conditions)×3 (target position) ×3 (gaze position) repeated-measures ANOVA was conducted on gaze frequency to assess how gaze behavior changed as a result of the different obstacle conditions and target positions. For each measure, the three trials within each task for each participant were averaged. Distribution of gaze density was also assessed by the HyBayes package 29 .
A Kolmogorov-Smirnov test was used for different safety margin conditions to assess the normality assumption of similarity scores for gaze sequence. The PROPER method proposed by Jahandideh et al. 30 was used for comparison of similarity scores. A one-way ANOVA was conducted on similarity scores between Conditions 2 to 8 in comparison with NOBST condition to assess how gaze sequence behavior changed as a result of different safety margins. Bonferroni corrected post hoc comparisons were used to further investigate the effect of the safety margin condition on the gaze sequence.
All analyses were performed in Python, and Greenhouse-Geisser epsilon was used to control for violations of sphericity. An alpha level of .05 was used for all tests.     Figure 3. Gaze object sequence calculation procedure. In matrix A, "T" indicates gazes on the target area, "P" indicates gazes on the path area, and "S" indicates gazes on the safety margin area. The colors in the figure correspond to the color-coded objects (Blue: Target, White: Path, and Red: Safety Margin). Each raw gaze object sequence was represented by a (1 × 100) set of frames. In the first line of this example, the gaze object transitioned from the target to path and then to the target. "N" indicates number of trials in each safety margin condition. Matrix B shows convert matrix. We scaled the result to integer numbers (e.g., "2" indicates target area, "5" indicates path, and "10" indicates safety margin). Matrix C shows average result.