KIT Bus: A Shuttle Model for CARLA Simulator

With the continuous development of science and technology, self-driving vehicles will surely change the nature of transportation and realize the automotive industry's transformation in the future. Compared with self-driving cars, self-driving buses are more efficient in carrying passengers and more environmentally friendly in terms of energy consumption. Therefore, it is speculated that in the future, self-driving buses will become more and more important. As a simulator for autonomous driving research, the CARLA simulator can help people accumulate experience in autonomous driving technology faster and safer. However, a shortcoming is that there is no modern bus model in the CARLA simulator. Consequently, people cannot simulate autonomous driving on buses or the scenarios interacting with buses. Therefore, we built a bus model in 3ds Max software and imported it into the CARLA to fill this gap. Our model, namely KIT bus, is proven to work in the CARLA by testing it with the autopilot simulation. The video demo is shown on our Youtube.


I. INTRODUCTION
Autonomous driving buses are an important part of the future metropolis.Compared with a passenger car, a bus has a larger size, which, on the one hand, makes it has the potential to reduce the operating cost per passenger and increase the traffic efficiency [1].On the other hand, it is more difficult to recognize a complete view of the buses' surrounding environment.Consequently, more sensors should be equipped on an autonomous bus in order to cover all important areas, avoid blind spots, and react in complicated scenarios.The confusion of sensors like cameras, radar, LIDAR is therefore necessary.However, current studies about autonomous shuttle depend mostly on the limited experiments in reality, such as [2], [3].Consequently, a comprehensive analysis of the sensors arrangement for an autonomous-standard bus does not exist.Obviously, due to insufficient data, regulations, policies, and legal issues are challenging to be deeply explored.To date, gathering the data and validating novel ideas in simulation environments are becoming more and more popular due to the high fidelity of the autonomous driving simulator, e.g., Fig. 1.The KIT Bus in the CARLA simulator the CARLA simulator [4], [5].However, the current official CARLA does not provide a bus model that can offer the opportunity to research self-driving buses.Thus, in this study, we created a large-size bus model for the CARLA simulator to be used as a cornerstone for further studying the autonomous driving bus.As shown in Fig. 1, our model enables the high fidelity simulation, including physical engine, e.g., collision and occlusion, in scenarios with buses.

II. BACKGROUND
Although the shuttle bus transport capacities currently in use are low, i.e., usually only 15 people, the use of these transport units in large urban agglomerations is beneficial for society [6].In contrast to current wisdom, shared fleets may not be the most efficient alternative [7].Based on the research from Leich, autonomous shared taxis cannot replace buses since their simulation suggests for all evaluated scenarios higher operating costs and only slight travel time savings in comparison to conventional buses [8].In 2017, a survey among 200 passengers of autonomous mini-buses in real operation in the city of Trikala showed that they are well accepted, and there are no major concerns as regards safety and security [9].Also, the platooning technology endows the buses to handle the scenarios where complex interactions occur [10].
Today's self-driving buses use various cutting-edge hardware and software technologies to complete their driving.A typical autonomous driving system will go through three stages to perform its driving, called perception [11], understanding [12], and control.In the perception phase, cameras and various sensors are used to observe objects around the vehicle, such as other vehicles, people, bicycles, and animals.The sensor perception technologies currently studied include visual perception, laser perception, microwave perception, etc.In the understanding stage, various artificial intelligence algorithms are used to process information from sensors.In the control stage, the autonomous driving system will process all the information that the perception system can extract.Currently, a popular way to tackle the lack of data is to use a game engine or a high-fidelity computer graphics model to create driving scenes.At present, the simulation system can use virtual lidars and cameras to scan a street section to simulate traffic conditions that are highly similar to the real situation.At the same time, advanced view synthesis technology can generate scene images of any perspective based on existing images, which looks as real as direct shooting [13].

