{'fraction_non_alphanumeric': 0.03218742691923379, 'fraction_numerical': 0.005272445096413462, 'mean_word_length': 4.819373994803909, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A General Autonomous Driving Planner Adaptive to Scenario Characteristics

Autonomous vehicle requires a general planner for all possible scenarios. Existing researches design such a planner by a unified scenario description. However, it may significantly increase the planner complexity even in some simple tasks, e.g., car following, further resulting in unsatisfactory driving performance. This work aims to design a general planner which can 1) drive in all possible scenarios and 2) have lower complexity in some common scenarios. To this end, this work proposes a pertinent boundary for multi-scenario driving planning. The total approach is named as Pertinent Boundary-based Unified Decision system. Based on the original drivable area, the pertinent boundary can further support motion status and semantics of the traffic elements, which provides the potential of pertinent performance for given scenarios. The pertinent boundary can support unified driving with the drivable area, in the meantime, can be pertinently modified to support the pertinent driving decisions for identified driving scenarios (e.g., car-following, junction left turning). It will further avoid the bump between the connections of the scenarios due to the continuity of space boundary. Thus, the planner is suitable for the fully autonomous driving. The proposed method is validated in different classical driving decision scenarios. Results show that the proposed method can support pertinent driving decisions in identified scenarios, in the meantime, assure generalized cross-scenario planning when no scenario information is available. Such a method shed light on fully autonomous driving by pertinence improvement of multi-scenario decision in the complex real world.


I. INTRODUCTION
A N IDEAL fully autonomous driving planner should be able to deal with various scenarios on the roads, as well as corner cases without specific definitions. This is a big challenge for the driving decision system, which should make the safe decision dealing with this high scenario complexity.
A classical idea is to define scenarios as many as possible and design the corresponding algorithms to drive. Since the DARPA challenges [1], [2], such an idea is widely adopted in the industry, which is the mainstream of ADAS and L3 autonomous driving systems. Such a method can consider the characteristics of the scenarios for a well-tuned performance, e.g. car-following [3], [4], overtaking [5], [6], and junction-turning [7], [8]. Kohlhaas et al. [9] applied different environment models for different upper-level driving maneuvers to establish a multi-scenario decision system. However, autonomous driving is not the parallel connection of individual scenarios. Even though some researchers tried to solve these problems by setting transition zone [10] or adding transition in finite state machine [1], the lack of generalization ability in unexpected scenarios and the increasing system complexity still limit its potential towards fully autonomous driving. A unified decision system is another choice for fully autonomous driving. It usually consists of a unified environment representation and a corresponding planner. The methods can be classified by the types of the input environment models: 1) raw sensor data; 2) drivable area and, 3) element-property template. The brief introductions are as follows: The raw sensor data input is the most generalized form without any special designed processing. Thus theoretically, the corresponding end-to-end decision systems have the best generalization ability. In 2016, NVIDIA's end-to-end driving scheme leaded a research trend [11]. With supervised learning, a deep network is trained to make driving decision directly from raw sensor input [11], [12]. Some researchers used deep reinforcement learning to realize end-to-end driving [13], [14], where raw sensor data (e.g., camera image, LiDAR point cloud) are taken as the state space. In end-to-end driving, there is no explicit perception or environment modeling module. The deep neural network is responsible for perception and decision at the same time, trying to understand the world and make reaction from unprocessed data. Therefore, directly aiming at end-to-end driving in all scenarios needs a huge amount of data to converge in network training. Currently, these methods are still far from mature in real road driving applications.
Drivable area based planners are also highly generalized, modeling the whole free space in a unified data structure of grid map [15], [16] or drivable area boundary [17], [18]. In these approaches, the decision-making process is the same as robots in non-road environments. Considering the traffic rule limit, drivable area provides a safe and legal constraint for autonomous vehicle. This commonly existing constraint could ensure the applicability in different scenarios. There are attempts to apply this free-space driving framework by setting state-lattice in structural roads. For example, Lim [19] set state-lattice along multiple parallel lanes, thus made it possible to apply drivable area based planners to multi-lane scenario. However, this framework could not well adapt to the scenario characteristics. For example, the typical multi-lane driving behaviors (e.g., car following, taking over) cannot be accurately modeled by free space planning. Also, different on-road elements (e.g., vehicles, lanes, traffic lights) are not pertinently considered. As pointed out by Kiran et al. [20], it is required to further consider semantic and dynamic information to realize high-level autonomous driving. Therefore, it would be better to involve more required information to support the consideration of scenario characteristics.
To better meet the requirements of structural road decision, some researchers tried to use element-property template in unified driving decision. Different from decisions with finite state machine, the element-property template in unified driving decision should be commonly applied in different scenarios. In these approaches, the road environment is modeled by listing the environment elements and their properties in a preset template like OpenDRIVE [21] and NDS (Navigation Data Standard) [22]. Shim et al. [20] proposed the unified map by generally considering different types of environments as obstacles, thus decision problems in different scenarios are generalized into obstacle avoiding problem [20], [23]. However, the scenario characteristics are lost. In view of this, some researchers considered the element types in the element-property template. With the multi-lane driving template composed of multiple parallel lanes, leading and following vehicles on each lane, Chen et al. [24], Wang et al. [25], and Fu et al. [26] achieved unified driving decision by setting virtual lanes in the non-lane area (e.g., junctions). Similarly, by setting state space as lanes and vehicles, scenario-unified planning could be achieved based on reinforcement learning [13]. However, as Guo et al. pointed out [27], applying a single decision policy in different complex real-world scenarios might not reach the optimal. With a unified elementproperty template, scenario adaptive ability will be at the cost of increasing complexity of the template and corresponding planner. Especially, this would cause unnecessary complexity in simple scenarios. In the solution by Guo et al. [27], different environment templates (i.e., state space in reinforcement learning) and decision policies were applied in different scenarios. However, this broke the big premise of unified planning by applying different environment models as input, making it not robust to unknown scenarios. Thus, in short, it is still a problem to further consider scenario characteristics to make the pertinent decision, with the prerequisite of unified planning.
In view of these problems, this paper aims to develop a unified planner with the ability to consider the scenarios' characteristics, which is named Pertinent Boundary-based Unified Decision system (PBUD). The main idea is to represent the environment by the pertinent boundary (PB), with motion status and boundary type as the additional status of the drivable space boundary. The objective existence of space boundary ensures the generalization ability of PBUD, avoiding the increasingly required data dimension for complex scenarios with element-property templates. In the meantime, compared to pure drivable area model, the additional semantic and dynamic information provides the potential for pertinent consideration of different on-road elements. We further designed a corresponding unified planner in PB, which could take scenario characteristics into consideration. The contribution of this work lies in: 1) A novel scenario representation method using boundaries with semantics and dynamics (named as pertinent boundary), which can represent the drivable area as well as the scenarios' characteristics. 2) A general driving planner using the pertinent boundary to drive in various scenarios without improving the planning complexity in simple scenarios.
3) An open-source code-base of the proposed planner adaptive to various sensor configurations. 1 The remainder of this paper is organized as follows. Section II will formally define the problem to be solved in this study and introduce the research framework. Section III will analyze the generalization ability of PB, and Section IV will introduce boundary adaption and driving decision that can be pertinent to the given scenario. Section V will provide experiment results in real world driving to prove the scenario pertinence of PBUD. Section VI will conclude this work and point out the future research direction.

