Message communication method, computer system and proxy device
The message format of the AUTOSAR system and ROS system is converted through message communication method and proxy device, which solves the problem of inconvenience in the development of the AUTOSAR system for perception, fusion, regulation and execution functions in the development of the autonomous driving system, and realizes the AUTOSAR system and ROS system Interoperability improves the performance of the autonomous driving system.
Patent Information
- Application Number
- CN202411034758.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-19
- Publication Date
- 2024-12-17
AI Technical Summary
The existing autonomous driving system development support is insufficient, especially the AUTOSAR system is inconvenient for the development of perception, fusion, regulation and execution functions, and the ROS system needs additional development of the traditional control parts of the vehicle.
The message communication method is adopted, and the message format of the AUTOSAR system and the ROS system is converted through the proxy device, so that the two can be communicated interoperable, thereby realizing message communication between the AUTOSAR system and the ROS system, taking into account the excellent characteristics of both.
The interoperability between the AUTOSAR system and the ROS system is realized, the performance of the autonomous driving system or assisted autonomous driving system is improved, and the traditional control of the vehicle and advanced functions such as perception, computing, fusion and simulation are taken into account.
Smart Images

Figure CN119152712A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of autonomous driving or assisted autonomous driving, and in particular to a message communication method, a computer system and an agent device. Background Art
[0002] like Figure 1 As shown in the figure, the software architecture of an autonomous driving vehicle may include an application layer and a framework layer. The application layer includes applications such as perception, fusion, regulation and control, and execution. The framework layer is used to provide basic logic and rules for the application layer, including computing logic, communication logic, etc. Currently, the industry generally uses the automotive open system architecture (AUTOSAR) or the robot operating system (ROS) as the framework layer.
[0003] Although the AUTOSAR system has relatively complete functions for traditional vehicle control and execution, it does not provide enough support for the development of autonomous driving systems. Specifically, it is not easy to develop functions such as perception, fusion, regulation and execution at the application layer. The ROS system was originally a data-oriented software architecture for robot system development, so it is good at computing and decision-making functions. However, it requires additional development for traditional vehicle control and execution. Therefore, how to design an autonomous driving system or an assisted autonomous driving system has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present application provide a message communication method, a computer system, and an agent device, which help enable an autonomous driving system or an assisted autonomous driving system to simultaneously possess the excellent characteristics of a first computer system and a second computer system, thereby improving the performance of the autonomous driving system or the assisted autonomous driving system.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a message communication method is provided, which is applied to an automatic driving system or an assisted automatic driving system, wherein the automatic driving system or the assisted automatic driving system comprises: a first computer system, a second computer system and an agent device, wherein the method comprises: the agent device receives a first message sent by the first computer system, wherein the format of the first message is a format recognizable by the first computer system. The agent device converts the first message into a second message. The format of the second message is a format recognizable by the second computer system. The agent device sends the second message to the second computer system. In this way, an agent device is added to the automatic driving system or the assisted automatic driving system to convert the message format of the first computer system and the second computer system, so that the first computer system and the second computer system communicate messages, which helps the automatic driving system or the assisted automatic driving system to have the excellent characteristics of the first computer system and the second computer system at the same time (for example, it can take into account the traditional control of the vehicle by the AUTOSAR system, as well as the advanced functions of ROS such as perception, calculation, fusion and simulation).
[0007] In a possible implementation, the first computer system includes an AUTOSAR system, and the second computer system includes ROS. Alternatively, the first computer system includes ROS, and the second computer system includes an AUTOSAR system. In this way, the intercommunication of AUTOSAR system and ROS messages can be achieved.
[0008] In a possible implementation, the first message is a message in a remote procedure call (RPC) mode or a message in a parameter mode, and the first message includes a first message identifier, and the first message identifier includes a method identifier and / or a parameter identifier. The method also includes: determining a second message identifier corresponding to the first message identifier according to a correspondence between a message identifier recognizable by the first computer system and a message identifier recognizable by the second computer system. The second message includes a second message identifier, and the second message identifier includes a method identifier and / or a parameter identifier. In this way, it is possible for an application of the first computer system to call an application of the second computer system, and for the first computer system to obtain or set parameters in the second computer system, thereby realizing the communication of messages in a remote procedure call mode and a parameter mode between the first computer system and the second computer system.
[0009] In a possible implementation, the subject of a message sent by a first object included in the first computer system is the same as the subject of a message received by a second object included in the proxy device. The first object is a sender of a message in the first computer system, and the second object is a receiver of a message in the proxy device. The message sent by the first object includes a first message. The subject of a message sent by a third object included in the proxy device is the same as the subject of a message received by a fourth object included in the second computer system. The third object is a sender of a message in the proxy device. The fourth object is a receiver of a message in the second computer system. The message sent by the third object includes a second message. In this way, the objects in the proxy device can be matched with the objects in the first computer system and the second computer system, respectively, for sending and receiving messages.
[0010] In a possible implementation, the first computer system includes an AUTOSAR system, and the second computer system includes ROS. The method further includes: the proxy device filters the first message. The proxy device converts the first message into a second message, specifically including: the proxy device converts the filtered first message into the second message. In this way, the message sent in the AUTOSAR system can accurately correspond to the process of the application in ROS.
[0011] In a possible implementation, the first computer system includes ROS, the second computer system includes an AUTOSAR system, and the second message does not include an instance identifier, and the method further includes: the proxy device adds the instance identifier to the second message, wherein the instance identifier is used by the AUTOSAR system to determine the fourth object. In this way, the message sent by ROS to the AUTOSAR system can also accurately correspond to the process of the application in the AUTOSAR system.
[0012] In one possible implementation, the first computer system includes an AUTOSAR system, and the second computer system includes ROS, and the quality of service (QoS) used by the first object is compatible with the QoS used by the second object, or, when the first computer system includes ROS and the second computer system includes AUTOSAR, the QoS used by the third object is compatible with the QoS used by the fourth object. In this way, it can be ensured that when the proxy device communicates with the AUTOSAR system, the sender of the message and the receiver of the message have the same subject and compatible QoS. In one possible implementation, the QoS of the sender needs to be compatible with the QoS of the receiver. The value of the QoS of the sender defines the quality of service provided by the sender; the value of the QoS of the receiver defines the quality of service required by the receiver. The compatibility of the QoS of the sender and the QoS of the receiver means that the quality of service provided by the sender must meet the quality of service required by the receiver.
[0013] In a second aspect, a message communication method is provided, which is applied to an automatic driving system or an assisted automatic driving system, wherein the automatic driving system or the assisted automatic driving system comprises: a first computer system and a second computer system, wherein the method comprises: the second computer system receives a first message sent by the first computer system, wherein the format of the first message is a format recognizable by the first computer system, and the second computer system converts the first message into a second message, wherein the format of the second message is a format recognizable by the second computer system. In this way, the second computer system adds logic for converting the format in the first computer system to the format in the second computer system, so that the first computer system and the second computer system can realize message communication.
[0014] In a possible implementation, the first computer system includes an automotive open system architecture AUTOSAR system, and the second computer system includes a robot operating system ROS; or the first computer system includes ROS, and the second computer system includes an AUTOSAR system. In this way, the intercommunication of AUTOSAR system and ROS messages can be achieved.
[0015] In a possible implementation, the first message is a message in a remote procedure call (RPC) mode or a message in a parameter mode, and the first message includes a first message identifier, and the first message identifier includes a method identifier and / or a parameter identifier. The method also includes: the second computer system determines a second message identifier corresponding to the first message identifier based on a correspondence between a message identifier that can be recognized by the first computer system and a message identifier that can be recognized by the second computer system. The second message includes a second message identifier, and the second message identifier includes a method identifier and / or a parameter identifier. In this way, it is possible for an application of the first computer system to call an application of the second computer system, and for the first computer system to obtain or set parameters in the second computer system, thereby realizing communication of messages in a remote procedure call mode and a parameter mode between the first computer system and the second computer system.
[0016] In a possible implementation, the subject of a message sent by a first object included in a first computer system is the same as the subject of a message received by a second object included in a second computer system. The subject of a message received by a first object included in the first computer system is the same as the subject of a message sent by a second object included in the second computer system. The first object is a sender of a message in the first computer system, and the second object is a receiver of a message in the second computer system. The message sent by the first object includes the first message; or, the message sent by the second object includes the second message. In this way, the object in the first computer system can be matched with the object in the second computer system for sending and receiving messages.
[0017] In a possible implementation, the first computer system includes an AUTOSAR system, and the second computer system includes ROS, and the method further includes: the second computer system filters the first message. The second computer system converts the first message into a second message, including: the second computer system converts the filtered first message into the second message. In this way, the message sent in the AUTOSAR system can accurately correspond to the process of the application in ROS.
[0018] In a possible implementation, the first computer system includes ROS, the second computer system includes an AUTOSAR system, and the first message does not include an instance identifier, and the method further includes: the second computer system adds the instance identifier to the second message, wherein the instance identifier is used by the AUTOSAR system to determine the second object. In this way, the message sent by ROS to the AUTOSAR system can also accurately correspond to the process of the application in the AUTOSAR system.
[0019] In a possible implementation, the first computer system includes an AUTOSAR system, and the second computer system includes ROS, and the QoS used by the first object is compatible with the QoS used by the second object. In this way, it can be ensured that when ROS communicates with the AUTOSAR system, the sender of the message and the receiver of the message have the same subject and compatible QoS.
[0020] In a third aspect, an agent device is provided, which can be used to execute any method provided in any possible implementation of the first aspect to the first aspect. For example, the agent device can be a computer device (such as a terminal device, a server or a cloud server) or a chip, etc.
[0021] According to the third aspect, in a first possible implementation of the third aspect, the device may be divided into functional modules according to any of the methods provided in the first aspect. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
[0022] According to the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the device may include a processor, and the processor is used to execute any one of the methods provided by the first aspect.
[0023] In a fourth aspect, a computer-readable storage medium is provided, such as a non-transitory computer-readable storage medium, on which a computer program (or instruction) is stored, and when the computer program (or instruction) is executed on a computer, the computer executes any method provided in the first aspect or any possible implementation of the first aspect.
[0024] According to a fifth aspect, a computer program product is provided, which, when executed on a computer, enables any method provided by the first aspect or any possible implementation of the first aspect to be executed.
[0025] In a sixth aspect, a chip is provided, comprising: a processor, configured to call from a memory and run a computer program stored in the memory, and execute any method provided by the first aspect or any possible implementation of the first aspect.
[0026] In a seventh aspect, a computer system is provided, which can be used to execute any method provided by the second aspect or any possible implementation of the second aspect. According to the second aspect, in a first possible implementation of the second aspect, the computer system can be divided into functional modules according to any method provided by the second aspect. For example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing unit.
[0027] According to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the computer system may include a processor, and the processor is used to execute any one of the methods provided by the second aspect.
[0028] In an eighth aspect, a computer-readable storage medium is provided, such as a non-transitory computer-readable storage medium, on which a computer program (or instruction) is stored, and when the computer program (or instruction) is executed on a computer, the computer executes any method provided in the second aspect or any possible implementation of the second aspect.
[0029] In a ninth aspect, a computer program product is provided, which, when executed on a computer, enables any method provided in the second aspect or any possible implementation of the second aspect to be executed.
[0030] In a tenth aspect, a chip is provided, comprising: a processor, configured to call from a memory and run a computer program stored in the memory, and execute any method provided in the second aspect or any possible implementation of the second aspect.
[0031] It can be understood that any of the proxy devices, computer systems, computer storage media, computer program products or chips provided above can be applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1A schematic diagram of an autonomous driving vehicle software architecture applicable to an embodiment of the present application;
[0033] Figure 2 A functional block diagram of a vehicle 100 applicable to an embodiment of the present application;
[0034] Figure 3 A schematic diagram of a computer system applicable to an embodiment of the present application is provided;
[0035] Figure 4 A schematic diagram of the structure of an AUTOSAR system-based autonomous driving or assisted autonomous driving system applicable to an embodiment of the present application;
[0036] Figure 5 A relationship diagram of domain participants, publishers, subscribers, data writers, and data readers applicable to embodiments of the present application;
[0037] Figure 6 A DDS publish-subscribe model applicable to the embodiments of the present application;
[0038] Figure 7 A schematic diagram of the relationship between domains, domain participants and applications applicable to embodiments of the present application;
[0039] Figure 8 is a schematic diagram of the structure of an ROS-based autonomous driving or assisted autonomous driving system applicable to an embodiment of the present application;
[0040] Fig. 9 A publish-subscribe model of ros_comm applicable to the embodiment of the present application;
[0041] Fig.10 A schematic diagram of the intercommunication between the AUTOSAR system and ROS provided in the embodiment of the present application;
[0042] Fig.11 A schematic diagram of a system architecture for implementing an intercommunication solution between an AUTOSAR system and ROS based on a proxy mode provided in an embodiment of the present application;
[0043] Fig.12 A schematic diagram of a system architecture for implementing an intercommunication solution between an AUTOSAR system and ROS based on a pass-through mode provided in an embodiment of the present application;
[0044] Fig.13 A flowchart of an AUTOSAR system and a proxy device service discovery method provided in an embodiment of the present application;
[0045] Fig.14 A schematic diagram of a process flow of a proxy device and a ROS service discovery method provided in an embodiment of the present application;
[0046] Fig.15 A flowchart of a method for implementing a message communication method between an AUTOSAR system and a ROS system based on a proxy mode provided in an embodiment of the present application, in which the AUTOSAR system sends a message to the ROS through a proxy device;
[0047] Fig.16 A flowchart of a method in which ROS sends a message to an AUTOSAR system through a proxy device in a method for implementing message communication between an AUTOSAR system and a ROS based on a proxy mode provided in an embodiment of the present application;
[0048] Fig.17 A flow chart of a method for implementing message communication between an AUTOSAR system and ROS based on a pass-through mode provided in an embodiment of the present application;
[0049] Fig.18 A flow chart of another method for implementing message communication between an AUTOSAR system and ROS based on a pass-through mode provided in an embodiment of the present application;
[0050] Fig.19 A schematic diagram of the structure of an agent device provided in an embodiment of the present application;
[0051] Fig. 20 A schematic diagram of the structure of a computer system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] Figure 2 The functional block diagram of a vehicle 100 applicable to an embodiment of the present application is shown in FIG. 1 . In one embodiment, the vehicle 100 is configured to be in a fully or partially automatic driving mode. For example, the vehicle 100 can control itself while in the automatic driving mode, and can determine the current state of the vehicle and its surrounding environment through human operation, determine the possible behavior of at least one other vehicle in the surrounding environment, and determine the confidence level corresponding to the possibility of the other vehicle performing the possible behavior, and control the vehicle 100 based on the determined information. When the vehicle 100 is in the automatic driving mode, the vehicle 100 can be set to operate without human interaction.
[0053] The vehicle 100 may include various subsystems, such as a travel system 102, a sensor system 104, a control system 106, one or more peripheral devices 108, and a power source 110, a computer system 112, and a user interface 116. Optionally, the vehicle 100 may include more or fewer subsystems, and each subsystem may include multiple elements. In addition, each subsystem and element of the vehicle 100 may be interconnected by wire or wirelessly.
[0054] The travel system 102 may include components that provide powered movement for the vehicle 100. In one embodiment, the travel system 102 may include an engine 118, an energy source 119, a transmission 120, and wheels 121. The engine 118 may be an internal combustion engine, an electric motor, an air compression engine, or a combination of other types of engines, such as a hybrid engine consisting of a gasoline engine and an electric motor, or a hybrid engine consisting of an internal combustion engine and an air compression engine. The engine 118 converts the energy source 119 into mechanical energy.
[0055] Examples of energy source 119 include gasoline, diesel, other petroleum-based fuels, propane, other compressed gas-based fuels, ethanol, solar panels, batteries, and other sources of electricity. Energy source 119 may also provide energy to other systems of vehicle 100.
[0056] The transmission 120 can transmit mechanical power from the engine 118 to the wheels 121. The transmission 120 may include a gearbox, a differential, and a drive shaft. In one embodiment, the transmission 120 may also include other devices, such as a clutch. Among them, the drive shaft may include one or more shafts that can be coupled to one or more wheels 121.
[0057] The sensing system 104 may include several sensors that sense information about the environment around the vehicle 100. For example, the sensing system 104 may include a positioning system 122 (the positioning system may be a GPS system, or a Beidou system or other positioning systems), an inertial measurement unit (IMU) 124, a radar 126, a laser rangefinder 128, and a camera 130. The sensing system 104 may also include sensors of the internal systems of the monitored vehicle 100 (e.g., an in-vehicle air quality monitor, a fuel gauge, an oil temperature gauge, etc.). Sensor data from one or more of these sensors may be used to detect objects and their corresponding characteristics (position, shape, direction, speed, etc.). Such detection and recognition are key functions for the safe operation of the vehicle 100.
[0058] Positioning system 122 may be used to estimate the geographic location of vehicle 100. Inertial measurement unit 124 is used to sense position and orientation changes of vehicle 100 based on inertial acceleration. In one embodiment, inertial measurement unit 124 may be a combination of an accelerometer and a gyroscope.
[0059] Radar 126 may utilize radio signals to sense objects within the surrounding environment of vehicle 100. In some embodiments, in addition to sensing objects, radar 126 may also be used to sense the speed and / or heading of an object.
[0060] The laser rangefinder 128 may utilize laser light to sense objects in the environment in which the vehicle 100 is located. In some embodiments, the laser rangefinder 128 may include one or more laser sources, a laser scanner, and one or more detectors, among other system components.
[0061] The camera 130 may be used to capture multiple images of the surrounding environment of the vehicle 100. The camera 130 may be a still camera or a video camera.
[0062] The control system 106 controls the operation of the vehicle 100 and its components. The control system 106 may include various elements, including a steering system 132 , a throttle 134 , a brake unit 136 , a computer vision system 140 , a path control system 142 , and an obstacle avoidance system 144 .
[0063] The steering system 132 is operable to adjust the forward direction of the vehicle 100. For example, in one embodiment, it may be a steering wheel system.
[0064] The throttle 134 is used to control the operating speed of the engine 118 and, in turn, the speed of the vehicle 100 .
[0065] The brake unit 136 is used to control the deceleration of the vehicle 100. The brake unit 136 can use friction to slow down the wheel 121. In other embodiments, the brake unit 136 can convert the kinetic energy of the wheel 121 into electric current. The brake unit 136 can also take other forms to slow down the rotation speed of the wheel 121 to control the speed of the vehicle 100.
[0066] The computer vision system 140 can be operated to process and analyze the images captured by the camera 130 in order to identify objects and / or features in the environment surrounding the vehicle 100. The objects and / or features may include traffic signs, road boundaries, and obstacles. The computer vision system 140 may use object recognition algorithms, Structure from Motion (SFM) algorithms, video tracking, and other computer vision techniques. In some embodiments, the computer vision system 140 may be used to map the environment, track objects, estimate the speed of objects, and the like.
[0067] The route control system 142 is used to determine the driving route of the vehicle 100. In some embodiments, the route control system 142 may combine data from the radar 126, the positioning system 122, and one or more predetermined maps to determine the driving route for the vehicle 100.
[0068] The obstacle avoidance system 144 is used to identify, evaluate, and avoid or otherwise negotiate potential obstacles in the environment of the vehicle 100 .
[0069] Of course, in one example, the control system 106 may include additional or alternative components other than those shown and described, or may also reduce some of the components shown above.
[0070] The vehicle 100 interacts with external sensors, other vehicles, other computer systems, or users through peripherals 108. The peripherals 108 may include a wireless communication system 146, an onboard computer 148, a microphone 150, and / or a speaker 152.
[0071] In some embodiments, the peripheral device 108 provides a means for the user of the vehicle 100 to interact with the user interface 116. For example, the onboard computer 148 can provide information to the user of the vehicle 100. The user interface 116 can also operate the onboard computer 148 to receive input from the user. The onboard computer 148 can be operated via a touch screen. In other cases, the peripheral device 108 can provide a means for the vehicle 100 to communicate with other devices located in the vehicle. For example, the microphone 150 can receive audio (e.g., voice commands or other audio input) from the user of the vehicle 100. Similarly, the speaker 152 can output audio to the user of the vehicle 100.
[0072] The wireless communication system 146 can communicate wirelessly with one or more devices directly or via a communication network. For example, the wireless communication system 146 can use 3G cellular communication, such as CDMA, EVDO, GSM / GPRS, or 4G cellular communication, such as LTE. Or 5G cellular communication. The wireless communication system 146 can communicate with a wireless local area network (WLAN) using WiFi. In some embodiments, the wireless communication system 146 can communicate directly with the device using an infrared link, Bluetooth, or ZigBee. Other wireless protocols, such as various vehicle communication systems, for example, the wireless communication system 146 may include one or more dedicated short range communications (DSRC) devices, which may include public and / or private data communications between vehicles and / or roadside stations.
[0073] The power source 110 can provide power to various components of the vehicle 100. In one embodiment, the power source 110 can be a rechargeable lithium-ion or lead-acid battery. One or more battery packs of such batteries can be configured as a power source to provide power to various components of the vehicle 100. In some embodiments, the power source 110 and the energy source 119 can be implemented together, such as in some all-electric vehicles.
[0074] Some or all functions of the vehicle 100 are controlled by a computer system 112. The computer system 112 may include at least one processor 113 that executes instructions 115 stored in a non-transitory computer-readable medium such as a memory 114. The computer system 112 may also be a plurality of computing devices that control individual components or subsystems of the vehicle 100 in a distributed manner.
[0075] Processor 113 may be any conventional processor, such as a commercially available CPU. Alternatively, the processor may be a dedicated device such as an ASIC or other hardware-based processor. Figure 2 Functionally illustrated processor, memory and other elements of the computer in the same block, but those of ordinary skill in the art will appreciate that the processor, computer or memory may actually include multiple processors, computers or memories that may or may not be stored in the same physical housing. For example, the memory may be a hard drive or other storage medium that is located in a housing different from the computer. Therefore, references to processors or computers will be understood to include references to a collection of processors or computers or memories that may or may not operate in parallel. Different from using a single processor to perform the steps described herein, some components such as steering components and deceleration components may each have their own processors that only perform calculations related to the functions specific to the components.
[0076] In various aspects described herein, the processor may be located remote from the vehicle and in wireless communication with the vehicle. In other aspects, some of the processes described herein are performed on a processor disposed within the vehicle and others are performed by a remote processor, including taking the necessary steps to perform a single maneuver.
[0077] In some embodiments, the memory 114 may contain instructions 115 (e.g., program logic) that may be executed by the processor 113 to perform various functions of the vehicle 100, including those described above. The memory 114 may also contain additional instructions, including instructions to send data to, receive data from, interact with, and / or control one or more of the travel system 102, the sensor system 104, the control system 106, and the peripheral devices 108.
[0078] In addition to instructions 115, memory 114 may also store data such as road maps, route information, the vehicle's location, direction, speed, and other such vehicle data, and other information. Such information may be used by vehicle 100 and computer system 112 during operation of vehicle 100 in autonomous, semi-autonomous, and / or manual modes.
[0079] The user interface 116 is used to provide information to or receive information from a user of the vehicle 100. Optionally, the user interface 116 may include one or more input / output devices within the set of peripherals 108, such as a wireless communication system 146, an onboard computer 148, a microphone 150, and a speaker 152.
[0080] Computer system 112 may control functions of vehicle 100 based on input received from various subsystems (e.g., travel system 102, sensing system 104, and control system 106) and from user interface 116. For example, computer system 112 may utilize input from control system 106 in order to control steering system 132 to avoid obstacles detected by sensing system 104 and obstacle avoidance system 144. In some embodiments, computer system 112 may be operable to provide control over many aspects of vehicle 100 and its subsystems.
[0081] Alternatively, one or more of the above-mentioned components may be installed or associated separately from the vehicle 100. For example, the memory 114 may exist partially or completely separately from the vehicle 100. The above-mentioned components may be communicatively coupled together in a wired and / or wireless manner.
[0082] Optionally, the above components are only examples. In actual applications, the components in the above modules may be added or deleted according to actual needs. Figure 2 It should not be understood as limiting the embodiments of the present application.
[0083] The vehicle 100 may be a car, a truck, a motorcycle, a bus, a ship, an airplane, a helicopter, a lawn mower, an entertainment vehicle, an amusement park vehicle, construction equipment, a tram, a golf cart, a train, a cart, etc., and the embodiments of the present application are not particularly limited.
[0084] like Figure 31 is a schematic diagram of a computer system applicable to an embodiment of the present application. The computer system 101 includes a processor 103, and the processor 103 is coupled to a system bus 105. The processor 103 may be one or more processors, each of which may include one or more processor cores. A display adapter 107 may drive a display 109, and the display 109 is coupled to the system bus 105. The system bus 105 is coupled to an input / output (I / O) bus 175 via a bus bridge 111. An I / O interface 157 is coupled to the I / O bus 175. The I / O interface 157 communicates with a variety of I / O devices, such as an input device 117 (e.g., keyboard, mouse, touch screen, etc.), a media tray 121 (e.g., CD-ROM, multimedia interface, etc.), a transceiver 123 (which may send and / or receive radio communication signals), a camera 155 (which may capture scene and dynamic digital video images), a sensor 153, and a USB port 125. Optionally, the interface connected to the I / O interface 157 may be a USB interface.
[0085] The processor 103 may be any conventional processor, including a reduced instruction set computing ("RISC") processor, a complex instruction set computing ("CISC") processor, or a combination thereof. Alternatively, the processor may be a dedicated device such as an application specific integrated circuit ("ASIC"). Alternatively, the processor 103 may be a neural network processor or a combination of a neural network processor and the conventional processors described above.
[0086] Optionally, in various embodiments described herein, the computer system 101 may be located remotely from the autonomous vehicle and may communicate wirelessly with the autonomous vehicle. In other aspects, some of the processes described herein are performed on a processor disposed within the autonomous vehicle, and others are performed by a remote processor, including taking actions required to perform a single maneuver.
[0087] Computer system 101 can communicate with software deployment server 149 via network interface 129. Network interface 129 is a hardware network interface, such as a network card. Network 127 can be an external network, such as the Internet, or an internal network, such as Ethernet or a virtual private network (VPN). Optionally, network 127 can also be a wireless network, such as a WiFi network, a cellular network, etc.
[0088] The hard disk drive interface 131 is coupled to the system bus 105. The hard disk drive interface 131 is connected to the hard disk drive 133. The system memory 135 is coupled to the system bus 105. The data running in the system memory 135 may include an operating system 137 and an application program 143 of the computer system 101.
[0089] The operating system 137 includes a shell 139 and a kernel 141. The shell 139 is an interface between the user and the operating system 137. The shell 139 is the outermost layer of the operating system 137. The shell 139 manages the interaction between the user and the operating system 137: waiting for the user's input, interpreting the user's input to the operating system 137, and processing various output results of the operating system 137.
[0090] Kernel 141 consists of those parts of operating system 137 that manage memory, files, peripherals, and system resources. Interacting directly with hardware, kernel 141 typically runs processes and provides communication between processes, CPU time slice management, interrupts, memory management, IO management, and the like.
[0091] Application 143 includes autonomous driving related programs 147, such as programs for managing the interaction between the autonomous driving car and obstacles on the road, programs for controlling the route or speed of the autonomous driving car, and programs for controlling the interaction between the autonomous driving car and other autonomous driving cars on the road. Application 143 also exists on the system of software deployment server 149. In one embodiment, when the application 143 needs to be executed, the computer system 101 can download the application 143 from the software deployment server 149.
[0092] The sensor 153 may be associated with the computer system 101 via the I / O interface 157. The sensor 153 is used to detect the environment around the computer system 101. For example, the sensor 153 may detect animals, cars, obstacles, and crosswalks, etc. Further, the sensor may also detect the environment around the above-mentioned animals, cars, obstacles, crosswalks, etc., such as: the environment around the animals, for example, other animals around the animals, weather conditions, the brightness of the surrounding environment, etc. Optionally, if the computer system 101 is located in an autonomous vehicle, the sensor may be a camera, an infrared sensor, a chemical detector, a microphone, etc.
[0093] In one example, Figure 2 The computer system 112 may be Figure 3 The computer system 101 in FIG. Figure 2 The processor 113 in may be Figure 3 The processor 103 in Figure 2 The memory 114 may be Figure 3 in system memory 135 or media disk 121.
[0094] In another example, Figure 3 The software architecture of the operating system 137 in may be Figure 1The autonomous vehicle software architecture shown.
[0095] The following is a brief introduction to some of the terms and technologies involved in the embodiments of this application:
[0096] 1) AUTOSAR system
[0097] The AUTOSAR system is an open, standardized software architecture system developed for the automotive industry. The bottom layer of the software architecture system can realize data transmission through the data distribution service (DDS), but it is certainly not limited to this. Figure 4 The AUTOSAR system 20 (which is an AUTOSAR-based autonomous driving or assisted autonomous driving system) may include an application module 201 and a communication module 202. The application module 201 may correspond to Figure 1 The application layer 101a in the communication module 202 may correspond to Figure 1 The framework layer 102a in the application module 201 is mainly used for transmitting data between different application programs.
[0098] The communication module 202 may include a communication mode layer 301 , a binding layer (DDS binding layer) 302 and a DDS 303 .
[0099] The communication mode layer 301 can provide the following message communication modes: event mode, method mode and parameter mode. Different message communication modes have different message formats. Event mode is a message communication mode of direct message delivery. In this mode, application 1 sends a message to application 2, and application 2 receives the message. Method mode is a message communication mode of remote procedure call (RPC). In this mode, application 1 sends a message requesting a service to application 2; application 2 replies a response message to application 1 according to the message. Parameter mode is a message communication mode of requesting to obtain the value of a parameter or requesting to change the value of a parameter. In this mode, application 1, which needs to obtain a parameter or change the value of a parameter, sends a message to application 2. Application 2 sends the value of the requested parameter to application 1 according to the message; or changes the value of the parameter according to the message and sends the changed value of the parameter to application 1. Message communication modes are visible to users, and their specific implementation is achieved with the help of DDS303.
[0100] The communication mode layer 301 calls the interface of the DDS 303 through the combination layer 302 .
[0101] DDS303 is a distributed, highly reliable, and highly real-time message communication middleware. DDS303 emphasizes data-centricity, and a topic is an identifier that uniquely identifies a certain type of data. Messages on a specific topic have a certain data type, and the data type is defined by basic types such as char, byte, and int. For example, a topic may be "TEXT", and the data type of the message on this topic is char. DDS303 provides a message interface for defining the message format and data type of the messages sent and received. The message interface provided by DDS303 includes a write interface and a read interface.
[0102] The communication mode of DDS303 is a publish-subscribe model, which divides the system into several logically independent domains. Each domain contains several entities, which complete the data publishing, subscription and other interactive tasks. The entities include: domain participants, publishers, subscribers, topics, data writers and data readers. These entities have several QoS corresponding to them.
[0103] A domain is a range concept, which is uniquely identified by a domain ID. Usually, only entities in the same domain can communicate, and there is generally no logical relationship between entities in different domains.
[0104] Domain participants serve as the entry point of DDS303 and are used to create topics, register data types, and manage entities such as publishers and subscribers.
[0105] The publisher is responsible for managing (e.g., creating and deleting) data writers. When a publisher registers in DDS as a data publisher, it can declare the data type and topic it produces, and describe the registration declaration information such as the QoS provided. The subscriber is responsible for managing (e.g., creating and deleting) data readers. When a subscriber registers in DDS as a data subscriber, it can declare the data type, topic, QoS, and other registration declaration information it requires.
[0106] The data writer is responsible for generating data using a write function (such as write()). The data reader is responsible for reading data. It should be noted that DDS303 includes a class of data readers and data writers for service discovery, such as the first data writer and the first data reader in the first embodiment below; or, the publisher data reader (pb-datareader) in the AUTOSAR system, the subscriber data writer (sb-datawriter) in the proxy device; or, the subscriber data reader (sb-datareader) in the proxy device, the publisher data writer (pb-datawriter) in the AUTOSAR system. And, DDS303 also includes a class of data readers and data writers for data transmission between applications (such as the second data reader and the second data writer in the first embodiment below).
[0107] The relationship between domain participants, publishers, subscribers, data writers, and data readers can be as follows Figure 5 As shown. Figure 5 In the example, a domain participant 401 can create multiple publishers 402 and / or subscribers 403, and a publisher 402 can create multiple data writers 404 (e.g. Figure 5 A subscriber 403 can create multiple data readers 405 (such as data writer 404-1 and data writer 404-2 in FIG. 4 ). Figure 5 If a data writer or a data reader is created by a publisher or a subscriber, the data writer or the data reader is associated with the domain participant that created the publisher or the subscriber.
[0108] Each data writer and data reader can be bound to a topic. The topics between the data writers and data readers that communicate with each other are the same. When the message communication mode is the event mode, the topic includes the identifier of the event. When the message communication mode is the method mode, the topic includes the method identifier. When the message communication mode is the parameter mode, the topic includes the parameter identifier.
[0109] QoS is a set of configurable parameters that can be used to ensure the quality of service of DDS303 message communication.
[0110] In one implementation, the QoS of the data writer needs to be compatible with the QoS of the data reader. The value of the QoS of the data writer defines the quality of service provided by the data writer; the value of the QoS of the data reader defines the quality of service required by the data reader. The compatibility of the QoS of the data writer with the QoS of the data reader means that the quality of service provided by the data writer must meet the quality of service required by the data reader.
[0111] In one possible implementation, the QoS compatibility of the data writer and the data reader is: the QoS value of the data writer is greater than or equal to the QoS value of the data reader. For example, the DEADLINE QoS of the data writer is compatible with the DEADLINE QoS of the data reader, which means that the duration of the DEADLINE QoS of the data writer is less than the duration of the DEADLINE QoS of the data reader. For another example, the reliability QoS of the data writer is compatible with the reliability QoS of the data reader, including when the reliability QoS of the data reader is best-effort, the reliability QoS of the data writer is reliable or best-effort. When the reliability QoS of the data reader is reliable, the reliability QoS of the data writer must be reliable.
[0112] DDS303 can establish data links for data writers and data readers with the same subject and compatible QoS.
[0113] like Figure 6 As shown, a DDS publish-subscribe model applicable to the embodiment of the present application is shown. Figure 6 Publisher 402 creates two data writers (such as Figure 6 The data writer 404-1 and the data writer 404-2 in , the subscriber 403 creates two data readers (such as Figure 6 405-1 and 405-2 in the data reader). If Figure 6 In the example, if data writer 404-1 and data reader 405-1 have the same topic 1 and compatible QoS, and data writer 404-2 and data reader 405-2 have the same topic 1 and compatible QoS, DDS can establish a data link between data writer 404-1 and data reader 405-1, and a data link between data writer 404-2 and data reader 405-2.
[0114] When using DDS to implement the underlying data transmission of the AUTOSAR system, the relationship between the domain, domain participants and the application program of the application module 201 is as follows: Figure 7 As shown. Figure 7 In the example, application module 201 includes application 601A, application 601B, application 601C, and application 601D. A process of an application corresponds to one or more domain participants. Figure 7In the example, domain participants 1 and 2 have the same domain number (marked as domain 610). Domain participants 3 and 4 have the same domain number (marked as domain 620). Domain participants 5, 6, and 7 have the same domain number (marked as domain 630). Only data readers and data writers of domain participants belonging to the same domain can establish data links with QoS according to the topic.
[0115] 2) ROS
[0116] ROS provides services similar to computer systems, including hardware abstract description, underlying driver management, execution of common functions, inter-program message passing, program distribution package management, etc. Tools and libraries are provided for acquiring, building, writing and executing multi-machine fusion programs. It should be noted that the embodiments of the present application do not limit the version of ROS. For example, ROS can be ROS1.0 or ROS2.0. The following description is based on ROS1.0 as an example.
[0117] like Figure 8 The ROS 70 shown (which is an ROS-based autonomous driving or assisted autonomous driving system) may include an application module 701 and a communication module 702. The application module 701 may correspond to Figure 1 The application layer 101a in the communication module 702 may correspond to Figure 1 The framework layer 102a in the application module 701 is used to transmit data between different application programs.
[0118] The communication module 702 may include a communication mode layer 7020 and ros_comm7021.
[0119] The communication mode layer 7020 can provide the following message communication modes: topic mode, service / client mode and parameter (ros parameter service) mode. Different message communication modes have different message formats. The topic mode is a message communication mode of direct message delivery, in which application 1 sends a message to application 2, and application 2 receives the message. The service / request mode is an RPC message communication mode, in which application 1 sends a message requesting a service to application 2; application 2 replies a response message to application 1 based on the message. The parameter mode is a message communication mode for requesting the value of a parameter or requesting to change the value of a parameter. In this mode, application 1 that needs to obtain a parameter or change the value of a parameter sends a message to the parameter server. The parameter server sends the value of the requested parameter to application 1 that requests to obtain the parameter based on the message. Alternatively, the value of the parameter is changed based on the message, and the value of the changed parameter is sent to application 1. The message communication mode is user-visible logic, and their specific implementation is achieved with the help of ros_comm7021.
[0120] ros_comm7021 is a middleware that can provide message transmission. The message interface provided by ros_comm7021 includes a publishing interface and a subscription interface, which are used to define the message format of ROS, etc.
[0121] The communication mode of ros_comm7021 is also a publish-subscribe model. The publish-subscribe model includes the master node, nodes, and parameter servers. A node can be an executable file used to communicate with other nodes.
[0122] A node can publish messages on a topic and become a publisher, or it can subscribe to messages on a topic and become a subscriber.
[0123] Publisher, responsible for sending data using the publishing interface.
[0124] Subscriber, responsible for receiving data using the subscription interface.
[0125] The master node manages the nodes and helps publishers and subscribers find each other.
[0126] A parameter server is a multi-variable, shared dictionary that can be accessed through a network API. A parameter server can be seen as a node that uses the parameter server to store, retrieve, or change the value of parameters at runtime.
[0127] A topic is a topic agreed upon by publishers and subscribers when they communicate with each other. Each publisher and subscriber can be bound to a topic. The topics between publishers and subscribers that communicate with each other are the same. When the message communication mode is the topic mode, the topic includes the topic. When the message communication mode is the method mode, the topic includes the method identifier. When the message communication mode is the parameter mode, the topic includes the parameter identifier.
[0128] ros_comm7021 can establish data links between publishers and subscribers with the same topic.
[0129] like Fig. 9 As shown, the publish-subscribe model of ros_comm that can be applied to the embodiment of the present application. Fig. 9 The publisher 801 and the subscriber 802 have the same topic. ros_comm establishes a data link between the publisher 801 and the subscriber 802 with the same topic.
[0130] 3) Serialization and deserialization
[0131] Serialization: refers to the process of converting an object into a serial form that can be transmitted.
[0132] Deserialization: The process of restoring a transmittable sequence to an object is called object deserialization.
[0133] 4) Object
[0134] In this application, an object refers to an executor that sends or receives a message. In the AUTOSAR system, an object can include a data writer and a data reader. In ROS, an object can include a publisher and a subscriber.
[0135] 5) Instance identifier
[0136] In order to distinguish the processes of different applications of the same subject, an instance identifier is introduced in the DDS in the embodiment of the present application, which is used to distinguish the processes of different applications of the same subject. For example, the AUTOSAR system includes two sensors, two application processes with the same subject of "obtaining sensor data", and the instance identifier of one application process is 1, and the instance identifier of the other application process is 2. The application process with instance identifier 1 is used to obtain data from sensor 1, and the application process with instance identifier 2 is used to obtain data from sensor 2.
[0137] 6) Method identifier, parameter identifier, service / request identifier
[0138] Method identifiers are used to indicate procedures that are called by application processes in AUTOSAR systems.
[0139] The service / request identifier is used to indicate the service or request requested by the application process in ROS.
[0140] The parameter identifier in the AUTOSAR system is used to indicate the parameters set or obtained by the application process in the AUTOSAR system. The parameter identifier in ROS is used to indicate the parameters set or obtained by the application process in ROS.
[0141] 7) Other terms
[0142] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0143] In the embodiments of the present application, "at least one" means one or more, and "plurality" means two or more.
[0144] In the embodiments of the present application, "and / or" is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0145] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0146] This application proposes to combine the AUTOSAR system with ROS to take advantage of the advantages of both and create a solution for an autonomous driving system or an assisted autonomous driving system. However, due to the different software architectures of the AUTOSAR system and ROS, the rules followed when matching the object sending the message with the object receiving the message are inconsistent, the sending and receiving interfaces are different, and the message formats of the two are inconsistent. Therefore, the integration of the two needs to consider the intercommunication of the messages of the two.
[0147] As an example, Fig.10As shown in the figure, the intercommunication between the AUTOSAR system and ROS can be considered as follows: the event mode in the AUTOSAR system is intercommunication with the subject mode in ROS; the method mode in the AUTOSAR system is intercommunication with the service / request mode in ROS; the parameter mode in the AUTOSAR system is intercommunication with the parameter mode in ROS.
[0148] However, for the bottom layer of the AUTOSAR system and the ROS communication module, since the DDS used by the bottom layer of the AUTOSAR system and the ros_comm of the bottom layer of ROS are two completely different communication middlewares, and the matching and data transmission mechanisms of the objects sending messages and receiving messages are different as mentioned above, they are naturally incompatible, so solving their compatibility is the core of solving the intercommunication between ROS and AUTOSAR. Specifically, it involves the following compatibility issues:
[0149] Question 1: How to match the objects sending messages and receiving messages in two different software architectures.
[0150] Question 2: The two have different publishing and subscription models and different sending and receiving interfaces. How to successfully send and receive messages?
[0151] Question 3: The message types of the two are inconsistent, and there are differences in serialization.
[0152] Question 4: The AUTOSAR system includes message filtering functions and uses QoS to ensure the reliability and real-time performance of message transmission. How can ROS also perceive these functions?
[0153] Based on this, the following technical solutions are proposed in the embodiments of the present application:
[0154] Solution 1: Implement the intercommunication solution between AUTOSAR system and ROS based on the proxy mode.
[0155] The intercommunication between AUTOSAR system and ROS is realized based on the proxy mode, and the intermediate proxy device is used as the medium for communication between AUTOSAR system and ROS, communicating with AUTOSAR system and ROS respectively, and then acting as a translator, responsible for message parsing, message conversion and operation logic compatibility between the two, so as to open up the communication between AUTOSAR system and ROS. In this way, AUTOSAR system and ROS do not need to be changed.
[0156] like Fig.11 As shown in FIG. 1 , a schematic diagram of a system architecture for implementing an intercommunication solution between an AUTOSAR system and ROS based on a proxy mode is provided in an embodiment of the present application. Fig.11 In the example, the AUTOSAR system 91 is connected to the proxy device 92 , and the proxy device 92 is connected to the ROS 93 .
[0157] As an example, the proxy device 92 includes a submodule 920 for realizing the connection between the event mode in the AUTOSAR system 91 and the subject mode in ROS 93; another submodule 921 for realizing the connection between the method mode in the AUTOSAR system 91 and the service / request mode in ROS 93; and another submodule 922 for realizing the connection between the parameter mode in the AUTOSAR system 91 and the parameter mode in ROS 93. Each submodule includes an object for sending and / or receiving messages.
[0158] Each submodule in the proxy device 92 can receive a message sent by the communication module 911 in the AUTOSAR system 91, convert the message into a message format recognizable by the communication module 931 in the ROS 93, and then send the format-converted message to the communication module 931 in the ROS 93. It can also receive a message sent by the communication module 931 in the ROS 93, convert the message into a message format recognizable by the communication module 911 in the AUTOSAR system 91, and send the format-converted message to the communication module 911 in the AUTOSAR system 91.
[0159] For the application of the application module 910 in the AUTOSAR system 91, the proxy device 92 is the application of another AUTOSAR system 91 on the other end. Their communication follows the communication logic of DDS at the bottom layer, that is, calling the communication logic, read and write interface, message type, and message filtering of DDS, using QoS to ensure the reliability and real-time of message transmission, thereby achieving the matching of objects and message transmission on both sides. To solve the above problem 4. Similarly, for the application of the application module 930 in ROS93, the proxy device 92 is the application of another ROS93 on the other end. Their communication follows the communication logic of ros_comm at the bottom layer, that is, calling the communication logic of ros_comm, publishing interface and subscription interface and message type, thereby achieving the matching of objects and message transmission on both sides, to solve the above problems 1 and 2.
[0160] After the proxy device 92 receives the messages from both sides at the bottom layer, the messages are passed to the upper layer of the proxy device 92, which will act as an actual translator. It parses the data on one side and converts it into a format that can be recognized by the other side, and finally uses the communication logic of the other side to forward the data to solve the above problem 3.
[0161] It should be noted that the proxy device, AUTOSAR system or ROS in the system architecture of the intercommunication solution between the AUTOSAR system and ROS based on the proxy mode can be integrated into one device or exist independently in one device. This application does not limit this.
[0162] Solution 2: Implement the intercommunication between AUTOSAR system and ROS based on the pass-through mode.
[0163] The intercommunication between AUTOSAR system and ROS is realized based on the direct mode, so that AUTOSAR system and ROS have the same underlying basic communication module. The following example takes the AUTOSAR system unchanged, introduces the DDS basic communication module at the bottom of ROS, and achieves the bottom-level communication parity with AUTOSAR. Introducing the DDS basic communication module at the bottom of ROS to solve the above problem 1, a DDS broker layer is added in the middle of ROS. Among them, the DDS broker layer is used to achieve:
[0164] 1. The ROS communication mode layer calls the DDS interface to send and receive messages to solve the above problem 2.
[0165] 2. Conversion of ROS application module message format to AUTOSAR system application module message format, or vice versa, to solve the above problem 3.
[0166] 3. AUTOSAR communication logic implementation, such as message filtering, QoS control message reception or sending, etc., to solve the above problem 4.
[0167] It should be noted that the intercommunication between the AUTOSAR system and ROS is realized based on the direct mode, so that the AUTOSAR system and ROS have the same underlying basic communication module. The AUTOSAR system remains unchanged. If the ROS version is ROS2.0, the underlying layer of ROS2.0 already contains the DDS basic communication module. Therefore, it is only necessary to add the logic in the above DDS combination layer that is not in ROS2.0 to the middleware layer (ros middleware, RMW) of ROS2.0. Among them, the middleware layer in ROS2.0 can realize the functions realized by ros_comm in ROS1.0 mentioned above. No more details.
[0168] like Fig.12 , which is a schematic diagram of the system architecture for implementing the intercommunication solution between the AUTOSAR system and ROS based on the direct mode in this application. In the system, the AUTOSAR system 10 is connected to the ROS 11.
[0169] The AUTOSAR system 10 includes an application module 101 and a communication module 102. The application module 101 includes an application program (such as control and execution). The communication module 102 includes a communication mode layer 1021, a bonding layer 1022 and a DDS 1023. The communication module 102 includes an object for sending and / or receiving messages, and an application program's transceiver interface for transmitting underlying data.
[0170] ROS11 includes an application module 111 and a communication module 112. The application module 111 includes applications (such as perception, computing, fusion, etc.). The communication module 112 includes DDS1123, a binding layer 1122, and a communication mode layer 1121. DDS1123 includes objects that send and / or receive messages, and the application's transceiver interface for the transmission of underlying data.
[0171] The communication module 102 of the AUTOSAR system 10 is connected to the DDS 1123 of the communication module 112 of the ROS 11 via the DDS 1023 .
[0172] The combination layer 1122 is used to convert messages of various message communication modes in the AUTOSAR system 10 received by the DDS 1123 into messages of various communication modes that can be recognized by the application module 111 in the ROS 11. The combination layer 1122 includes a submodule for converting messages of event mode that can be recognized by the application module 101 of the AUTOSAR system 10 into messages of topic mode that can be recognized by the application module 111 in the ROS 11, another submodule for converting messages of method mode that can be recognized by the application module 101 of the AUTOSAR system 10 into messages of service / request mode that can be recognized by the application module 111 in the ROS 11, and another submodule for converting messages of parameter mode that can be recognized by the application module 101 of the AUTOSAR system 10 into messages of parameter mode that can be recognized by the application module 111 in the ROS 11.
[0173] The following is a detailed description of the intercommunication between the AUTOSAR system and ROS based on the proxy mode in combination with the embodiments. The intercommunication between the AUTOSAR system and ROS based on the proxy mode includes: initialization phase, service discovery phase and message communication phase. The following describes these phases respectively:
[0174] Initialization phase
[0175] After the application process in the AUTOSAR system and the application process in ROS are created, the communication module in the AUTOSAR system includes the domain participants, publishers, subscribers, data writers and / or data readers of its application process. The communication module in ROS includes the publishers and / or subscribers of its application process.
[0176] When the message communication mode of the process of the application in the AUTOSAR system includes an event mode, after the first proxy module is initialized, the first proxy module includes domain participants, publishers, subscribers, data writers and / or data readers that are the same as the subject and instance identifiers of the communication module in the AUTOSAR system and are QoS-compatible.
[0177] When the message communication mode of the process of the application in the AUTOSAR system includes a method mode, after the first proxy module is initialized, the first proxy module includes domain participants, publishers, subscribers, data writers and / or data readers that have the same method identifier and instance identifier as the communication module in the AUTOSAR system and are QoS-compatible.
[0178] When the message communication mode of the process of the application in the AUTOSAR system includes a parameter mode, after the first proxy module is initialized, the first proxy module includes domain participants, publishers, subscribers, data writers and / or data readers that are the same as the communication module method identifier, parameter identifier and instance identifier in the AUTOSAR system and are QoS-compatible.
[0179] When the message communication mode of the process of the application in ROS includes a topic mode, after the second agent module is initialized, the second agent module includes a publisher and / or subscriber with the same topic as the communication module in ROS.
[0180] When the message communication mode of the process of the application in the ROS includes a service / request mode, after the second agent module is initialized, the second agent module includes a publisher and / or subscriber having the same service / request identifier as the communication module in the ROS.
[0181] When the message communication mode of the process of the application in the ROS includes a parameter mode, after the second agent module is initialized, the second agent module includes a publisher and / or subscriber that is the same as the service / request identifier and parameter identifier of the communication module in the ROS.
[0182] The embodiments of the present application do not limit the method for obtaining information such as the topic, instance identifier, QoS, method identifier, service / request identifier, parameter identifier in the AUTOSAR system, and parameter identifier in ROS in the proxy device. For example, the proxy device can obtain the above information by obtaining a configuration file, or the proxy device receives the above information sent by the AUTOSAR system and / or ROS.
[0183] The embodiments of the present application do not limit the triggering conditions for initializing the autonomous driving system or the assisted autonomous driving system. For example, the autonomous driving system or the assisted autonomous driving system completes the initialization after being powered on. Alternatively, the autonomous driving system or the assisted autonomous driving system receives instructions from the user and completes the initialization according to the instructions of the user.
[0184] Service discovery phase
[0185] The service discovery phase includes the service discovery process between the AUTOSAR system and the proxy device in the first embodiment; and the service discovery process between the proxy device and ROS in the second embodiment.
[0186] Embodiment 1
[0187] like Fig.13 FIG. 1 is a flow chart of an AUTOSAR system and a proxy device service discovery method provided in an embodiment of the present application. For example, this embodiment can be applied to Fig.11 The system architecture is shown. Fig.13 The method shown may include the following steps:
[0188] S100: The AUTOSAR system sends first data to the proxy device.
[0189] Specifically, the first data writer in the AUTOSAR system sends the first data with the subject of participant data to the first data reader in the proxy device. The first data includes information such as the identifier, network address, adopted QoS, and instance identifier of the first domain participant. The first data writer is a data writer preset in the AUTOSAR system for domain participant service discovery, and the first data reader is a data reader preset in the proxy device for domain participant service discovery. The first domain participant is any created domain participant in the AUTOSAR system.
[0190] S101: The proxy device determines whether the QoS in the first data is compatible with the QoS of the domain participant created in the proxy device. If not, the process ends; if yes, the process proceeds to S102.
[0191] S102: The agent device adds the first data to the local information base.
[0192] S103: The proxy device sends second data to the AUTOSAR system, where the second data includes information such as an identifier of a second domain participant, a network address, an adopted QoS, and an instance identifier. The second domain participant is a domain participant that has been created by the proxy device, and the QoS of the second domain participant is compatible with the QoS of the first domain participant.
[0193] S104: The AUTOSAR system adds the second data to the local information base.
[0194] At this point, the AUTOSAR system and the proxy device have exchanged each other's DDS domain participant information and recorded it in the local information base, and the domain participant automatic discovery process is completed.
[0195] Alternatively, the proxy device sends the second data to the AUTOSAR system, and the AUTOSAR system determines whether the QoS in the second data is compatible with the QoS of the domain participant created in the AUTOSAR system. If compatible, the second data is stored in the local information base, and the first data is sent to the proxy device, and the proxy device stores the first data in the local information base. The embodiment of the present application does not limit the order in which AUTOSAR and the proxy device discover each other.
[0196] S105: The AUTOSAR system sends description information of the second data writer (marked as first description information) to the proxy device. The second data writer is any data writer other than the first data writer in the AUTOSAR system. The first description information includes information such as the subject of the data written by the second data writer, the adopted QoS, and the instance identifier.
[0197] Specifically, a publisher data writer in the AUTOSAR system sends first description information to a subscriber data reader in the proxy device.
[0198] S106: The proxy device acquires a second data reader that matches the second data writer, wherein the second data reader is any data reader in the proxy device that matches the second data writer.
[0199] S107: The proxy device adds the matching relationship between the second data writer and the second data reader to the local information database, that is, establishes a data link between the second data writer and the second data reader.
[0200] Optionally, when the QoS of the second data writer changes or the second data writer is deleted, the AUTOSAR system may send a message to the proxy device, so that the proxy device updates the matching relationship in the local information base in real time.
[0201] Alternatively, the proxy device can send the description information of the data reader to the AUTOSAR system. If the AUTOSAR system finds a data writer that matches the second data reader, it will add the matching relationship between the data reader and the data writer to the local information base. When the QoS of the data writer / data reader associated with the domain participant changes or the data writer / data reader is deleted, the AUTOSAR system will also send information to the domain participants in the proxy device that matches it, so that the domain participants that match it can update the local information base in real time.
[0202] The above S100 to S107 are the matching process of the data writer in the AUTOSAR system and the data reader in the proxy device. Similarly, the matching process of the data reader in the AUTOSAR system and the data writer in the proxy device is similar to this, and will not be repeated.
[0203] It should be noted that the process of service discovery of the AUTOSAR system and the proxy device in S100 to S107 may be other methods in the prior art, and the present application does not limit this.
[0204] Embodiment 2
[0205] like Fig.14 As shown in FIG. 1 , a flow chart of an agent device and a ROS service discovery method provided in an embodiment of the present application is shown. For example, this embodiment can be applied to Fig.11 The system architecture is shown. Fig.14 The method shown may include the following steps:
[0206] S200: The first publisher in the proxy device sends first publisher information to the master node in the ROS. The first publisher information includes the subject of the message published by the first publisher.
[0207] The first publisher is any publisher in the proxy device. The master node in ROS is the process of the application in ROS. Optionally, the first publisher information may also include at least one of the message format, address or port of the message published by the first publisher information.
[0208] S201: The master node in ROS stores the first publisher information in the local information base.
[0209] S202: The master node in the ROS obtains a first subscriber that matches the first publisher. The first subscriber is any subscriber in the ROS that has the same subject as the first publisher information.
[0210] Specifically, the master node in ROS first obtains the subscriber information of any local subscriber; secondly, it determines whether the subject of the subscribed message in the subscriber information is the same as the subject in the first publisher information. If they are the same, the ROS master node takes the subscriber as the first subscriber and obtains the first subscriber information. The first subscriber information includes the subject of the message subscribed by the first subscriber. Optionally, the first subscriber information also includes the message format, address and port of the message subscribed by the first subscriber. If they are not the same, the ROS master node obtains the subscriber information of another subscriber in the master node, and determines whether the subject of the subscribed message in the subscriber information is the same as the subject in the first publisher information. And so on, until all subscribers in the ROS master node are traversed.
[0211] S203: The master node in the ROS sends the first publisher information to the first subscriber in the ROS.
[0212] S204: The first subscriber in the ROS stores the first publisher information in a local information base.
[0213] S205: The first subscriber in the ROS sends first subscriber information to the first publisher in the proxy device.
[0214] S206: The first publisher in the proxy device stores the first subscriber information in a local information database.
[0215] S207: The first publisher in the proxy device sends a response message to the first subscriber in the ROS.
[0216] At this point, the first publisher in the proxy device has established a publish-subscribe relationship with the first subscriber in the ROS.
[0217] The ROS master node can take the subscriber whose subject of the message subscribed in all subscriber information in the ROS master node is the same as the subject in the first publisher information as the first subscriber, and execute S203-S207. Each publisher in the proxy device can find a matching subscriber through the above method, and store the matching subscriber information in the local information library.
[0218] Alternatively, the publisher in ROS can send publisher information to the master node in ROS, and the subscriber in the proxy device can send subscriber information to the master node in ROS to complete the service discovery between the subscriber in the proxy device and the publisher in ROS. The service discovery between the proxy device and ROS can also be implemented using existing technologies, and the embodiments of the present application do not limit this.
[0219] After the service discovery between the AUTOSAR system and the proxy device is completed, a data link is established between the data writer and the data reader. At this time, the AUTOSAR system and the proxy device can communicate business data messages. After the service discovery between the proxy device and ROS is completed, a publish-subscribe relationship is established between the publisher and the subscriber. At this time, the proxy device and ROS can communicate business data messages.
[0220] It should be noted that the above ROS master node is a process of an application program, which can be in the proxy device or in the ROS. The embodiment of the present application does not limit this.
[0221] The above is the service discovery process of publishers and subscribers in ROS1.0. There is no ROS master node in ROS2.0. In ROS2.0, the publisher sends publisher information to the subscriber. The subscriber determines whether the received publisher information matches its own topic. If it matches, the publisher information is stored in the local information library; and the subscriber information is sent to the publisher. The publisher stores the matching subscriber information in the local information library. At this point, the publisher and the subscriber establish a publish-subscribe relationship. Alternatively, the subscriber in ROS can send subscriber information to the publisher. The publisher determines whether the received subscriber information matches its own topic. If it matches, the subscriber information is stored in the local information library; and the publisher information is sent to the subscriber. The subscriber stores the matching publisher information in the local information library to complete the service discovery of the subscriber and the publisher.
[0222] Message communication phase
[0223] Embodiment 3
[0224] like Fig.15 As shown in FIG. 1 , it is a flow chart of a method for implementing a method for implementing a message communication between an AUTOSAR system and a ROS system based on a proxy mode according to an embodiment of the present application, in which the AUTOSAR system sends a message to the ROS through a proxy device. For example, this embodiment can be applied to Fig.11 The system architecture is shown. Fig.15 The method shown may include the following steps:
[0225] S300: The AUTOSAR system generates a message 1. Specifically, an application module in the AUTOSAR system generates the message 1. The format of the message 1 is a format that can be recognized by the application module of the AUTOSAR system.
[0226] When the message 1 is a message in event mode, the message 1 may include an event, an instance identifier, a message content, etc. Among them, the event is a subject used to find the message recipient, and the instance identifier indicates the process of the application that generates the message 1. The message content is the specific information sent.
[0227] When message 1 is a message in method or parameter mode, message 1 may include a first message identifier, an instance identifier, etc. The first message identifier includes a method identifier and / or a parameter identifier. Exemplarily, the first message identifier includes: a method identifier indicating a SET method, a parameter identifier indicating a certain parameter, etc. The method identifier and / or the parameter identifier are topics used to find the message recipient. The instance identifier indicates the process of the application that generates message 1.
[0228] S301: The AUTOSAR system uses a first serialization function to serialize message 1 into message 2. Serialization is to convert a message into a form that can be transmitted. The format of message 2 is a format that can be recognized by the communication module of the AUTOSAR system.
[0229] Specifically, the application module in the AUTOSAR system calls the write interface of DDS to send message 1 to the DDS of the communication module. The communication module serializes message 1 into message 2 using the first serialization function.
[0230] S302: The AUTOSAR system sends a message 2 to the proxy device.
[0231] Specifically, the first object of the DDS of the communication module in the AUTOSAR system sends the message 2 through the write interface. The first object is the data writer assigned by the DDS to the message 1 when the message 1 passes through the DDS.
[0232] When the message 1 is a message in event mode, the subject of the first object is the same as the event in the message 1 , and the instance identifier of the first object is the same as the instance identifier in the message 1 .
[0233] When the message 1 is a message in method or parameter mode, the subject of the first object is the same as the method identifier and / or parameter identifier in the message 1 , and the instance identifier of the first object is the same as the instance identifier in the message 1 .
[0234] S303: The proxy device uses the first serialization function to deserialize the message 2 into the message 3. The format of the message 3 is a format that can be recognized by the application module in the AUTOSAR system. Deserialization is the opposite process of serialization.
[0235] S304: The proxy device filters message 3 according to the instance identifier in message 3.
[0236] Specifically, the proxy device assigns message 3 to the second object, wherein the second object is a data reader in the proxy device that matches the first object, and the instance identifier of the second object is the same as the instance identifier in message 3. Thus, the proxy device filters messages that have different instance identifiers from the second object.
[0237] S305: The proxy device converts message 3 into message 4, wherein the format of message 4 is a format that can be recognized by the application module of ROS. Specifically:
[0238] The second object in the proxy device reads message 3 through the DDS read interface. Then, the following steps are performed:
[0239] When the first message identifier in message 3 includes a method identifier, the proxy device obtains a service / request identifier corresponding to the method identifier in the first message identifier according to the pre-stored correspondence between the method identifier in the AUTOSAR system and the service / request identifier in ROS. Message 4 includes a second message identifier, and the second message identifier includes a service / request identifier in ROS.
[0240] For example, the correspondence between the method identifier in the AUTOSAR system and the service / request identifier in ROS is shown in Table 1:
[0241] Table 1
[0242] Method identifiers in AUTOSAR systems Service / request identifiers in ROS 110 2210 120 2220 130 2230 140 2240
[0243] Based on the example in Table 1, if the method identifier in message 3 is 110, then the service / request identifier included in message 4 is 2210.
[0244] It can be understood that the method identifier and the service request identifier in Table 1 are only examples. In actual use, the method identifier may be the name of the method, and the service request identifier may be the name of the service / request.
[0245] When the first message identifier in message 3 includes a parameter identifier, the proxy device obtains a parameter identifier corresponding to the parameter identifier in the first message identifier according to the correspondence between "parameter identifiers in the AUTOSAR system and parameter identifiers in ROS". The proxy device converts the format of message 3 to generate a message 4 including a second message identifier. The second message identifier includes the parameter identifier in ROS.
[0246] For example, the correspondence between the parameter identifiers in the AUTOSAR system and the parameter identifiers in ROS is shown in Table 2:
[0247] Table 2
[0248] Parameter identifiers in AUTOSAR systems Parameter identifiers in ROS AUTOSAR system parameter identifier 1 ROS parameter identifier 1 AUTOSAR system parameter identifier 2 ROS parameter identifier 2
[0249] Based on the examples in Table 1 and Table 2, if the method identifier in the first message identifier is 130, which indicates a set method, then the corresponding service / request identifier in ROS is 2230, and the first parameter identifier in the first message identifier is: AUTOSAR system parameter identifier 1. The parameter identifier in the second message identifier is: ROS parameter identifier 1.
[0250] S306: The proxy device uses the second serialization function to serialize message 4 into message 5. The format of message 5 is a format that can be recognized by the communication module of ROS.
[0251] It should be noted that, in the actual implementation process, S305 and S306 can be integrated into one step or can be separated into separate steps, and this application does not limit this.
[0252] S307: The proxy device sends message 5 to ROS. Specifically, the second object in the proxy device sends message 5 to the third object in the proxy device. The third object uses the ROS publishing interface to send message 5 to ROS. The third object is the publisher in the proxy device.
[0253] When message 5 is a message in topic mode, the topic of the message published by the third object is the same as the topic of message 5.
[0254] When message 5 is a message in service / request or parameter mode, the subject of the message published by the third object is the same as the service / request identifier or parameter identifier in message 5 .
[0255] S308: ROS uses the second serialization function to deserialize message 5 into message 6, and the format of message 6 is a format that can be recognized by the application module of ROS.
[0256] S309: ROS distributes the message 6 to the fourth object, and the fourth object reads the message 6 from the subscription interface of ROS. The fourth object is a subscriber in ROS that matches the third object.
[0257] It should be noted that when message 6 does not include the second message identifier, ROS executes S309, and takes action (such as modifying the configuration in ROS) or does not take action according to message 6, and then ends. When message 6 includes the second message identifier, ROS executes S309 and then executes S310.
[0258] S310: The ROS provides the service / request indicated by the service / request identifier in the second message identifier in message 6.
[0259] Exemplarily, the service / request identifier included in the second message identifier indicates a set request, and the ROS parameter identifier 1 included in the second message identifier indicates parameter 1. ROS sets the value of parameter 1 according to the indication of the service / request identifier.
[0260] S311: ROS obtains the execution result 1 of the service / request indicated by the service / request identifier in the second message identifier.
[0261] Based on the example in S310 , execution result 1 includes: the value of parameter 1 set by the ROS is Y.
[0262] So far, S300 to S309 implement the AUTOSAR system sending messages to ROS through the proxy device.
[0263] In this embodiment, when the AUTOSAR system sends a message to ROS through the proxy device, the proxy device can filter the message according to the instance identifier and convert it into a format that can be recognized by ROS, thereby realizing message communication in multiple modes between the AUTOSAR system and ROS (including event / topic mode, method / service request mode, parameter mode, etc.). At the same time, the service selection in the AUTOSAR system can be taken into account, and QoS can be used to ensure the reliability and real-time performance of message transmission.
[0264] Subsequently, ROS may send the execution result 1 to the AUTOSAR system through the proxy device. Specifically, reference may be made to the method in which ROS sends a message to the AUTOSAR system through the proxy device in the following fourth embodiment.
[0265] Embodiment 4
[0266] like Fig.16 As shown in FIG. 1 , a flow chart of a method for implementing a method for implementing a message communication between an AUTOSAR system and a ROS system based on a proxy mode provided in an embodiment of the present application, in which ROS sends a message to an AUTOSAR system through a proxy device. For example, this embodiment can be applied to Fig.11 The system architecture is shown. Fig.16 The method shown may include the following steps:
[0267] S400: ROS generates message 7. Specifically, the application module in ROS generates message 7. The format of message 7 is a format that can be recognized by the application module of ROS.
[0268] When the message 7 is a message in topic mode, the message 7 may include a topic, message content, etc. Among them, the topic is used to find the subscriber, and the message content is the specific information sent.
[0269] When message 7 is a message in service / request mode or parameter mode, message 7 may include a first message identifier. The first message identifier includes a service / request identifier and / or a parameter identifier. Exemplarily, the first message identifier includes: a service / request identifier indicating a SET request, a parameter identifier indicating a certain parameter, etc. The service / request identifier and / or the parameter identifier are topics used to find subscribers.
[0270] S401: ROS uses the second serialization function to serialize message 7 into message 8. Serialization is to convert a message into a form that can be transmitted. The format of message 7 is a format that can be recognized by the communication module of ROS.
[0271] Specifically, the application module in ROS calls the publishing interface of the communication module to send message 7 to the ros_comm of the communication module. The ros_comm of the communication module serializes message 7 into message 8 using the second serialization function.
[0272] S402: ROS sends message 8 to the proxy device.
[0273] Specifically, the fifth object of the DDS of the communication module in the ROS uses the publishing interface to send the message 8 to the proxy device. The fifth object is the publisher of the message whose subject is the same as the subject of the message 8.
[0274] S403: The proxy device uses the second serialization function to deserialize message 8 into message 9. The format of message 9 is a format that can be recognized by the ROS application module. Deserialization is the opposite process of serialization.
[0275] S404: The proxy device distributes the message 9 to the sixth object. The sixth object reads the message 9 from the subscription interface of the ROS. The sixth object is a subscriber matching the fifth object.
[0276] S405: The proxy device converts the message 9 into the message 10. The format of the message 10 is a format that can be recognized by the application module of the AUTOSAR system.
[0277] When message 9 includes a parameter identifier in ROS, the proxy device obtains a parameter identifier in the AUTOSAR system corresponding to the parameter identifier in ROS according to the correspondence between the parameter identifier in the AUTOSAR system and the parameter identifier in ROS. The proxy device converts message 9 into message 10 including the obtained parameter identifier in the AUTOSAR system.
[0278] When message 9 includes a service / request identifier in ROS, the proxy device obtains the method identifier in the AUTOSAR system corresponding to the service / request identifier in ROS according to the correspondence between the method identifier in the AUTOSAR system and the service / request identifier in ROS. The proxy device converts message 9 into message 10 including the obtained method identifier in the AUTOSAR system.
[0279] S406: The sixth object in the proxy device sends a message 10 to the seventh object. The seventh object is a data writer, and the subject of the written data is the same as the subject of the message 10.
[0280] S407: The proxy device adds the configured instance identifier to the message 10 to obtain the message 11. The instance identifier indicates the process of the application program that generates the message 7.
[0281] It should be noted that S407 is optional. When the message 10 includes a configured instance identifier, S407 does not need to be executed.
[0282] S408: The proxy device serializes the message 11 into a message 12 using the first serialization function.
[0283] S409: The proxy device sends a message 12 to the AUTOSAR system.
[0284] Specifically, the seventh object in the proxy device sends a message 12 to the AUTOSAR system through the DDS write interface.
[0285] Subsequently, the AUTOSAR system deserializes the message 12 using the first serialization function to obtain the message 13, and assigns the message 13 to the eighth object, which is a data reader matching the seventh object. The eighth object reads the message 13 through the DDS read interface, and the message 13 is a message format that can be recognized by the AUTOSAR system application module.
[0286] In this embodiment, when the ROS system sends a message to the AUTOSAR system through the proxy device, the proxy device can convert the message into a format that the AUTOSAR system can recognize, and add the instance identifier to the message sent to the AUTOSAR system, thereby realizing multiple modes of message communication between the ROS and AUTOSAR systems (including event / topic mode, method / service request mode, parameter mode, etc.). Similarly, the service selection in the AUTOSAR system can be taken into account, and QoS can be used to ensure the reliability and real-time performance of message transmission.
[0287] The following describes in detail the intercommunication between the AUTOSAR system and ROS based on the direct mode in combination with the embodiments. The intercommunication between the AUTOSAR system and ROS based on the direct mode also includes: an initialization phase, a service discovery phase, and a message communication phase.
[0288] Initialization phase
[0289] After the application process in the AUTOSAR system and the application process in ROS are created, the communication module in the AUTOSAR system includes the domain participants, publishers, subscribers, data writers and / or data readers of its application process. The communication module in ROS includes the publishers and / or subscribers of its application process.
[0290] When the message communication mode of the process of the application in the AUTOSAR system includes the event mode, after the ROS underlying data distribution service is initialized, it includes domain participants, publishers, subscribers, data writers and / or data readers that have the same QoS compatible with the topic and instance identifiers of the communication module in the AUTOSAR system.
[0291] When the message communication mode of the process of the application in the AUTOSAR system includes the method mode, after the ROS underlying data distribution service is initialized, it includes domain participants, publishers, subscribers, data writers and / or data readers that have the same method identifier and instance identifier as the communication module in the AUTOSAR system and are QoS-compatible.
[0292] When the message communication mode of the process of the application in the AUTOSAR system includes a parameter mode, after the ROS underlying data distribution service is initialized, it includes domain participants, publishers, subscribers, data writers and / or data readers that have the same parameter identifier and instance identifier as the communication module in the AUTOSAR system and are QoS-compatible.
[0293] The embodiments of the present application do not limit the method for obtaining the instance identifier in the ROS communication module conversion layer. For example, the ROS communication module conversion layer can obtain the instance identifier by obtaining the configuration file, or the ROS communication module conversion layer receives the instance identifier sent by the AUTOSAR system and / or the ROS application module.
[0294] The embodiments of the present application do not limit the triggering conditions for initializing the autonomous driving system or the assisted autonomous driving system. For example, the autonomous driving system or the assisted autonomous driving system completes the initialization after being powered on. Alternatively, the autonomous driving system or the assisted autonomous driving system receives instructions from the user and completes the initialization according to the instructions of the user.
[0295] Service discovery phase
[0296] Embodiment 5
[0297] The process of the service discovery method of the data writer in the AUTOSAR system and the data reader in the ROS can refer to the service discovery process of the data writer in the AUTOSAR system and the data reader in the proxy device in S100 to S108 in the first embodiment, and can also refer to other methods in the prior art, which are not limited in this application. No further description will be given.
[0298] After the service discovery of the AUTOSAR system and ROS is completed, a data link is established between the data writer and the data reader. At this time, the AUTOSAR system and ROS can communicate business data messages.
[0299] Message communication phase
[0300] Specific reference is made to the message communication method flow in the sixth embodiment for realizing the intercommunication between the AUTOSAR system and ROS based on the direct mode.
[0301] Embodiment 6
[0302] like Fig.17 As shown in FIG. 1 , a flow chart of a method for implementing AUTOSAR system and ROS message communication based on a direct mode provided in an embodiment of the present application is provided. This embodiment can be applied to Fig.12 The system architecture is shown. Fig.17 The method shown may include the following steps:
[0303] S500 to S502: The above S300 to S302 may be referred to, but are certainly not limited thereto.
[0304] S503: ROS uses the first serialization function to deserialize message 2 into message 3. The format of message 3 is a format that can be recognized by the application module in the AUTOSAR system.
[0305] S504: ROS filters message 3 according to the instance identifier in message 3.
[0306] Specifically, ROS assigns message 3 to the second object, where the second object is a data reader that matches the first object in the underlying DDS of the ROS communication module. The instance identifier of the second object is the same as the instance identifier in message 3. Thus, ROS filters messages that have different instance identifiers from the second object.
[0307] S505: ROS converts message 3 into message 4. The format of message 4 is a format that can be recognized by the ROS application module.
[0308] Specifically, referring to S305 in the third embodiment, the execution subject "agent device" in S305 is replaced by "conversion layer of ROS communication module".
[0309] When the message 4 does not include the second message identifier, after executing S505, the conversion layer of the ROS communication module sends the message 4 to the ROS application module. Then the process ends. When the message 4 includes the second message identifier, after executing S505, S506 is executed.
[0310] S506: The ROS provides the service / request indicated in the second message identifier in message 4.
[0311] Specifically, after the conversion layer of the ROS communication module sends the message 4 to the ROS application module, the ROS application module provides the service / request indicated by the identifier according to the service / request identifier in the message 4 .
[0312] Exemplarily, if the service / request identifier included in the second message identifier indicates a get request, the ROS parameter identifier included in the second message identifier indicates parameter 1. ROS obtains the value of parameter 1 according to the indication of the service / request.
[0313] S507: ROS obtains the execution result 1 of the service / request provided by ROS. The format of the execution result 1 is a format that can be recognized by the ROS application module. Subsequently, ROS can send the execution result 1 to the AUTOSAR system.
[0314] Based on the example in S506 , execution result 1 includes: the value of parameter 1 obtained by ROS is Y.
[0315] At this point, S500~S505 realize the AUTOSAR system sending messages to ROS.
[0316] In this embodiment, when the AUTOSAR system sends a message to ROS, the DDS and conversion layer added in ROS can filter the messages in the AUTOSAR system and convert them into a format that can be recognized by ROS, thus realizing message communication in multiple modes between the AUTOSAR system and ROS (including event / topic mode, method / service request mode, parameter mode, etc.). At the same time, the service selection in the AUTOSAR system can be taken into account, and QoS can be used to ensure the reliability and real-time performance of message transmission.
[0317] Embodiment 7
[0318] like Fig.18 As shown in FIG. 1 , it is a flowchart of another method for implementing AUTOSAR system and ROS message communication based on direct mode provided by an embodiment of the present application. For example, this embodiment can be applied to Fig.12 The system architecture is shown. Fig.18 The method shown may include the following steps:
[0319] S600: ROS generates message 5. The format of message 5 is a format that can be recognized by the application module of ROS.
[0320] Specifically, the explanation of message 5 refers to S400 in the fourth embodiment and will not be repeated here.
[0321] S601: ROS converts message 5 into message 6. The format of message 6 is a format that can be recognized by the AUTOSAR system application module.
[0322] Specifically, the ROS application module sends message 5 to the conversion layer of the communication module. The conversion layer of the ROS communication module converts message 5 into message 6. Refer to the method of S405 in the fourth embodiment, which will not be repeated here.
[0323] S602: ROS adds the configured instance identifier to message 6 to obtain message 7. The instance identifier indicates the process of the application that generates message 5.
[0324] It should be noted that S602 is optional. When message 6 includes a configured instance identifier, S602 does not need to be executed.
[0325] S603: ROS uses the first serialization function to serialize message 7 into message 8. The format of message 8 is a format that can be recognized by the AUTOSAR system communication module.
[0326] S604: ROS sends message 8 to the AUTOSAR system.
[0327] Specifically, the first object in ROS calls the write interface of DDS to send message 8 to the AUTOSAR system. The first object is any data writer in ROS, and the subject of the data written by the data writer is the same as the subject in message 8 and the instance identifier is the same.
[0328] S605: The AUTOSAR system uses the first serialization function to deserialize the message 8 into a message 9. The format of the message 9 is a format that can be recognized by the AUTOSAR system application module.
[0329] S606: The AUTOSAR system filters the message 9 according to the instance identifier in the message 9. Specifically, the AUTOSAR system assigns the message 9 to the second object. The second object is a data reader that matches the first object in the AUTOSAR system. The instance identifier of the second object is the same as the instance identifier in the message 9. Thus, the ROS filters the message that has a different instance identifier from the second object.
[0330] Subsequently, the communication module of the AUTOSAR system sends message 9 to the application process indicated by the instance identifier in message 9 of the application module of the AUTOSAR system. The application process takes corresponding actions according to message 9. For example, the application process in the AUTOSAR system receives the value of parameter 1 in the AUTOSAR system in message 9 as Y, and parameter 1 in the AUTOSAR system indicates whether to turn on the fog lights. The AUTOSAR system turns on the fog lights according to the value of the parameter as Y.
[0331] When message 9 does not include a method identifier, S606 is executed and then ends. When message 9 includes a method identifier, S606 is executed, the AUTOSAR system obtains the execution result, and the AUTOSAR system sends the execution result to ROS. For the specific process, refer to the steps in S500 to S505 in Example 5, which will not be repeated here.
[0332] In this embodiment, when ROS sends a message to the AUTOSAR system, the DDS and conversion layer added in the ROS system can convert the message format recognizable by the communication mode layer of the ROS communication module into a message format recognizable by the communication mode layer of the AUTOSAR system communication module, and add an instance identifier and then convert it into a format that can be transmitted by the AUTOSAR system DDS, thereby realizing message communication in multiple modes between the AUTOSAR system and ROS (including event / topic mode, method / service request mode, parameter mode, etc.). At the same time, the service selection in the AUTOSAR system can be taken into account, and QoS can be used to ensure the reliability and real-time performance of message transmission.
[0333] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the method steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0334] The embodiment of the present application can divide the functional modules of the proxy device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0335] like Fig.19 FIG. 5 is a schematic diagram of a proxy device provided in an embodiment of the present application. The proxy device 50 can be used to execute any of the above embodiments (such as Figure 13 to Figure 16The proxy device 50 is applied to an autonomous driving system or an assisted autonomous driving system, and the autonomous driving system or the assisted autonomous driving system also includes: a first computer system and a second computer system. The proxy device 50 may include: a first proxy module 501 and a second proxy module 502. The first proxy module 501 is used to receive a first message sent by a first computer system. The format of the first message is a format recognizable by the first computer system, and the first message is converted into a second message, and the format of the second message is a format recognizable by the second computer system. The second proxy module 502 is used to send a second message to the second computer system. For example, in combination Fig.13 The first agent module 501 can be used to execute the receiving steps in S100 and S105, the sending steps in S101-S102 and S103, and S106-S107. Fig.14 The second agent module 502 can be used to execute the sending steps in S200 and S207, the receiving step in S205, and S206. Fig.15 The first agent module 501 can be used to execute the receiving steps in S302, S303-S304. The second agent module 502 can be used to execute the sending steps in S305-S306, S307. Fig.16 The second agent module 502 can be used to execute the receiving steps in S402, S403-S404. The first agent module 501 can be used to execute the sending steps in S405-S408, S409.
[0336] Optionally, the first computer system includes an AUTOSAR system, and the second computer system includes ROS. Alternatively, the first computer system includes ROS, and the second computer system includes an AUTOSAR system.
[0337] Optionally, the subject of a message sent by a first object included in the first computer system is the same as the subject of a message received by a second object included in the proxy device 50. The first object is a sender of a message sent in the first computer system, and the second object is a receiver of a message received in the proxy device 50. The message sent by the first object includes the first message. The subject of a message sent by a third object included in the proxy device 50 is the same as the subject of a message received by a fourth object included in the second computer system. The third object is a sender of a message sent in the proxy device 50, and the fourth object is a receiver of a message received in the second computer system. The message sent by the third object includes the second message.
[0338] Optionally, the first computer system includes an AUTOSAR system, and the second computer system includes ROS, and the first proxy module 501 supports the same message format as the communication module of the AUTOSAR system. The second proxy module 502 supports the same message format as the communication module of ROS. Alternatively, the first computer system includes ROS, and the second computer system includes an AUTOSAR system, and the first proxy module 501 supports the same message format as the communication module of ROS. The second proxy module 502 supports the same message format as the communication module of the AUTOSAR system.
[0339] Optionally, the first computer system includes an AUTOSAR system and the second computer system includes ROS, and the QoS used by the first object is compatible with the QoS used by the second object.
[0340] Optionally, the first message is a message in a remote procedure call (RPC) mode or a message in a parameter mode, and the first message includes a first message identifier. The first message identifier includes a method identifier and / or a parameter identifier. The first proxy module 501 is also used to determine a second message identifier corresponding to the first identifier based on a correspondence between a message identifier recognizable by the first computer system and a message identifier recognizable by the second computer system. The second message includes a second message identifier, and the second message identifier includes a method identifier and / or a parameter identifier.
[0341] Optionally, the first proxy module 501 includes a first read interface and a first write interface, the first read interface is the same as the read interface of the first computer system, and the first write interface is the same as the write interface of the first computer system. The first proxy module 501 is specifically used to: receive the first message sent by the write interface of the first computer system using the first read interface.
[0342] Optionally, the second proxy module 502 includes a second read interface and a second write interface. The second read interface is the same as the read interface of the second computer system, and the second write interface is the same as the write interface of the second computer system. The second proxy module 502 is specifically used to: send the second message to the read interface of the second computer system using the second write interface.
[0343] Optionally, the first computer system includes an AUTOSAR system, and the second computer system includes ROS. The first proxy module 501 is also used to filter the first message. The first proxy module 501 is specifically used to convert the filtered first message into the second message.
[0344] Optionally, the first computer system includes ROS, the second computer system includes an AUTOSAR system, and the second message does not include an instance identifier. The first proxy module 501 is specifically configured to add the instance identifier to the second message, wherein the instance identifier is used by the AUTOSAR system to determine the fourth object.
[0345] In one example, see Figure 3 The first proxy module 501 and the second proxy module 502 can both be composed of Figure 3 The processor 103 in the system calls the computer program stored in the system memory 135 to implement it.
[0346] In one example, see Figure 2 The first proxy module 501 and the second proxy module 502 can both be composed of Figure 2 The processor 113 in the memory 114 calls the computer program stored in the memory 114 to implement it.
[0347] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any of the above proxy devices 50 and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.
[0348] It should be noted that the actions performed by the above modules are only specific examples. The actions actually performed by each unit refer to the above-mentioned Figure 13 to Figure 16 The actions or steps mentioned in the description of the embodiments are described.
[0349] like Fig. 20 FIG. 1 is a schematic diagram of a computer system structure provided in an embodiment of the present application. The computer system 90 can be used to execute any one of the above embodiments ( Fig.17 or Fig.18 ) in ROS. The computer system 90 is applied to an autonomous driving system or an assisted autonomous driving system, and the autonomous driving system or the assisted autonomous driving system also includes: a first computer system. The computer system 90 includes: a second application module 901 and a second communication module 902. The second communication module 902 is used to receive a first message sent by the first computer system. The format of the first message is a format that can be recognized by the first computer system, and the first message is converted into a second message. The format of the second message is a format that can be recognized by the second application module 901, and the second message is sent to the second application module 901. The second application module 901 is used to receive the second message. Alternatively, the second application module 901 is used to send the first message to the second communication module 902. The second communication module 902 is used to convert the first message into a second message. The format of the second message is a format that can be recognized by the first computer system, and the second message is sent to the first computer system. For example, in combination Fig.17The second communication module 902 can be used to: execute the receiving steps in S502, S503-S505, and the second application module 901 can be used to: execute S506-S507. Fig.18 The second application module 901 can be used to execute S600 to S602. The second communication module 902 can be used to: execute the sending steps in S603 and S604.
[0350] Optionally, the first computer system includes an automotive open system architecture AUTOSAR system, and the computer system 90 includes a robotic computer system ROS. Alternatively, the first computer system includes ROS, and the computer system 90 includes an AUTOSAR system.
[0351] Optionally, the subject of a message sent by a first object included in the first computer system is the same as the subject of a message received by a second object included in the computer system 90. The subject of a message received by a first object included in the first computer system is the same as the subject of a message sent by a second object included in the computer system 90. The first object is a sender of a message sent in the first computer system, and the second object is a receiver of a message received in the computer system 90. The message sent by the first object includes the first message; or, the message received by the first object includes the second message.
[0352] Optionally, the first computer system and the second communication module 902 support the same message format.
[0353] Optionally, the first computer system includes an AUTOSAR system and the computer system 90 includes ROS, and the QoS used by the first object is compatible with the QoS used by the second object.
[0354] Optionally, the first message is a message in a remote procedure call (RPC) mode or a message in a parameter mode, and the first message includes a first message identifier. The first message identifier includes a method identifier and / or a parameter identifier; the second communication module 902 is also used to determine a second message identifier corresponding to the first identifier based on a correspondence between a message identifier that can be recognized by the first computer system and a message identifier that can be recognized by the computer system 90. The second communication module 902 is specifically used to convert the first message into a second message, the second message includes a second message identifier, and the second message identifier includes a method identifier and / or a parameter identifier.
[0355] Optionally, the first computer system includes an AUTOSAR system, and the computer system 90 includes ROS. The second communication module 902 is also used to filter the first message. The second communication module 902 is specifically used to convert the filtered first message into the second message.
[0356] Optionally, the first computer system includes ROS, and the computer system 90 includes an AUTOSAR system. The second message does not include an instance identifier; the second communication module 902 is further used to add the instance identifier to the second message. The second communication module 902 is specifically used to send the second message with the instance identifier added to the second application module 901. The instance identifier is used by the AUTOSAR system to determine the second object.
[0357] In one example, see Figure 3 The second application module 901 and the second communication module 902 can both be composed of Figure 3 The processor 103 in the system calls the computer program stored in the system memory 135 to implement it.
[0358] In one example, see Figure 2 The second application module 901 and the second communication module 902 can both be composed of Figure 2 The processor 113 in the memory 114 calls the computer program stored in the memory 114 to implement it.
[0359] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any of the above computer systems 90 and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.
[0360] It should be noted that the actions performed by the above modules are only specific examples. The actions actually performed by each unit refer to the above-mentioned Figure 17-18 The actions or steps mentioned in the description of the embodiments are described.
[0361] An embodiment of the present application also provides an apparatus (such as a computer device or chip), including: a memory and a processor; the memory is used to store a computer program, and the processor is used to call the computer program to execute the actions or steps mentioned in any of the embodiments provided above.
[0362] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed on a computer, the computer is enabled to execute the actions or steps mentioned in any of the embodiments provided above.
[0363] The present application also provides a chip. The chip integrates a circuit and one or more interfaces for implementing the functions of the device for the above-mentioned positioning problem. Optionally, the functions supported by the chip may include: Figure 13-Figure 18The processing actions in the embodiments are not described in detail here. A person of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
[0364] The embodiment of the present application also provides a computer program product including instructions, when the instructions are run on a computer, the computer executes any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that may be integrated with one or more available media. The available media may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0365] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, computer-readable storage media and communication chips, etc., are all non-transitory.
[0366] In the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0367] Although the present application has been described in conjunction with specific features and embodiments thereof, various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the accompanying drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application.
Claims
1. A message communication method, characterized in that: include: The AUTOSAR system communicates with ROS, including: The event mode of the AUTOSAR system is interoperable with the topic mode of ROS; the method mode of the AUTOSAR system is interoperable with the service / request mode of ROS; and the parameter mode of the AUTOSAR system is interoperable with the parameter mode of ROS.
2. The method according to claim 1, characterized in that: The ROS includes a DDS communication module; the DDS communication module of the ROS is communicatively connected with the DDS communication module of the AUTOSAR system.
3. The method according to claim 1, characterized in that: The intercommunication between the AUTOSAR system and the ROS includes: an initialization phase, a service discovery phase and a message communication phase.
4. The method according to claim 3, characterized in that: When the ROS underlying data distribution service is initialized, it includes the following: domain participants, publishers, subscribers, data writers and / or data readers, which have the same subject and instance identifiers as the communication module in the AUTOSAR system and are QoS compatible, the same method identifier and instance identifier and are QoS compatible, and the same parameter identifier and instance identifier and are QoS compatible.
5. The method according to claim 3, characterized in that: The message communication stage includes: the AUTOSAR system sends a message to the ROS, or the ROS sends a message to the AUTOSAR system.
6. The method according to claim 5, characterized in that: The message communication phase includes filtering the messages transmitted in the AUTOSAR system and the ROS according to instance identifiers of the messages, the instance identifiers indicating the process of the application generating the messages.
7. The method according to claim 6, characterized in that The AUTOSAR system sends a message to ROS, including: The application module of the AUTOSAR system generates a first message; The AUTOSAR system converts the first message into a second message using a first serialization function; The AUTOSAR system sends the second message to the ROS; The ROS converts the second message into a third message using a first serialization function; the third message can be recognized by an application module of the AUTOSAR system; The ROS converts the third message into a fourth message, and the fourth message can be recognized by the application module of the ROS.
8. The method according to claim 7, characterized in that: The AUTOSAR system sends the second message to the ROS, including: The first object of the DDS in the AUTOSAR system sends a second message through a write interface; The ROS filters the third message according to the instance identifier in the third message.
9. The method according to claim 8, characterized in that: The ROS filters the third message according to the instance identifier in the third message, including: The ROS distributes the third message to a second object, where the second object is a data reader matching the first object in the DDS of the ROS, and an instance identifier of the second object is the same as an instance identifier of the third message.
10. The method according to claim 6, characterized in that: The ROS sends a message to the AUTOSAR system, including: The ROS application module generates a fifth message, and the fifth message can be recognized by the ROS application module; The ROS converts the fifth message into a sixth message, where the sixth message can be recognized by an application module of the AUTOSAR system; The ROS adds the instance identifier into the sixth message to obtain the seventh message; The ROS uses a first serialization function to convert the seventh message into an eighth message, where the eighth message can be recognized by a communication module of the AUTOSAR system; The ROS sends the eighth message to the AUTOSAR system.
11. The method according to claim 10, characterized in that: The AUTOSAR system converts the eighth message into a ninth message using a first serialization function, and the ninth message can be recognized by an application module of the AUTOSAR system.
12. The method according to claim 11, characterized in that: The AUTOSAR system filters the ninth message according to the instance identifier in the ninth message.
13. A computer-readable storage medium, comprising an instruction set, wherein when the instruction set is executed by a processor, the method according to any one of claims 1 to 12 can be implemented.
14. A computer program, for implementing the method according to any one of claims 1 to 12 when executed on a computer.
15. A vehicle comprising the computer readable storage medium of claim 13.
Citation Information
Patent Citations
Real-time message transmission method among multiple robots
CN105429858A
Vehicle-mounted calculation system based on loose coupling
CN108614555A
Method for realizing distributed communication in automatic driving based on DDS protocol
CN110086891A
Automated device test triaging system and techniques
CN110678850A
System and method for operator control of heterogeneous unmanned system teams
US10168674B1
