A Driving Behavior Planning and Trajectory Generation Method for Autonomous Electric Bus

: A framework of path planning for autonomous electric bus is presented. ArcGIS platform is utilized for map-building and global path planning. Firstly, a high-precision map is built based on GPS in ArcGIS for global planning. Then the global optimal path is obtained by network analysis tool in ArcGIS. To facilitate local planning, WGS-84 coordinates in the map are converted to local coordinates. Secondly, a double-layer ﬁnite state machine (FSM) is devised to plan driving behavior under different driving scenarios, such as structured driving, lane changing, turning, and so on. Besides, local optimal trajectory is generated by cubic polynomial, which takes full account of the safety and kinetics of the electric bus. Finally, the simulation results show that the framework is reliable and feasible for driving behavior planning and trajectory generation. Furthermore, its validity is proven with an autonomous bus platform 12 m in length.


Introduction
Autonomous driving technology improves active traffic safety and brings convenience to human beings.It has received much attention from researchers and scholars.Compared with unmanned cars, autonomous busses drive on relatively fixed routes, at relatively slow speeds, and for shorter distances in urban areas.At the same time, the role of bus drivers is transformed into a bus safety officer to decrease manpower fatigue.Thus, autonomous busses are more likely to come about earlier than driverless cars in everyday life.However, driving behavior planning and trajectory generation are still a challenging problem for autonomous vehicle technology.
During the global planning stage, global routes are determined by a high-precision digital map and a localization system [1].The global planning methods include the artificial potential field (APF) [2], cell decomposition [3], visibility graph [4], Voronoi diagram [5], and probabilistic road maps [6].All these methods establish the model of the environmental map by grid or nodes and then compute the weights to search the optimal path.They are time consuming, especially in complex environments.Many scholars focus on sampling-based algorithms for on-line path planning such as the probabilistic roadmap method (PRM) [7] and the rapidly-exploring random tree (RRT) [8].Unfortunately, these methods produce solutions that are suboptimal or even far from optimal and the resulting path is not continuous.Nowadays, more and more researchers begin to apply intelligence computation to solve this problem.For instance, [9] proposes a global path planning of wheeled robots by multi-objective memetic algorithms (MOMAs).A modified particle swarm optimization (PSO) algorithm is utilized to obtain a high-quality global path for a mobile robot in [10].An intelligence algorithm could find the global optimal solution, but it needs more computation time.
Local planning contains two parts, driving behavior planning, and trajectory generation.Driving behavior of the autonomous bus is determined by global planning and perception information [11].
For example, [12] introduces a driving decision mechanism based on decision tree, and the multiple criteria decision making is utilized in [13].Reference [14] presents an integrated behavioral inference and decision-making, it simulates vehicle behavior for both autonomous vehicle and nearby vehicles.Meanwhile, [15] proposes a human-like decision-making algorithm to address decision making problem in dynamic, uncertain scenarios such as the simple intersections and roundabouts.However, these methods often explore unlikely regions of the belief space and increase the calculation time.Finite state machine (FSM) is expressed by the sequences of driving behavior [16,17], it is a practical discrete sample method which is usually applied to driverless vehicle system.However, it is more suitable for specific and simplified situations and not robust to a varied world.
Generally, trajectory planning is an essential and key part of robotics motion planning.Nowadays, many researchers usually rest on some simple assumptions about the vehicle kinematics.The trajectory is expressed by a variety of methods, including polynomial [18], Bezel curve [19], Spline curve [20], and so on.A quaternary fourth order polynomial and the dynamic bicycle model are adopted in [6] to describe the vehicle motion equation.Reference [21] uses a family of parameterized trajectories, which contains geometric constraints and performance index.These methods are usually converted into constrained optimization, which increase the complexity greatly.
Extensive studies have been conducted on autonomous vehicles recently, but few have studied the technology of autonomous busses.In this paper, we mainly propose a framework that is applied to an autonomous electric bus successfully.For global planning, we apply ArcGIS to model a road network and plan a global optimal path.ArcGIS is convenient to build and edit a road network for autonomous bus, such as setting road properties, traffic facilities and so on.Besides, it is more efficient and stable to search an optimal path by ArcGIS for the road network.To overcome shortcomings of traditional FSM, a double-layer FSM is utilized to reduce the complexity of driving behavior transfer and enhance the stability in different driving scenarios.Local trajectory generation requires a faster reaction time than global planning to deal with obstacles effectively, and the trajectory should satisfy curvature continuity.Cubic polynomial curves meet the demand and its few paraments reduce calculation time.
The remainder of this paper is organized as follows.Firstly, the framework of path planning for autonomous bus system is introduced in Section 2. Next, map-building and global planning are described in Section 3. Section 4 presents the method of driving behavior planning and trajectory generation is introduced in Section 5. Section 6 provides simulations and results of field test in real-world scenarios.Finally, some conclusions of this paper follow in Section 7.