A. Problem Definition
The problem that this paper aims to solve can be defined as: 1) proposing an environment model that can support unified driving decisions in different scenarios, and 2) unified driving decision system which could be pertinently adapted to given scenario. Fig. 1 summarizes the problem by illustrating the developing trend of unified decision and the scenario pertinent adaption process: As shown in Fig. 1 (a), a unified decision system requires that the environment model and corresponding planner are general, i.e., are able to unconditionally work in any scenario. If the environment model is too simple, e.g., occupancy grid, it cannot reach high performance due to the lack of details. The developing trend is shown as the gradient-color arrow, with performance curves developing from ① to ④. With more information considered in the unified environment model, the performance of unified decision would be better. Fig. 1 (b) shows the scenario pertinent adaption process. In well-defined scenarios, the decision problem can be depicted with only a few input parameters, e.g., s, v, and v f in car following scenario [3], [4]. The simplified decision problem makes it possible to use pertinent high-level decision to reduce complexity in well-defined scenarios, and further help in reaching the optimal solution for higher performance. In Fig. 1 (b), this trend is shown by the performance curves ④ to ⑤ and the arrows at the side. It is noted that simply redefining the decision problem and abruptly changing the strategy will break the consistency of the unified planner. Thus, the second point lies in scenario-pertinent decision with scenario-unified framework.
In all, the aim of this study is to improve the pertinence to given scenarios, on the condition of maintaining the decision unified. Abstractly, 3 questions need to be answered: 1) How to involve rich details in the environment model while assuring the ability of unconditional application? 2) Is the environment model flexible for scenario pertinent adaption and simplification while keeping the form unchanged? 3) How can driving decision be pertinent to given scenario with the flexible environment model, while maintaining the decision unified?

