Software Platformization and Agile Development of Baidu Intelligent Driving Domain Controller Based on AUTOSAR

The product strategy of Baidu Zhijia business group can be divided into three major areas: car, road and line: "car" is to provide smart car solutions for B-end car companies; "Road" is an intelligent solution for urban traffic; "Travel" is a travel service for C-end consumers.

On March 14th-16th, 2023, at the 4th Software-Defined Automobile Forum and AUTOSAR China Day in 2023, Wu Changlong, a senior engineer of Baidu Apollo Intelligent Technology Co., Ltd., said that Baidu’s technology accumulation in L4 field and the scale advantage of L2+ products promoted each other, and now it has realized the comprehensive layout of taxi-passenger car-urban transportation. On the technical level, the modular MCU and strong mainline software architecture can meet the needs of parallel development of different models and multiple projects on the same platform; With the support of agile development method and CICD, the output quality can be guaranteed while meeting the rapidly changing internal and external needs.

Software Platformization and Agile Development of Baidu Intelligent Driving Domain Controller Based on AUTOSAR  

Wu Changlong | Senior Engineer of Baidu Apollo Intelligent Technology Co., Ltd.

The following is a summary of the speech:

Development and challenge of Baidu Apollo intelligent driving domain controller

In the past ten years, Baidu has accumulated rich technology and experience in the field of artificial intelligence, and now it applies these leading AI technologies to the automotive field. The product strategy of Baidu’s intelligent driving business group is laid out in three areas, which are car, road and line.

"Car" refers to the intelligence of cars. ASD, Baidu’s smart car division, is a tier1 role that provides full-stack smart car solutions for B-end car customers, including smart driving and smart cabin. At present, it has provided smart car solutions for 31 car companies, 134 models and more than 7 million cars. Baidu’s car is one of Baidu Apollo’s partners, and will be equipped with the full-stack intelligent solution of Baidu smart car, which will be listed this year.

"Road" refers to smart city traffic. At present, Baidu’s smart city transportation has provided solutions for 63 cities across the country, providing efficiency for urban transportation.

"Travel" refers to providing travel services for C-end consumers, which is known as radish running. Last year, Baidu released the sixth generation RT6, which has the ability to drive automatically on complex urban roads, and its cost reached 250,000 yuan. The mass production of RT6 will greatly accelerate the scale and commercialization of unmanned vehicles.

The above businesses complement each other. Baidu has accumulated rich technology and experience in L4 field, which can provide hot start for L2+ products. L2+ products feed back L4 products with the advantages of scale, and solve the long tail problem of L4 products’ final commercial landing.

Baidu’s smart car products include intelligent driving and intelligent cabin, including small-scale in-vehicle system and software and hardware integrated solution ARC. The intelligent driving domain controller is divided into two heterogeneous control chips, MCU and SOC. MCU deployed AUTOSAR protocol station, and developed CDD and application algorithm on this basis. The bottom layer of SOC is a system, and the top layer is the hardware poke layer and the middleware Apollo OS; developed by Baidu. Further up is the various atomic ability services of the algorithm; Further up are the various application logics of the algorithm.

Next, we will share the challenges we face in the development of intelligent driving domain controller MCU software based on AUTOSAR.

First of all, in recent years, there are many projects of Baidu’s intelligent driving domain controller, and it has already faced the situation that the same hardware platform supports multiple projects and multiple models for parallel development. A project needs to maintain independent software branches, and software changes, software optimization or repairs made in one project branch are always manually migrated to other project branches to ensure the consistency of product experience. And the coupling between software modules is very strong, and the change of one software module will often lead to the change of other modules, which will affect the whole body; In addition, it is necessary to migrate to multiple software branches at the same time, and the workload of maintenance increases exponentially with the increase of software complexity and projects.

In the stage of frequent changes in the demand of intelligent driving track, the time period is very short; However, there will be no reduction in the quality requirements for output. This challenges our software architecture. We urgently need a software architecture that can support multi-project parallel development and rapid iteration.

How to solve this problem? We found inspiration on AUTOSAR. The core idea of AUTOSAR is the decoupling of hardware and software. The bottom layer realizes the software functions that are strongly related to hardware, and abstracts them into standard interfaces for the upper layer. The upper ECU and the application layer are almost insensitive to the difference of the lower hardware, which makes the AUTOSAR architecture software migrate on multiple hardware platforms.

Secondly, the core idea of AUTOSAR is the modularization of software and standardization of interfaces. AUTOSAR is divided into hundreds of software modules, and the function definition of software modules is very clear, and the data between software is exchanged with the defined standardized interfaces. When the software of one module is changed, the influence on other software modules and even the whole controller software is controllable.