Framework
Path planning provides safe and reliable maneuvers under various driving environment, and it is the basis for autonomous vehicle to drive without human intervention.Figure 1 shows the framework of the path planning system.An integrated navigation system (GPS/IMU) provides vehicle speed, heading angle, and global position.The perception layer provides environmental information including static or dynamic obstacles and road information for path planning.Global planning is employed to find the optimal path from the current position to the destination in the high-precision GIS map form.Local planning plans appropriate driving behaviors and generates a smooth trajectory for the autonomous bus to follow the route.
In this paper, global planning is based on ArcGIS.Firstly, a high-precision GIS map is built according to original GPS data of path, which represents the road geometry.Then, the network analysis tool of ArcGIS is utilized to search for the optimal route in the high-precision map based on the current location which can be obtained by GPS/IMU.
Local planning contains two parts: driving behavior planning and optimal trajectory generation.Driving behavior planning imitates an experienced driver to give reasonable driving behaviors (e.g., lane changing, overtaking or following the vehicle ahead) based on perception information and global waypoints.Double-layer FSM (finite state machine) is proposed to execute a rule-based decision process under different driving scenarios.The trajectory generation module generates a safe Future Internet 2018, 10, 51 3 of 14 and feasible path for autonomous bus.Here, a cubic polynomial is used to express optimal trajectory smoothly, which fully considers the kinetics and safety of the bus.Local planning contains two parts: driving behavior planning and optimal trajectory generation.Driving behavior planning imitates an experienced driver to give reasonable driving behaviors (e.g., lane changing, overtaking or following the vehicle ahead) based on perception information and global waypoints.Double-layer FSM (finite state machine) is proposed to execute a rule-based decision process under different driving scenarios.The trajectory generation module generates a safe and feasible path for autonomous bus.Here, a cubic polynomial is used to express optimal trajectory smoothly, which fully considers the kinetics and safety of the bus.

Map Building and Global Path Planning
Map-building is one of the core driverless technologies, which is crucial for positioning, navigation and control of autonomous electric bus.With the development of sensor technology, now accurate positioning of the lane through the GPS/IMU can be obtained.In this section, a highprecision map is constructed by ArcGIS.
ArcGIS offers a unique set of capabilities for applying location-based analysis to business practices.It is widely used for topographic map building [22] and map data analysis [23].Here, a path is divided into two types which are the general path and special path, respectively.The path in GIS contains two parts: edge and node.All nodes are connected by the edges in order with no break point.

Map-Building in General Path
The general path refers to a straight lane and has no large turn.Original GPS data is imported to ArcGIS to build road network.The path in the GIS map is connected by edges in order.To reduce the amount number of GPS data, original data are filtered by setting the distance interval, which means the distance between nodes is d, as shown in Figure 2 (d ranges from 5 m to 10 m here).

Node Edge GPS point d
Lane centerline

Map Building and Global Path Planning
Map-building is one of the core driverless technologies, which is crucial for positioning, navigation and control of autonomous electric bus.With the development of sensor technology, now accurate positioning of the lane through the GPS/IMU can be obtained.In this section, a high-precision map is constructed by ArcGIS.
ArcGIS offers a unique set of capabilities for applying location-based analysis to business practices.It is widely used for topographic map building [22] and map data analysis [23].Here, a path is divided into two types which are the general path and special path, respectively.The path in GIS contains two parts: edge and node.All nodes are connected by the edges in order with no break point.

Map-Building in General Path
The general path refers to a straight lane and has no large turn.Original GPS data is imported to ArcGIS to build road network.The path in the GIS map is connected by edges in order.To reduce the amount number of GPS data, original data are filtered by setting the distance interval, which means the distance between nodes is d, as shown in Figure 2 (d ranges from 5 m to 10 m here).Local planning contains two parts: driving behavior planning and optimal trajectory generation.Driving behavior planning imitates an experienced driver to give reasonable driving behaviors (e.g., lane changing, overtaking or following the vehicle ahead) based on perception information and global waypoints.Double-layer FSM (finite state machine) is proposed to execute a rule-based decision process under different driving scenarios.The trajectory generation module generates a safe and feasible path for autonomous bus.Here, a cubic polynomial is used to express optimal trajectory smoothly, which fully considers the kinetics and safety of the bus.