B. Main Idea
In order to solve the above three questions, we tried to make progress in two aspects, i.e., environment model and decision framework.
First, in order to involve rich details in the environment model while assuring the ability of unconditional application, we combine the element-property list with the drivable area model to generate the proposed PB. The PB is created by loading semantic and dynamic information of the environment elements as the drivable area boundary status for the potential of scenario pertinent decision. Thus, the original space boundary obtained the ability to accommodate environment details without losing data consistency.
Second, as for the decision framework, we do not apply the finite state machine to change decision policy as it will break the unified decision premise. Instead, the scenario-pertinent high-level planners are converted into additional constraints, sharing the same mechanism as the environment constraint of PB. The scenario pertinent upper-level decision reduces the searching scale of lower-level decision without breaking the consistency ensured by PB. Thus, the constrained optimization problem of driving decision is kept unified across different scenarios.
The general framework of the PBUD is shown in Fig. 2.
As shown in Fig. 2, driving decision is abstracted into a constrained optimization problem. The PBUD could be symbolically illustrated as follows: where B i denotes the pertinent boundary at time step i , H represents the planning horizon, i.e., maximum time steps, and B is the set of pertinent boundaries in the planning horizon.
In (2), a PB is consist of n points with state (x s , x d , η), referring to static position, dynamic status, and semantic information. In (3), U refers to the upper-level constraints, determined by upper-level planner f u , making scenario-dedicated decision with PB, driving task k, and identified scenario S. In (4), the final trajectory is determined by lower-level planner f l with PB, driving task, and U . Since this work focuses on the design of pertinent boundary and unified decision-making, some preset conditions are assumed: 1) A perception system that could detect the surrounding objects, along with the autonomous driving map.
2) A controller that can follow the planned trajectory, i.e., a set of trajectory points and a desired speed.
3) A scenario identifier that can tell the current traffic scenario, e.g., car-following, multi-lane driving, junction driving, pedestrian crossing, etc.
In the remainder of this paper, we will solve the 3 questions in problem definition. In Section III, the first question, which is on the ability of involving rich details, will be answered. Afterwards, Section IV will answer the second and third questions about the pertinence on scenarios with maintained planning unity.

III. ENRICHING THE ORIGINAL SPACE BOUNDARY: IMPROVING EXPRESSIVENESS
The PB is based on the objective space boundary, and loaded with additional environment details as boundary status. In this section, we will introduce how to build PB which is enriched by environment element properties.
The original space boundary has the mathematical form of vertex position coordinate list: This form consistently expresses the world by generalizing all the spatial constraints (e.g., vehicles, cyclists, road boundary, red light, etc.) surrounding the ego vehicle. However, the detailed characteristics of different scenarios are lost, which limits its potential of application in autonomous driving, especially in structural roads.
In order to make scenario-pertinent decision, the boundary needs to absorb the abundant and detailed information from the element-property list. Fundamentally, the semantic information should be expressed with PB. Also, the dynamics of the elements should be recorded for safety consideration and collision avoidance, which further forms a temporal limit combining with the prediction module. The pertinent boundary is shown as: where S, D refers to static and dynamic environment elements, B refers to the pertinent boundary. Equation (7) is the boundary representation, where r and θ represent the occupation in the polar coordinate, v refers to the speed value of the boundary, θ v is the direction of the speed vector, and η is the boundary type. Finally, the tempo-spatial limit B is formed by a set of pertinent boundaries in the planning horizon H . For PB construction, online detection from onboard sensors and priori knowledge from static map are the two main inputs. The onboard sensors can provide original space boundary, for example, LiDAR ground extraction [28] and drivable area segmentation with camera [29]. Also, detailed semantic information of obstacles can be obtained from object detection. The static map can offer the physical limits from road structure, along with virtual limits from traffic rule. The construction of the PB is shown in Fig. 3.
It should be noted that the traffic rules are a special type of environment element. Generally, the impact of traffic rules could be divided into two types, namely virtual limits (e.g., solid lanes, stop lines, red light) and decision parameter limits (e.g., speed limit). The virtual limits share the same constraint form as static obstacles, and could be obtained from the map or perception. Thus, they can be considered in PB generation. As for the decision parameter limits, they could be regarded as trajectory sampling constraints, which will be discussed in Section IV. We tested the PB construction in Carla simulator [30], as shown in Fig. 4.
In Fig. 4, the color of boundary section indicates the semantic type of the boundary. The boundary speed is shown as arrows. From this, we can see that the PB can be constructed from map, objects, and drivable area detection, and can load more information than pure drivable area boundary, thus has the potential for scenario pertinent decision.