III. MODEL BUILDING
In this section, we demonstrate the details of the white model building, as shown in Fig. 2.
As the first step, we found a drawing size of the reference bus model in the Internet, including the actual length, width, and height of the bus, as shown in Fig. 2 (a).In order to build a three-dimensional model of the bus, we cut the size map of the bus model into four bitmaps and created four bus model reference planes in 3ds Max.The size of each plane corresponds to the length, width, and height of the bus model and map the four bitmaps on the planes.In this fashion, the size of the four planes conforms to the size of the created bus model equal to the real bus size.Secondly, we build the bus model based on it.We use the line tool to draw the outline of the bus body based on the front view and then extrude half of the bus body with reference to the left view or the right view, as shown in Fig. 2 (b).
After that, we divide the extruded body into small segments by creating points, lines, and connecting points.Concretely, we use the function of moving points, lines, and surfaces to make the divided lines as closely as possible according to the contours of the three views in different directions.By fitting the contours of the three views of the bus model and continuously making detailed adjustments to ensure that the surface of the bus mode is as smooth as possible, we improve the similarity between our bus model and the real bus as much as possible.Through continuous refinement, we obtain the completed bus body model.
Lastly, we build the rest of the bus model parts in a similar way to bus body modeling.To sum up, the bus model consists of six parts, e.g., body, wheels, interior, details, glass, and license plate.Wheels include tires and wheel hubs.The interior