Map Building and Global Path Planning
Map-building is one of the core driverless technologies, which is crucial for positioning, navigation and control of autonomous electric bus.With the development of sensor technology, now accurate positioning of the lane through the GPS/IMU can be obtained.In this section, a highprecision map is constructed by ArcGIS.
ArcGIS offers a unique set of capabilities for applying location-based analysis to business practices.It is widely used for topographic map building [22] and map data analysis [23].Here, a path is divided into two types which are the general path and special path, respectively.The path in GIS contains two parts: edge and node.All nodes are connected by the edges in order with no break point.

Map-Building in General Path
The general path refers to a straight lane and has no large turn.Original GPS data is imported to ArcGIS to build road network.The path in the GIS map is connected by edges in order.To reduce the amount number of GPS data, original data are filtered by setting the distance interval, which means the distance between nodes is d, as shown in Figure 2 (d ranges from 5 m to 10 m here).

Node Edge GPS point d
Lane centerline

Map-Building in Special Path
The special path refers to a path with a corner of a relatively large angle, such as intersections or ramps.Besides, there is no lane line can be detected by perception layer.The GPS data of special path is saved in special path database.Meanwhile, special mark points are respectively set on the two ends of the special path which are entry point and exit point.They are the key points to distinguish the general path and special path (Figure 3).The yellow line is only to keep path integrity in ArcGIS while the GPS points are the true global path.
Future Internet 2018, 10, x FOR PEER REVIEW 4 of 15

Map-Building in Special Path
The special path refers to a path with a corner of a relatively large angle, such as intersections or ramps.Besides, there is no lane line can be detected by perception layer.The GPS data of special path is saved in special path database.Meanwhile, special mark points are respectively set on the two ends of the special path which are entry point and exit point.They are the key points to distinguish the general path and special path (Figure 3).The yellow line is only to keep path integrity in ArcGIS while the GPS points are the true global path.Finally, two databases are established: GIS database and special path database.GIS database stores the road network information created by ArcGIS and the special path database stores GPS data of ramps or intersections.

Global Path Planning Based on ArcGIS
The road network map consists of two basic elements which are edges and nodes respectively, which forms a topology network structure.The direction of road, markers, and the other rules are all created in advance in the map.The global planning is to find the best path from the initial position to the destination based on such a network topology.
ArcGIS supports the network analysis very well based on the Geometric Network.So the global path planning is adopted by network analysis tool of ArcGIS.Then we can get the optimal path and all features (edges and nodes) of the path.The nodes in the global optimal path are the reference points for local planning.Besides, instead of planning one specific path to the destination, the global planning plans the path dynamically based on the current location of the bus.

Conversion of the Coordinate System
The built map is based on WGS-84 coordinate system, which is not suitable for local planning and control.WGS-84 coordinate system is transferred to local coordinate.Figure 4 displays the three types of coordinate systems.'East-north-up' coordinates are a coordinate system where the X axis is lattitudinal, the Y axis is longitudinal, and the Z axis vertical.Finally, two databases are established: GIS database and special path database.GIS database stores the road network information created by ArcGIS and the special path database stores GPS data of ramps or intersections.

Global Path Planning Based on ArcGIS
The road network map consists of two basic elements which are edges and nodes respectively, which forms a topology network structure.The direction of road, markers, and the other rules are all created in advance in the map.The global planning is to find the best path from the initial position to the destination based on such a network topology.
ArcGIS supports the network analysis very well based on the Geometric Network.So the global path planning is adopted by network analysis tool of ArcGIS.Then we can get the optimal path and all features (edges and nodes) of the path.The nodes in the global optimal path are the reference points for local planning.Besides, instead of planning one specific path to the destination, the global planning plans the path dynamically based on the current location of the bus.