IV. SCENARIO-PERTINENT PLANNING IN PBUD
This section will answer the second and third questions in Section II. We will analyze the flexibility of PB for pertinence improved application in different scenarios, and introduce how pertinent decision is made while keeping the planner unified.
For clarity, we will formally define the concept of pertinence, and then give a brief introduction of decision framework. Then, we will instantiate the framework for clarity, application and validation. Boundary form consistency and planning unity will be checked along.

A. The Concept of Pertinence
Literally, pertinence refers to the ability to deal with the current matter in a dedicated manner. To give a formal definition of pertinence in driving decision, the pertinence of planning should be defined within the mathematical framework of driving decision. Generally, driving decision (both rulebased [19], [24] and learning-based decision [13], [14]) could be regarded as a constrained optimization problem (COP): where T is the final trajectory output, A refers to the trajectory parameter, C f refers to the cost function, and A denotes the feasible region in the parameter space, formed by the intersection of environment constrained region A e and the trajectory parameter searching region A s . Within this framework, pertinent planning could be defined as the ability to efficiently find the optimal driving decision within the current scenario: Definition 1: Planning pertinence in a given scenario is the ability efficiently and optimally solving the planning optimization problem in (9).
The mathematical expression of Definition 4.1 is: where χ denotes the planning pertinence, and T p refers to the cost time of one planning frame, representing the planning efficiency. T * refers to the optimal trajectory, with the optimal parameters A(T * ). From Definition 4.1, it could be seen that pertinence could be improved by improving efficiency, at the premise of not losing the optimal solution in A. With the COP in (9), the final feasible region A in the parameter space is formed by both environment constraints A e and the A s determined by the upper-level planner. It is natural that the optimal solution T * follows the environment constraint A e . Thus, if the upperlevel planner could make reasonable decision, the optimal solution T * would not be lost. As for the efficiency, it is a compound result of many factors. In this paper, since we focus on the environment representation, we only talk about reducing feasible region. Controlling the optimization solver, the cost function and the environment constraint to be fixed, the main factor becomes reducing the searching region A with A s . The pertinence could then be measured as follows: where V (A s ) denotes the volume of A s in the parameter space. If a sample-based planner is applied, there will be an unavoidable discrete error. Under this condition, A s denotes the minimal continuous region that envelopes the samples.