Platform of MCU software for intelligent driving domain controller

Our MCU platform software architecture refers to the idea of AUTOSAR. Firstly, a set of loosely coupled software architecture is needed. The so-called loose coupling means software modularization, and the function definition of each software module must be clear. The exchange interface between modules is standardized and managed in a unified file according to the architectural method of AUTOSAR.

The second is the strong mainline software architecture. Referring to the software architecture idea of AUTOSAR, we divide our MCU software into different softwares according to the actual business requirements. A hardware platform has only one software, and a project has a separate software. The interface between is predefined and cannot be easily changed. To ensure that a set of software can be combined with different software of multiple projects.

The actual operation method of this software architecture is:

First of all, the BSW project of AUTOSAR is strongly related to specific projects and models, such as the number of communication buses, the configuration of communication matrix, the configuration of diagnostic protocol stations, the configuration of network management, etc. These configurations are different for each model. Therefore, the BSW engineering code of AUTOSAR is divided into BASE software and CDD software (including IOO abstraction of various hardware and data intervention of sensors, etc.). These modules are only related to the hardware platform and have no direct relationship with the project. The application layer software isolates the differences of signal interfaces of various vehicles through the signal abstraction module, which makes most application layer software project-independent.

In addition, there are some special software modules, such as time synchronization module. All items of the time synchronization scheme in our domain are consistent; However, the cross-domain and vehicle-domain schemes have different projects. For this kind of module, we split the software of a module into two parts for maintenance, provided that the interfaces between the software must be well defined, so that multiple projects can share one software, and different BASE software can work normally together.

Under this software architecture, the methods of software management are different. A hardware platform has only one software warehouse, and each project has a separate BASE software warehouse. Only when the software is merged can the final MCU software output be obtained. Its advantage lies in that the mainline optimization is directly effective for each project. The challenge is how to ensure that the changes on the main line are not wrong for each project, which requires agile development and CICD to ensure.

Agile development of MCU software for intelligent driving domain controller

The software version delivery of the whole intelligent driving domain controller basically follows the traditional automobile micro-model development, from the initial demand input to software design, software development, software testing and overall acceptance, and a version lasts about 2-3 months. In the big cycle, we iteratively split the MCU software version into weekly agile development cycles.

The cycle of agile iteration in weeks can also be refined to the development iteration in days. Baidu has its own set of code management tools. When we push the code, it triggers the continuous integration compilation pipeline to get the compiled results and outputs. At the same time, the system will automatically trigger to pull the latest code from the library every night and push it to the CICD test server. The test server will simulate the upper computer to deploy the software to the domain controller of the test bench, which has a full set of sensor environment and simulated vehicle environment besides the physical domain controller. After the deployment, according to the pre-set test flow, the MCU software is matched with the SOC terminal to conduct a set of systematic tests.

After the test, the server finally collects the test results, and generates an email report and pushes it to the corresponding person. When you go to work the next day, you will know whether there is any problem with the previous day’s cooperation code. In addition to the bench test, we have a lot of driving tests every day, and the data generated in the test and the problems will be uploaded to the data center, and special managers will distribute the problems and data to the corresponding module leaders. After analyzing the data, the R&D personnel locate the problems, and then arrange the repair plan of the problems into the agile iterative process according to the priority, so as to carry out iterative development of the software, quickly deploy the new output to the R&D vehicle, and then carry out closed-loop verification.

At present, automakers pay more and more attention to software self-research, especially in the field of automatic driving. Some automakers choose Baidu as a supplier of software and hardware for intelligent driving systems; At the same time, I hope to participate in the development of some intelligent driving functions.

We also have some successful experiences in the project. First, OEM will generate the document of our intelligent driving domain controller, and then build an algorithm model to generate SWC articles in AR file format. And the final C code will be generated, and the ECU document will be given to Baidu. After we import the AUTOSAR development configuration tool, we can generate the technical engineering of MCU AUTOSAR and develop the software of MCU. Then compile it into a black-box project and give it to the OEM. The OEM will add the black-box project to the code generated by them for integration and compilation. After the compilation is passed, it will do its own module test. After the test is passed, it will give their model code compilation process to Baidu in the form of a black box. Then we will do the final integration, compilation and MCU software output, complete the integration test of the entire MCU domain controller, and deliver the test to the automobile factory, and then do the vehicle-level test.

(The above content comes from Wu Changlong | Senior Engineer of Baidu Apollo Intelligent Technology Co., Ltd. Wu Changlong’s keynote speech "Software Platformization and Agile Development of Intelligent Drive Controller Based on AUTOSAR" delivered at the 4th Software-Defined Automobile Forum and AUTOSAR China Day in March 14 -16, 2023. )