Conversion of the Coordinate System
The built map is based on WGS-84 coordinate system, which is not suitable for local planning and control.WGS-84 coordinate system is transferred to local coordinate.Figure 4 displays the three types of coordinate systems.'East-north-up' coordinates are a coordinate system where the X axis is lattitudinal, the Y axis is longitudinal, and the Z axis vertical.B L H represents the GPS data received from GPS/IMU which is the coordinate origin.B, L, and H represent longitude, latitude, and geodetic height in geocentric coordinate system.Then convert it to rectangular coordinate system ( , , ) by Equations ( 1)-( 3) where n R is radius of curvature in prime vertical and e is the first eccentricity of ellipsoid.b a, are semimajor axis of ellipsoid and semiminor axis of ellipsoid, respectively.
( , , ) Finally, we can get the ) ' , ' ( y x in local coordinate by (5) where, yaw is the heading angle of the bus.

Top-Layer FSM Design
The map data of general path and special path comes from GIS database and special path database, respectively.In addition, the driving behavior under the two types of paths is different; for instance, overtaking is not allowed in special path so as to ensure safe driving for bus.Therefore, the state of top-layer FSM is devised as {general path (R1) and special path (R2)}.The type of road is distinguished by the entry point and exit point which are marked in global map (see Figure 3).The trigger events as follows: (B, L, H) represents the GPS data received from GPS/IMU which is the coordinate origin.B, L, and H represent longitude, latitude, and geodetic height in geocentric coordinate system.Then convert it to rectangular coordinate system P(X P , Y P , Z P ) by Equations ( 1)-( 3) where R n is radius of curvature in prime vertical and e is the first eccentricity of ellipsoid.a, b are semimajor axis of ellipsoid and semiminor axis of ellipsoid, respectively.P(x Q , y Q , z Q ) is a point in rectangular coordinate.Then, the point (x QP , y QP , z QP ) in east-north-up coordinates is given by (4).
Finally, we can get the (x , y ) in local coordinate by (5) and provide the (x , y ) for local path planning.
x = x op * cos yaw − y op * sin yaw y = y op * cos yaw + x op * sin yaw where, yaw is the heading angle of the bus.

Top-Layer FSM Design
The map data of general path and special path comes from GIS database and special path database, respectively.In addition, the driving behavior under the two types of paths is different; for instance, overtaking is not allowed in special path so as to ensure safe driving for bus.Therefore, the state of top-layer FSM is devised as {general path (R1) and special path (R2)}.The type of road is distinguished by the entry point and exit point which are marked in global map (see Figure 3).The trigger events as follows: T1: The bus passes the entry point.T2: The bus passes the exit point.Thus, the top-layer state transition shows in Figure 5.

Bottom-Layer FSM Design
Driving scenarios for driverless bus are relatively simple and bus usually travels in a fixed route.In this section, the driving state set is designed as {structured driving (Q1), unstructured driving (Q2), following (Q3), overtaking (Q4), buffer adjustment (Q5), and special path (Q6)}.The corresponding external trigger events are devised based on the above states, which mainly divided into the following categories: • E1/E2: The moving vehicle in front of the bus enters/disappears in detection area.

•
E3/E4: The lane information from perception is valid/invalid.
• E5: The bus enters the buffered road.According to the states and the trigger events, the bottom-layer FSM possesses six states, as shown in Figure 6.In our system, different behaviors also determine the local reference points which is used for trajectory generation.

Bottom-Layer FSM Design
Driving scenarios for driverless bus are relatively simple and bus usually travels in a fixed route.In this section, the driving state set is designed as {structured driving (Q1), unstructured driving (Q2), following (Q3), overtaking (Q4), buffer adjustment (Q5), and special path (Q6)}.The corresponding external trigger events are devised based on the above states, which mainly divided into the following categories: According to the states and the trigger events, the bottom-layer FSM possesses six states, as shown in Figure 6.In our system, different behaviors also determine the local reference points which is used for trajectory generation.
T2: The bus passes the exit point.
Thus, the top-layer state transition shows in Figure 5.

General path
Special path T1 T2

Bottom-Layer FSM Design
Driving scenarios for driverless bus are relatively simple and bus usually travels in a fixed route.In this section, the driving state set is designed as {structured driving (Q1), unstructured driving (Q2), following (Q3), overtaking (Q4), buffer adjustment (Q5), and special path (Q6)}.The corresponding external trigger events are devised based on the above states, which mainly divided into the following categories: • E1/E2: The moving vehicle in front of the bus enters/disappears in detection area.

•
E3/E4: The lane information from perception is valid/invalid.
• E5: The bus enters the buffered road.According to the states and the trigger events, the bottom-layer FSM possesses six states, as shown in Figure 6.In our system, different behaviors also determine the local reference points which is used for trajectory generation.

•
Unstructured driving: Lane lines fail to be identified by perception layer in this stage.A check zone is set manually and detect the threaten obstacles in this area.Then check whether a dangerous obstacle exists in the check zone.For instance, in Figure 7, C1 is a threat for the bus while C2 is not.

Optimal Trajectory Generation
The global reference points cannot provide a feasible path for a bus to follow since they are usually sparse and unconstrained.It is proved that the mobile vehicle's trajectory generation from start to end can be solved by using polynomial parameterizations [24].To balance between computing complexity and constraints, cubic polynomial is applied to generate the optimal trajectory which is smooth and consistent with the bus kinetic constraints.
In Figure 8, 1 l the fitted global path based on global reference points, the point ( , , )   f f G x y  is a target point that is selected in global reference points to determine the expression of cubic polynomial. is the global desired heading, T represents the cubic polynomial curve, 0 l is parallel to the X axis.The cubic polynomial can be written as where the coordinate system XOY is fixed with the center of the headstock.In the established coordinate system, the initial position is coordinate origin and initial heading of the bus is zero, that is, the constraints are expressed as

Optimal Trajectory Generation
The global reference points cannot provide a feasible path for a bus to follow since they are usually sparse and unconstrained.It is proved that the mobile vehicle's trajectory generation from start to end can be solved by using polynomial parameterizations [24].To balance between computing complexity and constraints, cubic polynomial is applied to generate the optimal trajectory which is smooth and consistent with the bus kinetic constraints.
In Figure 8, l 1 is the fitted global path based on global reference points, the point G(x f , y f , θ) is a target point that is selected in global reference points to determine the expression of cubic polynomial.θ is the global desired heading, T represents the cubic polynomial curve, l 0 is parallel to the X axis.The cubic polynomial can be written as where the coordinate system XOY is fixed with the center of the headstock.In the established coordinate system, the initial position is coordinate origin and initial heading of the bus is zero, that is, the constraints are expressed as dY /dx = 0 (8) combined with Equations ( 6)-( 8), we can obtain the constant coefficients in (9).
Future Internet 2018, 10, x FOR PEER REVIEW 8 of 15 combined with Equations ( 6)-( 8), we can obtain the constant coefficients in (9).Combined with Equations ( 6) and ( 9), the equation is expressed in ( 10) Then, offset y (the offset of the target point) is written as (11).
cos sin The target point

( , , )
ff xy is also a point on the cubic trajectory, so it satisfies the function combined with Equations ( 10)-( 14) are obtained as  To ensure the bus to track the global reference points finally, the trajectory in point G is tangent to l 1 .The first derivative of cubic polynomial in the target point G(x f , y f , θ) i.e., the slope of l 1 .Combined with Equations ( 6) and ( 9), the equation is expressed in ( 10) Then, y o f f set (the offset of the target point) is written as (11).
The target point (x f , y f , θ) is a point on the cubic trajectory, so it satisfies the function combined with Equations ( 10)-( 14) are obtained as Therefore, the cubic polynomial is related to the target point G(x f , y f , θ), that is, different target points determine different trajectories.For instance, when the values of x f and y f are fixed but θ ∈ (0 ∼ 45 • ), the trajectory clusters are showed in Figure 9a.Trajectory clusters of different target points are illustrated in Figure 9. Therefore, an appropriate target point is essential for optimal trajectory.Besides, several constraints should be satisfied.On one hand, the maximum steering angle of the front wheel is limited for bus.The bus can travel through the target point with maximum front wheel angle.According to Figure 10, turning radius R can be written as (15).

/ sin
where f  is front wheel angle and d means the wheelbase.For the bus, the range of the front wheel min max

[ , ]
ff Rg   . From ( 15), the minimum turning radius is obtained by (16).On the other hand, the faster of the bus travels, the longer of trajectory should be.In this paper, a piecewise turning radius is defined by the equation where la K is an adjusted coefficient, v represents the current speed, th v is a velocity threshold.
Hence, the turning radius of a feasible target point is larger than a L .Therefore, the optimal trajectory generation algorithm is described as Algorithm 1.Therefore, an appropriate target point is essential for optimal trajectory.Besides, several constraints should be satisfied.On one hand, the maximum steering angle of the front wheel is limited for bus.The bus can travel through the target point with maximum front wheel angle.According to Figure 10, turning radius R can be written as (15).
where δ f is front wheel angle and d means the wheelbase.For the bus, the range of the front wheel Rg ∈ [δ f min , δ f max ].From ( 15), the minimum turning radius is obtained by (16).
where δ f max is the maximum angle of front wheel.Therefore, an appropriate target point is essential for optimal trajectory.Besides, several constraints should be satisfied.On one hand, the maximum steering angle of the front wheel is limited for bus.The bus can travel through the target point with maximum front wheel angle.According to Figure 10, turning radius R can be written as (15).
where f  is front wheel angle and d means the wheelbase.For the bus, the range of the front wheel min max
where max f  is the maximum angle of front wheel.On the other hand, the faster of the bus travels, the longer of trajectory should be.In this paper, a piecewise turning radius is defined by the equation where la K is an adjusted coefficient, v represents the current speed, th v is a velocity threshold.
Hence, the turning radius of a feasible target point is larger than a L .Therefore, the optimal trajectory generation algorithm is described as Algorithm 1.On the other hand, the faster of the bus travels, the longer of trajectory should be.In this paper, a piecewise turning radius is defined by the equation where K la is an adjusted coefficient, v represents the current speed, v th is a velocity threshold.Hence, the turning radius of a feasible target point is larger than L a .Therefore, the optimal trajectory generation algorithm is described as Algorithm 1.

Input: Local optimal reference points
Output: Trajectory equation Y(x) for I = 1; R i ≥ L a do 1: Calculate La according to the current speed.2: Calculate the distance 3: Calculate the angel ψ i between the line and x-axis: .

Simulation for Global Planning
Firstly, we built the high-precision map by importing GPS data to ArcGIS, the road network is shown in Figure 11a.Each path in the map contains several road attributes (e.g., length of the path, whether the path is one-way).The red arrow represents the definite direction of a road.Two types of database are built: GIS database and special path database.A special path database is utilized to deal with intersections or ramps.When the bus enters the special path, the bus gets global data from special database.Global optimal path (green line) was obtained from start point to destination by the network analysis tool of ArcGIS in Figure 11b.The optimal path can take the road attributes into account.The path 1→2→5 is shorter than path 1→2→3→4, but the path 5 is retrograde.Therefore, the optimal global path is 1→2→3→4.

Simulation for Global Planning
Firstly, we built the high-precision map by importing GPS data to ArcGIS, the road network is shown in Figure 11a.Each path in the map contains several road attributes (e.g., length of the path, whether the path is one-way).The red arrow represents the definite direction of a road.Two types of database are built: GIS database and special path database.A special path database is utilized to deal with intersections or ramps.When the bus enters the special path, the bus gets global data from special database.Global optimal path (green line) was obtained from start point to destination by the network analysis tool of ArcGIS in Figure 11b.The optimal path can take the road attributes into account.The path 1→2→5 is shorter than path 1→2→3→4, but the path 5 is retrograde.Therefore, the optimal global path is 1→2→3→4.

Simulation for Local Planning
The driverless bus drives in a series of driving scenarios, including lane changing, lane keeping, and so on.Several typical driving scenarios are selected to test our method.The trajectory is generated by a cubic polynomial after the appropriate preview target point is determined based on the current state of the bus.

Simulation for Local Planning
The driverless bus drives in a series of driving scenarios, including lane changing, lane keeping, and so on.Several typical driving scenarios are selected to test our method.The trajectory is generated by a cubic polynomial after the appropriate preview target point is determined based on the current state of the bus.
Figure 12 shows the planning results in global coordinate and local coordinate when the bus changed the lane.The red dots represent the global waypoints and the blue line represents the generated trajectory.Figure 12a,b display the trajectory when the bus moves forward and Figure 12c,d shows the trajectory when the bus towards the front right of the current lane.Despite having the same global waypoints and driving behavior, the two trajectories are different and they are adjusted to adapt the current heading of bus. Figure 13 describes the situation that the bus around a right turn and it exists heading error between the bus and global path.The local trajectory and the direction of the heading are tangent.It can ensure bus to track the trajectory smoothly and avoid a sharp turn although it exits large heading deviation.Similarly, Figure 14 displays the situation that the bus turns right around a ramp.The trajectory satisfies the constraint of vehicle kinematics and it is easy and feasible for a bus to track.Besides, all the results are displayed in global coordinates and local coordinates respectively.
Figure 12 shows the planning results in global coordinate and local coordinate when the bus changed the lane.The red dots represent the global waypoints and the blue line represents the generated trajectory.Figure 12a,b display the trajectory when the bus moves forward and Figure 12c,d shows the trajectory when the bus towards the front right of the current lane.Despite having the same global waypoints and driving behavior, the two trajectories are different and they are adjusted to adapt the current heading of bus. Figure 13 describes the situation that the bus around a right turn and it exists heading error between the bus and global path.The local trajectory and the direction of heading are tangent.It can ensure bus to track the trajectory smoothly and avoid a sharp turn although it exits large heading deviation.Similarly, Figure 14 displays the situation that the bus turns right around a ramp.The trajectory satisfies the constraint of vehicle kinematics and it is easy and feasible for a bus to track.Besides, all the results are displayed in global coordinates and local coordinates respectively.
Local planning can generate different trajectories according to the current direction of the bus.The initial direction of the trajectory is consistent with the driving direction, which is shown clearly in local coordinate.Furthermore, the generated trajectory by cubic polynomial is smooth and meets the bus kinematics.-------------global map --------------

Field Test
In order to evaluate the validity, stability, and reliability of the path planning system in realworld scenarios.The experimental area is an open road environment, including various vehicles passing in and out frequently.In this paper, we mainly focus on the method of path planning and trajectory generation, lateral and longitude controllers are not introduced here.In fact, the speed of the bus is adjusted constantly based on the information of obstacles, driving behaviors, curvature of the trajectory, etc.The blue line in Figure 15 is the global route of field test, which is in Zhuzhou, China.
The autonomous driving platform is a 12 m electric bus with all kinds of sensors, including cameras, real-time kinematics GPS, inertial measurement unit (IMU), and laser scanners.The bus drove itself and completed the test successfully.Figure 16 shows the results and each picture is a snapshot from the driving videos, which are taken from inside, outside, or an aerial view of the bus. Figure 16a-c present the process of turning and Figure 16d-f show that the bus made decision by itself to overcome the car ahead.Local planning can generate different trajectories according to the current direction of the bus.The initial direction of the trajectory is consistent with the driving direction, which is shown clearly in local coordinate.Furthermore, the generated trajectory by cubic polynomial is smooth and meets the bus kinematics.

Field Test
In order to evaluate the validity, stability, and reliability of the path planning system in real-world scenarios.The experimental area is an open road environment, including various vehicles passing in and out frequently.In this paper, we mainly focus on the method of path planning and trajectory generation, lateral and longitude controllers are not introduced here.In fact, the speed of the bus is adjusted constantly based on the information of obstacles, driving behaviors, curvature of the trajectory, etc.The blue line in Figure 15 is the global route of field test, which is in Zhuzhou, China.The autonomous driving platform is a 12 m electric bus with all kinds of sensors, including cameras, real-time kinematics GPS, inertial measurement unit (IMU), and laser scanners.The bus drove itself and completed the test successfully.Figure 16 shows the results and each picture is a snapshot from the driving videos, which are taken from inside, outside, or an aerial view of the bus.

Conclusions
This paper presents a framework of path planning for autonomous bus.The ArcGIS platform is applied for map-building and global path planning.It is flexible to add or edit road attributes (e.g., whether the path is one-way or accessible) in the high-precision map by ArcGIS.The global optimal path is planned from current position to destination in the map dynamically based on network analysis tool of ArcGIS.Besides, the local planning can infer a reasonable driving behavior according to the surroundings and generate a feasible and safe trajectory for autonomous bus.The local trajectory is expressed by cubic polynomial curve with constraints, and it meets the requirements of trajectory generation for bus and reduces computational complexity.Meanwhile, several simulations are devised to verify the proposed method.Furthermore, the bus successfully drives itself on the testing road that proves the validation and practicability of our system.
However, lots of advances are required for truly autonomous driving for busses.In future work, lots of field tests are conducted to verify our framework by driving relative complex scenarios.Besides, reinforcement learning is combined with FSM to predict driving behavior when an emergency scenario occurs.

Conclusions
This paper presents a framework of path planning for autonomous bus.The ArcGIS platform is applied for map-building and global path planning.It is flexible to add or edit road attributes whether the path is one-way or accessible) in the high-precision map by ArcGIS.The global optimal path is planned from current position to destination in the map dynamically based on network analysis tool of ArcGIS.Besides, the local planning can infer a reasonable driving behavior according to the surroundings and generate a feasible and safe trajectory for autonomous bus.The local trajectory is expressed by cubic polynomial curve with constraints, and it meets the requirements of trajectory generation for bus and reduces computational complexity.Meanwhile, several simulations are devised to verify the proposed method.Furthermore, the bus successfully drives itself on the testing road that proves the validation and practicability of our system.
However, lots of advances are required for truly autonomous driving for busses.In future work, lots of field tests are conducted to verify our framework by driving relative complex scenarios.Besides, reinforcement learning is combined with FSM to predict driving behavior when an emergency scenario occurs.