B. Planning Framework in PBUD
1) General Symbolic Form: According to the main idea of this study, the PBUD framework should not only support general planning across different scenarios, but also act pertinently in well-defined scenarios. Following the mainstream of two-stage driving decision with upper-level and lower-level planners [19], [24], the planning framework of PBUD can be illustrated in Fig. 5: In Fig. 5, the main stream (i.e., black arrow) works unconditionally in different scenarios. It is shown that the trajectory is generated according to B, k and U . The roles of the three parts are shown below: a) B: With PB as the tempo-spatial environment constraints, the trajectory should lie inside PB during the whole time horizon, i.e., A e is set by non-collision constraint to the PB time series B:  where c refers to the collision check between T and B. Generally, a trajectory T is composed of H trajectory points corresponding to the time steps in the planning horizon. Thus, the trajectory point should lie inside the corresponding PB in each time step. The collision check becomes a geometric problem of checking whether a point lies in a closed polygon: where e j refers to the candidate trajectory point at time step j , ( p i j , p (i+1) j ) denotes the boundary section between vertex i and i + 1, di st is the signed distance function from a point to a line section, and d thres is the safety margin. The above principle is shown in Fig. 6. As shown in Fig. 6(a), signed distance could be defined based on the positional relationship to the directed line segment. In Fig. 6(b), the PB is defined in counterclockwise order. If a point lies inside PB, the minimum signed distance di st should be bigger than zero, i.e., the point is to the left side of the nearest boundary segment. In Fig. 6(c), the safety margin d thres is introduced to endure the detection (current PB) or prediction (future PB) error. This process is repeated in each time step to provide safety constraints from B.
According to the literature [31], higher obstacle velocity relates to higher risk. Also, the semantic type of the obstacle will influence the risk. If ego vehicle is faster, higher safety is demanded, which also leads to the increase of the safety margin. The safety margin d thres is set to be positively related to ego speed and boundary speed: where d 0 denotes the size of ego vehicle, v ego refers to ego velocity, and v i is the speed of i th boundary section. k 1 , k 2 are speed ratio parameters, η i is the boundary type ratio, which are linear weights. The safety margin reflects the risk assessment on PB, where different types of objects are considered in a consistent way, as shown in Fig. 7.
As shown in Fig. 7, the safety margins of different PB segments form the safety boundary together, summarizing the element properties into a consistent form. The dynamic boundary segments has a higher safety margin, reflecting the higher risk they might generate. b) k: Task guidance k provides the optimization goal, i.e., cost function, in the COP of (9). Basically, the vehicle should proceed along the preset global guidance line. Besides, customized optimization goals such as comfort [32], fuel saving [33], could also become parts of the driving task.
Generally, with the environmental constraints and task guidance, the trajectory planner can generate an optimized, safe, and legal trajectory. c) U : In well-defined scenarios, dedicated upper-level decision could give some direction to the trajectory planner. In PBUD, this direction from upper-level decision is realized by setting the upper-level constraints U , for example, the trajectory should be in the aimed lane in multi-lane scenarios. Mapped to the parameter space, the trajectory parameter searching region A s could be set. This constraint is set from the upper-level planner, considering both traffic rule indication (e.g., speed limit) and scenario characteristics. Cooperating with B, the feasible area of trajectory parameters is determined as the intersection of A e and A s , as illustrated in (9). In this way, scenario-dedicated pertinent decision can be merged into the main stream, sharing the same mechanism with B.
In summary, the PBUD works unconditionally as a constrained optimization problem, with environment constraint B and driving task k. Despite the scenario and element complexity, the decision problem can be uniformly abstracted into an optimization problem with geometric constraints, thanks to the consistency of PB. Furthermore, the optional upper-level planner can improve decision pertinence without breaking the consistency and universality of general PBUD.
2) Instantiation: In this part, we will instantiate the above abstract PBUD framework. Since the focus of our study does not lie in the planning optimization algorithm or developing any scenario-dedicated decision, we take a classical planner proposed by Werling et al. [32] for instantiation, defining trajectory parameter space, cost function, and mechanism of constraints.
According to Fig. 5, the Werling planner acts as the trajectory planner. It should be noted that other solvers to the COP of (9), including analytical solvers and sample-based solvers, could be applied in the place of the Werling planner. In sample-based solution, with fixed sampling step, the number of sampled trajectories n(A s ) is proportional to the volume of A e , which is therefore an objective measurement of pertinence χ, as shown in (11). a) Parameter space: Trajectory sampling in Werling planner is through the end state sampling. With a given end state τ e , a candidate trajectory T s could be generated as a quintic polynomial to connect start state and end state with the optimal cost function: where τ b and τ e denote the start state (i.e., current vehicle state) and end state respectively, whereas d e , T e , v e denote the lateral decision of the end state, temporal duration of the trajectory and the speed of the end state respectively.
Since T e is the fixed planning horizon, the parameter space is settled as the two dimensional space of d e and v e . b) Environment constraint A e : A e provides the safety constraints in PBUD. With Werling planner, (12)(13)(14) work as collision checker, the candidate trajectories that do not satisfy the environment constraint A e are disqualified. c) Trajectory sampling constraint A s : The trajectory sampling constraint is set according to the requirement of the scenario. In other words, the decision parameters will be constrained according to the upper-level planner. In PBUD with Werling planner, A s is set in the following form: where d L and d H are the lateral limits of end state sampling, and v H is the highest sampled speed. Those thresholds should be set according to the scenario dedicated upper-planner, which will be discussed in the next section. When the scenario is well-defined, the task of improving pertinence lies in limiting the sampling range of d e and v e while not losing the optimal solution. In undefined scenarios, A s is set as the maximum sampling range. d) Cost function C f : The cost function in the planner is set as: In cost function 19, k j , k t , k d and k v are the weights, v des is the desired speed from the upper-level planner (if any). When there is no scenario-dedicated upper-level planner, v des is set to the fixed value of v H .
In the next section, we will examine the performance of PBUD in different types of scenarios with the above instantiation.