IV. SETUP OUR MODEL
This section depicts the process from downloading our model (see Appendix) until running the model in the CARLA simulator.
First, download our model from Google drive and import it into the static model file in CarlaUE4.After finishing the import process, the skeletal mesh will appear along with two new files, called Bus Skeleton and Bus PhysicsAssets, as shown in Fig. 3 (a).Secondly, set up collisions in Bus PhysicsAsset.Since the body of the bus model is a rectangular parallelepiped shape, so we choose the primitive type of the Vehicle Base as the box, and regenerate the body, as shown in Fig. 3 (b).Then we set the bus model wheels colliders.Because the shape of the bus model wheel is round, we choose the primitive type of the four wheels as sphere and change the physics type as kinematic, and then again regenerate the body, as shown in Fig. 3 (c).Thirdly, create the bus model animation blueprint.In order for the bus model to simulate real bus driving animation in CarlaUE4, we must create an animation blueprint.As the driving characteristics of the bus model depends on its wheels, we create an animation blueprint for the wheel handler.As shown in Fig. 3 (d  Next, two wheel-blueprints shall be created.In most cases, the bus model shall have at least two types of wheels, steering wheels and driving wheels.In addition, there may be front and rear wheels of different sizes.In this case, we need to control the settings of different radius, mass, width, handbrake effect, suspension, and many other attributes to get the bus control we need.Therefore, we create two wheel-blueprints, the front wheel blueprint, and the rear wheel blueprint.The front wheel is not affected by the handbrake whilst it can be steered, as shown in Fig. 4 (a), and the rear wheel is affected by the handbrake but cannot be steered, as shown in Fig. 4 (b).The tire config in the two figures is used to set the value of the loaded tire properties, so we need to import the common tire config in our case.
Obviously, in addition to creating a blueprint for the wheels, we need to create a blueprint for the bus model as a whole.The purpose is to match the previous skeleton mesh with the animation blueprint so that the animation blueprint can control the skeleton mesh, as shown in Fig. 5.
After creating the blueprint of the bus model, we need to match the four wheels together in this blueprint in order to realize that the different wheel positions of the bus can drive according to the parameters we set, as shown in Fig. 6.
Finally, we edit the material of the bus model and add functions according to the needs, such as adding different types of bus lights and so on.This step is extremely timeconsuming.Our bus model is divided into thirteen parts that can be edited with materials: the metal body, bumper, rearview mirror cover, windows, tires, wheels, trunk handles, taillights, headlight glass covers, front lights, interior trim, rearview mirror, license plate.Concretely, we use the material editor Fig. 5. Blueprint for the bus model for material rendering in CarlaUE4.The main method of operation is to splice each characteristic node with the result node of material through a line.By observing the display result of the material texture in the preview of the material ball, we continuously modify and adjust the parameters until the material texture displays bus model very close to the realworld bus material appearance.As shown in Fig. 7, the final bus model with proper materials setting is created.Notice that this step makes our bus model look similar to the real bus and thus can be easier recognized by the visual-based artificial intelligence model.However, for other tasks, such as the appropriate arrangement of sensors, it is not so vital.
Finally, we have completed the material editing of the bus in CarlaUE4 and the creation and editing of various blueprints for animation.We need to put the edited bus model into the vehicle factory of the CARLA simulator before we can control it, as shown in Fig. 8.After successfully importing the model in the CARLA simulator, do the following steps to see whether the model works.Real-world bus driving functions mainly include forwarding, braking to decelerate, steering, reversing, and gear shifting.With these functions, we can control the bus model by using python scripts and realize different buttons to control different motion functions through KeyboardControl.Although we tested our model with autopilot, we give the process to run the model with the manual operation since it gives the readers more freedom to test the model.
As the first step, run the python code of the manual control, which is in the PythonAPI folder and can put the bus model into an environment that simulates the real world, as shown in Fig. 9. Now the model can be controlled by the keyboard.With the W key to control the bus to move forward, the information bar on the left side of the screen displays the throttle change during the forwarding process.In contrast, the S key controls the braking process of the bus.Similar to the driving command, the dashboard also displays the braking force during the braking process.What's more, the A key and the D key control the bus to turn left and right, respectively.Here the cursor position demonstrates the angle and direction of the steering.Apparently, when the cursor is in the middle, it means to go straight forward.The Q key controls the bus to reverse.The space key controls the hand brake.Once turn on the hand brake, the vehicle is forcibly stopped.The M key switches the automatically shifting or manual gear shifting.With the "," and "." keys, we make the model upshift and downshift, respectively.

VI. CONCLUSION
We have successfully built a bus model for the CARLA simulator that can be used for autonomous driving simulation.In this process, we are mainly divided into three main steps.Firstly, we use the three-view modeling method to build the bus model with 3ds Max software.We use the line tool to draw the outline of the bus parts based on the front view in the three views and extrude half of the bus parts regarding the left view or the right view.Then we create points, lines, and use the function of moving points, lines, and surfaces to make the divided lines according to the contours of the three views in different directions.By fitting the contours of the three views of the bus model, and continuously making detailed adjustments, we ensure that the surface of the bus body is as smooth as possible.After we get the bus geometry model, we edit the bus model in CarlaUE4.It includes the main five processes, bus model material editing, setting the bus model colliders, creating the animation blueprint, creating blueprints for wheels and bus model, and adding additional light functions.Finally, we verified that the built model can be controlled to drive both manually and autonomously in the CARLA simulator.
This study only considered the autonomous driving simulation of one bus model alone and did not conduct in-depth explorations on the driving of multiple vehicles that simulate the real traffic.However, we envision the research in the next studies.

APPENDIX
We can share the model we built.Check the most updated information about the model on the Elephant Tech LLC website 1 .Please contact us with your self introduction and a brief description (one page) of your research plan.Commercial use and redistribution without permission is prohibited.Only Yusheng Xiang will reply to the emails related to this paper.Thank you.
Fig. 2. The process of building up the KIT bus

Fig. 3 .
Fig. 3. Import and link process ), it is the process of creating a blueprint for the bus model animation.It includes four animation blueprint nodes, namely mesh space ref pose, wheel handler, component to local, and output pose.The connection of the mesh space ref pose node and the wheel handler can link the animation of the bus model wheels with the skeletal mesh of the entire model.
Fig. 4. Prepare the blueprint of wheels

Fig. 9 .
Fig. 9. Import the model into the CARLA simulator scene