Figure 2 .
Figure 2. Map-building in general path.

Figure 1 .
Figure 1.Framework of path planning for autonomous bus.

Figure 1 .
Figure 1.Framework of path planning for autonomous bus.

Figure 2 .
Figure 2. Map-building in general path.Figure 2. Map-building in general path.

Figure 2 .
Figure 2. Map-building in general path.Figure 2. Map-building in general path.

Figure 3 .
Figure 3. Map-building in special path.

Figure 3 .
Figure 3. Map-building in special path.
• E6: The stationary obstacle in front of the bus enters in detection area.• E7: The process of overtaking completes.• E8: The bus enters the special path.• E9: The bus finishes the special path.• E10: The bus enters the area of destination.

•
E1/E2: The moving vehicle in front of the bus enters/disappears in detection area.• E3/E4: The lane information from perception is valid/invalid.• E5: The bus enters the buffered road.• E6: The stationary obstacle in front of the bus enters in detection area.• E7: The process of overtaking completes.• E8: The bus enters the special path.• E9: The bus finishes the special path.• E10: The bus enters the area of destination.
• E6: The stationary obstacle in front of the bus enters in detection area.• E7: The process of overtaking completes.• E8: The bus enters the special path.• E9: The bus finishes the special path.• E10: The bus enters the area of destination.