V. EXPERIMENTAL RESULT
In this section, the proposed PBUD is tested in some typical driving scenarios. In each type of scenario, we will first examine the performance of PBUD, esp. the mechanism of pertinence improvement by involving upper-level planner for this type of scenario. The framework consistency will be checked along. Then, comparative analysis will be carried out to validate PBUD in pertinence improvement.
Three classical unified decision systems are taken as benchmarks, namely SUD (sample-based unified decision), LaneUD (lane-level unified decision) and BUD (boundary based unified decision). We set the benchmarks within the common COP framework of 9. To validate the proposed PBUD framework, the sampling strategy and optimization algorithm are kept the same as Section IV(B). The comparison will be focused on the pertinence of PBUD and the benchmarks, i.e., the ability of reducing complexity without losing optimal solution.
The detailed design of the benchmarks will be discussed below. Since the sampling strategy and optimization problem are set in common, only the overall framework and the environment model will be discussed. The SUD is set in element-property template, regarding the entire autonomous driving process as collision avoidance against different types of elements. The environment model of SUD is based on Shim et al. [20], where all the environment elements are unified as obstacles. The LaneUD is also set in elementproperty template. The key point of LaneUD is generally utilizing the multi-lane driving template composed of multiple parallel lanes, leading and following vehicles on each lane. Chen et al. [24], Wang et al. [25] and Fu et al. [26] applied the LaneUD framework to achieve unified planning across different scenarios. Different from SUD and LaneUD, the BUD is based on drivable area boundary rather than the elementproperty template. The boundary in BUD is the space occupation boundary in [17], [18] rather than the state-expanded PB in this paper. In short, the SUD, LaneUD and BUD could represent three widely applied types of schemes in unified driving, as analyzed in Section I.
The cases are set in Carla simulator [30]. Multi-lane scenarios, junction scenarios and an undefined scenario are inspected. Note that other custom scenario-dedicated decisions, e.g., railway crossing, ramp merging, could also be involved in PBUD with the same mechanism.
According to the preliminaries stated in Section 2, perception and control system are required to test the proposed PBUD. Here we take the ground truth of map and vehicles from the simulator as the perception input. In addition, for off-road driving, a 32-line LiDAR will detect the drivable area boundary. Also, a PID controller is applied to follow the planned trajectory. As shown in Fig. 8, the PBUD main stream (i.e., black arrows) is kept, with environment constraint A e and cost function C f . To realize pertinent driving, the upper-level planner generates the trajectory sampling constraint A s , which works in turn with A e to determine feasible trajectories for the cost function to make choice. It can be seen that the consistency of PBUD is not broken by the involvement of upper-level planner in this in-lane scenario.
According to scenario requirement, the PB is adapted into the combination of free sections of all the lanes with the same driving direction, thus the gap between a lane-keeping vehicle and the lane boundary is omitted: where l refers to a traffic lane, G is the set of guidance lines derived from map and driving task, and R l is the free section on the lane. Thanks to the extended status in PB, the upper-level planner could find the required information from PB. In this example, to make the lane-following decision, the front status (i.e., longitudinal position and velocity) s f , v s f and the back Here we take the Intelligent Driver Model (IDM) [3] as the lane-following strategy, and Minimizing Overall Braking Induced by Lane change (MOBIL) [34], to generate the desired lateral position d des and the desired longitudinal speed v des . Note that other custom lane-changing strategies are also possible.
Finally, the trajectory parameter searching region A s is set as: where d des is the lateral distance of desired lane g, and w l denotes the lane width.
With the upper-level decision, the end state sampling only needs to be carried out in the desired lane, and the end speed v e only needs to be sampled below the desired speed. Thus, the volume of A s is reduced without losing optimal solution, i.e., pertinence is improved. In addition, the involving of A s does not break the consistency of PBUD main stream. Fig. 9 further shows the performance of PBUD in some other in-lane scenarios: In (a), lane-changing decision is made by upper-level planner due to higher utility of adjacent lane. Sampling is carried out in the aimed lane by setting end state in the lane.
In (b), it is shown that the PBUD could not only deal with standard multi-lane scenario where vehicles are all following lanes, but also flexibly deal with lane-changing vehicles and roadside stopping vehicles.
In (c), a pedestrian is unexpectedly crossing the road, and the ego vehicle should perform an emergency stop. With the collision check module, the lower-level planner finally adopted the braking trajectory, and the vehicle performed an emergency stop.
As shown in Fig. 9(c), the end state not only follows (22)(23), but also lies in the temporal corresponding PB. A s is then further constrained based on (24): where p e denotes the position of end state. By involving the environment constraints in advance, sampling number n(T s ) could be further reduced without changing the planning result.
From the three in-lane scenario cases, it can be seen that the PBUD is highly flexible, and perform pertinently in different derived in-lane scenarios.
2) Comparative Analysis: For comparative analysis, a multi-lane scenario in Carla Town03 is applied for test. Fig. 10 shows the scenario layout.
The multi-lane scenario is a well-defined scenario, where ego vehicle is required to make smooth car-following or lanechanging decision. Here we will check the performance of the PBUD and three benchmarks, as shown in Fig. 11 and Table I. Note that average samples and average acceleration are counted in the steady car following period (over 80% of final speed). For PBUD and BUD, the gray line shows the predicted boundary at the end of planning horizon, which is applied to limit trajectory end state sampling.
In Table I, there are two types of indicators, i.e., complexity indicators and performance indicators. According to Definition 4.1, higher pertinence refers to lower complexity with higher performance. According to 11, the complexity is measured by the volume of parameter searching space V (A s ). Here we set the sampling resolution of PBUD and benchmarks to be fixed and the same, thus the number of samples is a measure of complexity. For the performance indicators, they are set according to the scenario. In this lane-following scenario, the vehicle is required to have smooth and comfort performance, with average acceleration as the indicator.
From Fig. 11 and Table I, we can see that the SUD samples in the full range in the static map limit, resulting in the highest number of samples. Although safety is ensured by collision check with all the obstacles, the car following process is not  steady, with a relatively high fluctuation of speed. Similarly, the BUD also treats the scenario as free driving, making samples within the whole drivable area. In decision illustration of BUD, the predicted boundary at the end of planning horizon is shown in the gray color. With the limit of drivable area boundary, the sample number is lower than SUD. However, since semantic and motion status of the boundary is not considered in the plain BUD, the car following is not steady, with a even higher fluctuation than SUD. Different from the above two unconditional decisions, LaneUD has a steady car following performance. The sampling process is directed by the upper level planner (car following strategy), thus the sample number is greatly reduced. This further contributes to the searching of optimal decision, resulting in a steady car following performance. As for the PBUD, with the additional semantic and motion status, PBUD performs better in the car following scenario compared to the BUD. This results in similar sampling scale and average acceleration with scenario dedicated LaneUD. This proved that the PBUD can make pertinent decision in well-defined scenario.
B. Junction Scenario 1) PBUD for Junction Scenarios: Fig. 12 shows the performance of PBUD for the typical junction scenario.
As shown in Fig. 12, junction scenarios are freer than in-lane scenarios, so the drivable space is no longer the combination of free lane sections.
For the upper-level planner, virtual lanes are set in the scenarios as in NDS [22]. Lateral decision can be made similarly to the in-lane scenarios considering the front and back status of the boundary, as shown in Fig. 12. As for the sampling process, A s is not determined by the road boundary or solid lane boundary like in-lane scenarios.
The position of end state should lie in the temporal corresponding PB. The sampling process is illustrated in the following formulae: (27) where d max is the maximum sampling range, and p e denotes the position of end state. Different from multi-lane driving where sampling is limited in the lane width, lateral sampling range is extended. When the desired lane is the leftmost lane, i.e., i = i min , the left lane boundary will be removed, allowing lateral maximum sampling to −d max . This is the same for the rightmost lane. The extended range allows for possible better solution than the strict lane width limit. Also, sampling is carried out inside PB with (27), the same as in 24.
In Fig. 13, the performance of PBUD in two complex junction scenarios is illustrated. Also, the consecutive lane-junction driving in (b) shows the coherence of PBUD across different scenarios. With continuous guidance lines, and consistent PB that can reveal the characteristics of the scenarios with different boundary parts in a continuous and consistent form.
From the performance of PBUD in junction scenario, it could be seen that PBUD could support pertinent upper-level planning while keeping the framework unified.
2) Comparative Analysis: We set an unprotected junction scenario (i.e., no traffic light) in Carla Town05. Fig. 14 shows   the scenario layout. The ego vehicle will drive into the junction following a leading vehicle, while another vehicle enters the junction from the right side, requiring the ego vehicle to make a proper reaction.
The performance of the PBUD and three benchmarks are tested in this scenario, as shown in Fig. 15 and Table II. Since junction driving is a 2D process rather than car-following, we use trajectory instead of speed profile. To illustrate the driving speed, the positions are marked every 0.5s, like a ticker-tape timer. In this scenario, the right side vehicle will interrupt the car-following process, which is the main factor. Therefore, the trajectory of the right side vehicle will be shown in blue color. Note that the blue trajectory only reveals part of the right side vehicle trajectory before ego vehicle passed it in the longitudinal direction.
In the table, minimum distance is the indicator of safety, and is supposed to be higher. "Average samples" indicates the complexity, while the other two indicate the performance.
From Fig. 15, we can see that SUD, BUD, and PBUD chose to avoid the right vehicle by driving to the left side, and the right vehicle stopped to wait for ego vehicle to pass, as shown in the dense blue points at the end of its trajectory. With LaneUD, ego vehicle stopped to wait for the right vehicle, forming dense red points before the intersecting point. This is because the LaneUD cognized the scenario as multi-lane driving, and regarded the right vehicle as a front vehicle, calling for braking to avoid longitudinal collision. The PBUD chose to use junction driving strategy rather than multi-lane driving strategy, showing that the PBUD can make pertinent decision in this scenario.
From the statistics in Table II, it can be seen that the SUD has the largest sampling scale, while the LaneUD samples the least. Although the complexity is reduced in LaneUD, the better avoiding solution is excluded. As for the performance, the braking of LaneUD makes it less smooth than the others. Since the BUD does not involve semantic and motion status, the drivable area boundary cannot tell static and dynamic obstacles, resulting in the smallest distance and a higher risk. Differently, the SUD and PBUD could set a bigger safety threshold for the moving vehicle than static map boundary. Thus, the avoiding decision is made earlier than the BUD, resulting in a safer distance, as shown in the zoomed trajectories in Fig. 15. In summary, the better performance of PBUD than LaneUD and PBUD, along with the lower sampling complexity, proved the pertinence improvement of PBUD in this scenario. C. Off-Road Scenario 1) PBUD for off-Road Scenarios: Fig. 16 shows the framework of PBUD for free off-road scenarios. Fig. 16 is set in a non-road square. In off-road driving, e.g., square driving in residential area, a unified decision system should make safe decision and planning while driving along the task guidance. No structural road rule limit needs to be considered in such scenarios, and there is only one guidance line, i.e., the driving task line.
Since the scenario is not well-defined, common decision logic of the PBUD mainstream is adopted without upper-level decision. Thus, sampling range is set to maximum. End state checking with corresponding PB could still be adopted for simplification. A s is then set as: (30) In the unconditional solution of PBUD, no scenario characteristics need to be considered. In this case, the PBUD is nearly equivalent to unified decision based on unconditional sampling.
2) Comparative Analysis: The above off-road scenario is applied for comparative analysis. Similar to the environment of robotic application, the ego vehicle has to drive in an irregular space, avoiding vehicles, pedestrians and unknown obstacles (tables and flowerpots in this example).
The performance of the PBUD and three benchmarks are tested in this scenario, as shown in Fig. 17 and Table III. Here the trajectories are shown with the ticker-tape timer with gap of 1s. In this scenario, the two vehicles are parked, shown as two static rectangles. Three pedestrians will interrupt the ego vehicle, walking at a low speed of 0.5m/s. Note that the blue trajectories only reveal the part of the pedestrian trajectories before the ego vehicle drove past them.  In this scenario, the vehicle is supposed to smoothly and quickly bypass the obstacles and reach the destination. Therefore, two performance indicators are chosen. Average acceleration is applied to measure smoothness, whereas total time consumption is taken to measure total efficiency. Note that the time consumption is not one-step time consumption, thus not related to average samples measuring decision complexity.
From Fig. 17 and Table III, we can see that only LaneUD chose to stop and wait for the third pedestrian to cross. SUD, BUD, and PBUD chose to avoid, like in the junction scenario. This is because LaneUD recognizes the pedestrian as the leading obstacle, misuse of car-following strategy and the strict limit of sampling missed the optimal solution in this scenario. SUD and BUD are suit for the free scenario, where obstacle avoidance in SUD and the drivable area limit in BUD helped them in looking for optimal solution in a wide sample range. The drivable area limit in trajectory sampling reduced the sampling scale in BUD. However, since the BUD does not consider semantic and motion status in safety threshold setting, the minimum distance to collision is smaller than SUD. As for the proposed PBUD, the objective space boundary ensures the basic driving performance in off-road or unrecognized scenario. Also, the semantic and motion status information helped it to achieve comparable performance to SUD (better than BUD). In summary, the better performance of PBUD than LaneUD and BUD, along with the lower sampling complexity proved the pertinence improvement of PBUD in this scenario.

