# Autonomous Driving--A Crash Explained in Detail
## 4 Background Knowledge
### The Autonomous Software Stack from TUM  
For this autonomous racecar our team from TUM developed a holistic autonomous driving software. A thorough description is given in the papers [9; 10]. An overview of the software architecture with its seven sub-modules is displayed in Figure 2 in sufficient detail. Coming from sub-module one a map of the racetrack was created. This could be done either online/offline by using simultaneous localization and mapping (SLAM) algorithms. As an input data a LIDAR point cloud generated from the LIDAR sensors on the vehicle was used. The point cloud was processed afterwards by using either the GMAPPING or Google Cartographer algorithm. We adapted the parameters of both algorithms regarding the usage in large scales environments for creating a 2D occupancy grid of the track [29]. In addition we had the possibility to create the track map by measuring the boundaries of the track manually with high-precision GPS. Another alternative for creating the track map was by using a deep learning semantic segmentation algorithm that was fused with a monocular depth estimation and was presented in [30]. Because the online performance of the automatic map creation was currently not reliable enough the manual map creation method by measuring the GPS was used. Figure 1: Devbot 2.0 (a) for the Roborace Season Alpha 2019 with sensors setup (b) [8]. With this map in submodule three a globally time-optimal trajectory around the track based on a minimum curvature trajectory planning presented in [31] was used. The trajectory contained the path on the track and the calculated velocity profile. When driving autonomously, the local trajectory planner used the global raceline as a reference for the fastest solution. However, if there were obstacles on the track or if the car wanted to perform an overtaking maneuver, it dynamically generated several local paths on the basis of pre-sampled splines [32]. The required information about objects on the track were gathered by a dynamic object list in submodule two. To complete the planning process, velocity profiles were calculated (see pseudocode in [31]) for each possible path based on a so called gg-diagram (Figure 3). In the software, the diagram contained \(a_{x,\max}\), the maximum lateral (pure cornering right and left), and \(a_{y,\max}\), the maximal longitudinal (pure acceleration and braking) acceleration the car could handle. Combined acceleration cases were treated according to Equation (1), which defines the overall  
Figure 3: The gg-diagram explained in detail [33]. Figure 2: The Technical University of Munich (TUM) team software architecture for the Roborace devbot. gg-diagram. The shape of the diagram could be changed by using the parameter shape coefficient \(b\). We could change between a trapezoid (\(b=1\)) and a circle (\(b=2\)). All these parameters had to be defined according to the track surface and layout as well as the current weather conditions (dry, rainy, etc.). This definition and adjustment was done manually by the software programmers. \[\left(\frac{|a_{x}|}{a_{x,\max}}\right)^{b}+\left(\frac{|a_{y}|}{a_{y,\max}} \right)^{b}\leq 1 \tag{1}\]  
A set of driveable local trajectories is sent to the behavior planner in sub-module 4. It selects one trajectory based on several criteria such as safety and time loss. The final trajectory is then forwarded to the vehicle controller. The overall structure of the controller is displayed in Figure 4.  
The controller architecture was split into a high-level trajectory tracking controller and a low-level vehicle controller. We separated these two controllers to increase the systems robustness [31]. Because we were driving with a racecar we had high non-linearities of the dynamics and a complex control allocation (split between feed forward and feedback parts and lateral and longitudinal couplings) at the limits of handling [31]. Therefore a high-level PD-controller was used for lateral position control that got information from the velocity heading error and the lateral deviation.