•
Following: It is a state that the autonomous bus can follow the vehicle ahead only when the lane detection is valid.The speed varies with the vehicle ahead.• Overtaking: The autonomous bus overtakes the vehicle ahead which drives slowly (speed of the vehicle does not exceed 2 m/s) in this stage.It is divided into three steps: (a) lane change; (b) overtake; (c) lane return.Safe space is considered to avoid collisions with other vehicles.If d 1 < d th , the bus changes the lane (d 1 represents the distance between two vehicles, d th is the safe space).At this time, the local reference points are shifted from the current lane to another lane.The bus will return the lane again until it overtakes the vehicle and d 1 > d th .• Buffer adjustment: It is an intermediate stage that the bus needs to adjust speed especially when the bus is around a ramp or intersection.The signs of enter and exit can be obtained from the global map.• Special path: It is a stage after buffer adjustment and used to deal with special terrain such as intersections.The local reference points come from the special path database that is established in Section 3.2.

Figure 7 .
Figure 7. Check zone in unstructured driving.

Figure 7 .
Figure 7. Check zone in unstructured driving.
 , that is, different target points determine different trajectories.For instance, when the values of f x and y are fixed but   (0 45 ) , the trajectory clusters are showed in Figure 9a.Trajectory clusters of different target points are illustrated in Figure 9.