VI. CONCLUSION
This paper proposed a novel unified driving system that allows scenario pertinent performance. Firstly, the environment model of PB was established to combine the decision required information of occupation, semantics and dynamics with the unified expression of space boundary. The commonly existing space boundary ensures unconditional application. Secondly, the additional semantics and dynamics could support the consideration of scenario characteristics, and could be adapted with constraint form unchanged. Finally, experiment results indicate that the proposed PBUD has pertinent performance according to different driving scenarios, reducing the complexity of decision for optimized performance, whereas a general solution is assured in undefined scenarios. The environment model consistency and the planner unity are maintained in scenario-oriented adaption, providing coherent performance across different scenarios.
Theoretically, the PBUD could be extended to other scenarios by converting the scenario pertinent upper-level decision into the standard constrained optimization problem. The performance of PBUD in other complex scenarios will be discussed in future work. Also, the boundary sections are independently considered without an overall understanding of the environment. Hence, more research could aim at the overall driving environment understanding, which can be derived from the curvilinear integral properties of the closed PB. Furthermore, the mechanism of scenario influence on overall environment understanding will be further studied. Also, the uncertainty of PB construction and the downstream impact on driving decision is not discussed in depth. Thus, another focus of our future work will be on the uncertainty estimation and handling. In all, the scenario-pertinent flexibility of a general and comprehensive environment model could provide higher performance potential for a united driving system, thereby benefiting for the development of multi-scenario driving system of autonomous vehicles.