Figure 15 .
Figure 15.Travel route of field test.

FigureFigure 15 .
Figure 16a-c present the process of turning and Figure 16d-f show that the bus made decision by itself to overcome the car ahead.Start point

Figure 16 .
Figure 16.Several pictures of field test.

Figure 16 .
Figure 16.Several pictures of field test.
It is a state that the autonomous bus can follow the vehicle ahead only when the lane detection is valid.The speed varies with the vehicle ahead.• Overtaking: The autonomous bus overtakes the vehicle ahead which drives slowly (speed of the vehicle does not exceed 2 m/s) in this stage.It is divided into three steps: (a) lane change; (b) overtake; (c) lane return.Safe space is considered to avoid collisions with other vehicles.If It is an intermediate stage that the bus needs to adjust speed especially when the bus is around a ramp or intersection.The signs of enter and exit can be obtained from the global map.• Special path: It is a stage after buffer adjustment and used to deal with special terrain such as intersections.The local reference points come from the special path database that is established in Section 3.2.
• Unstructured driving: Lane lines fail to be identified by perception layer in this stage.A check zone is set manually and detect the threaten obstacles in this area.Then check whether a dangerous obstacle exists in the check zone.For instance, in 7, C1 is a threat for the bus while C2 is not.C1 C2 Check Zone H Global reference points