Simulation method of bench V2X basic data MQTT communication mode
The data of the V2X device is simulated through V2XSIMULATION simulation and sent to the V2X protocol stack through the MQTT communication method. It solves the problem that the existing V2X test needs to be on the road. Hidden dangers.
Patent Information
- Application Number
- CN202411331558.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-24
AI Technical Summary
The existing V2X test requires real vehicle simulation, which poses safety risks and greatly slows down the development progress.
Through the simulation program V2Xsimulation, the GNSS and CAN data of the main vehicle, remote vehicle and roadside unit are simulated and sent to the V2X protocol stack through MQTT communication to realize V2X scene simulation in the laboratory.
Under the conditions of laboratory conditions, the real -time car scenarios are simulated, reducing development time and software instability, and reducing the hidden safety hazards of testing on the road.
Smart Images

Figure CN119364407A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a simulation method, and in particular to a simulation method for a test bench V2X basic data MQTT communication mode. Background Art
[0002] V2X, or Vehicle to Everything / vehicle to X, is a vehicle-based wireless communication technology that aims to communicate with surrounding vehicles, devices, and base stations with the vehicle as the center to obtain a series of traffic information such as real-time road conditions, road information, and pedestrian information, in order to improve driving safety, reduce congestion, improve traffic efficiency, and provide in-vehicle entertainment information. It is a key technology for future intelligent transportation systems. MQTT (Message Queuing Telemetry Transport) is a lightweight, publish-subscribe-based message transmission protocol suitable for resource-constrained devices and low-bandwidth, high-latency or unstable network environments. It is widely popular in IoT applications and can achieve efficient communication between sensors, actuators, and other devices. In the general development process, V2X testing requires real-car on-road simulation, which has certain safety risks and greatly slows down the development progress. Summary of the invention
[0003] The purpose of the present invention is to overcome the defects of the prior art and provide a simulation method for the MQTT communication mode of the basic data of the test bench V2X. The real vehicle scene can be simulated in the laboratory, and the data transmission between the simulated V2X can be simulated using the MQTT communication mode, which effectively reduces the communication resources between programs, greatly reduces the development time and greatly reduces the safety hazards of software instability on the road.
[0004] The object of the present invention is achieved as follows: A simulation method for the MQTT communication mode of the V2X basic data of the test bench comprises the following steps: 1) Use V2Xsimulation to simulate the GNSS data and CAN data of the host vehicle HV, and send it to the V2X protocol stack through MQTT communication; 2) Use V2Xsimulation to simulate and generate GNSS data and CAN data of the remote vehicle RV. The GNSS data and CAN data are assembled into BSM data packets in the program according to the BSM message protocol requirements, and the BSM messages are sent to the V2X protocol stack through MQTT communication; 3) Use V2XSimulation to simulate the roadside unit RSU, send the SPAT data, MAP data, RSI data, and RSM data of the roadside unit RSU to the V2X protocol stack through MQTT communication, and use Phone to control V2XSimulation through MQTT communication to send data in different scenarios.
[0005] As a further limitation of the present invention, step 1) specifically includes: V2XSimulation plays the role of HV data simulation, forwarding the GNSS data and CAN data of the main vehicle HV to the V2X protocol stack in CJSON format through MQTT's Broke; V2XSimulation subscribes to PhoneTopic, and Phone publishes instructions through PhoneTopic to control the switching of various scenes.
[0006] As a further limitation of the present invention, step 2) specifically includes: V2XSimulation plays the role of remote vehicle RV data simulation, assembles the GNSS data and CAN data of the remote vehicle RV into a BSM message, the V2X protocol stack subscribes to RVTopic, V2XSimulation publishes data to RVTopic, the V2X protocol stack receives the BSM data forwarded by Broke, and performs V2X algorithm simulation.
[0007] As a further limitation of the present invention, the step 3) specifically includes: V2XSimulation plays the role of a roadside unit RSU, sends the SPAT data, MAP data, RSI data, and RSM data of the roadside unit to the V2X protocol stack, and uses Phone to control V2XSimulation to send different scenario data through MQTT communication; after receiving the instruction, V2XSimulation sends the SPAT, MAP, RSI, and RSM data as RSUTopic, and after the V2X protocol stack subscribes to RSUtopic, it will receive the SPAT, MAP, RSI, and RSM data and immediately perform scenario simulation.
[0008] As a further limitation of the present invention, the specific process of the MQTT communication method includes: transmitting messages to the V2X protocol stack through different topics in the MQTT communication framework to perform V2X scenario algorithm testing.
[0009] As a further limitation of the present invention, the different topics specifically include PhoneTopic, HVTopic, RVTopic, and RSUTopic.
[0010] As a further limitation of the present invention, the GNSS data includes longitude, latitude, altitude and heading angle.
[0011] As a further limitation of the present invention, the CAN data includes vehicle width, vehicle length, vehicle speed, steering wheel angle, wheel speed, turning signal, brake signal, and fault signal.
[0012] As a further limitation of the present invention, the SPAT data includes traffic light data information; the MAP data includes map information; the RSI data includes roadside unit information, specifically speed limit camera information and traffic warning sign information; the RSM data includes information on pedestrians and vulnerable traffic participants within the radar detection range.
[0013] The present invention adopts the above technical solution, and compared with the prior art, the beneficial effects are: the RSU data of the real vehicle and the basic CAN data and GNSS data of the vehicle body can be simulated in the laboratory, and these data are sent to the V2X protocol stack (V2XAPPStack) through the MQTT communication method. After receiving the data, the V2X protocol stack performs scene algorithm processing to determine whether there is any danger; this method can simulate all V2X scenarios, greatly shorten the development time and greatly reduce the safety hazards of software instability on the road.
[0014] Data is transmitted to the V2X protocol stack in different topics through the MQTT communication framework to perform V2X scenario algorithm testing, which can ensure that the resources occupied by message transmission are reduced and make message transmission more stable. The types of data can be effectively and clearly distinguished according to different topics. MQTT is more convenient in transmitting data format, and the CJSON format can be used, which can effectively change data and plan data. This invention can ensure safety when software development and supporting environment are incomplete. It does not require real vehicles to be on the road, and only requires laboratory environment for simulation, which greatly speeds up the development progress. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 The main vehicle HV data transmission simulation block diagram of the present invention.
[0016] Figure 2 The remote vehicle RV data transmission simulation block diagram of the present invention.
[0017] Figure 3 Roadside unit RSU data transmission simulation block diagram of the present invention. DETAILED DESCRIPTION
[0018] A simulation method for a test bench V2X basic data MQTT communication mode comprises the following steps: 1) Use V2Xsimulation to simulate the GNSS data and CAN data of the main vehicle HV, and send it to the V2X protocol stack through MQTT communication; Figure 1As shown in the figure, V2XSimulation plays the role of HV data simulation, forwarding the GNSS data and CAN data of the main vehicle HV to the V2X protocol stack in CJSON format through MQTT's Broke; V2XSimulation subscribes to PhoneTopic, and Phone publishes instructions through PhoneTopic to control the switching of various scenes.
[0019] 2) Use V2Xsimulation to simulate and generate GNSS data and CAN data of the remote vehicle RV. The GNSS data and CAN data are assembled into BSM data packets in the program according to the BSM message protocol requirements, and the BSM message is sent to the V2X protocol stack through the MQTT communication method; Figure 2 As shown in the figure, V2XSimulation plays the role of simulating the remote vehicle RV data, assembling the GNSS data and CAN data of the remote vehicle RV into BSM messages, the V2X protocol stack subscribes to RVTopic, V2XSimulation publishes data to RVTopic, and the V2X protocol stack receives the BSM data forwarded by Broke to perform V2X algorithm simulation.
[0020] 3) Use V2XSimulation to simulate the roadside unit RSU, send the SPAT data, MAP data, RSI data, and RSM data of the roadside unit RSU to the V2X protocol stack through MQTT communication, and use Phone to control V2XSimulation through MQTT communication to send data in different scenarios; Figure 3 As shown in the figure, V2XSimulation plays the role of the roadside unit RSU, sends the SPAT data, MAP data, RSI data, and RSM data of the roadside unit to the V2X protocol stack, and uses the Phone to control V2XSimulation through MQTT communication to send data for different scenarios; after receiving the command, V2XSimulation sends the SPAT, MAP, RSI, and RSM data as RSUTopic. After the V2X protocol stack subscribes to RSUtopic, it will receive the SPAT, MAP, RSI, and RSM data and perform scenario simulation immediately.
[0021] The specific process of MQTT communication method includes: transmitting messages to V2X protocol stack through different topics in MQTT communication framework to test V2X scenario algorithm; different topics include PhoneTopic, HVTopic, RVTopic, RSUTopic; using MQTT topic subscription and publishing form, data can be effectively classified and published, and MQTT can be used to transmit CJSON data format, especially when simulating GNSS data, CAN data and RSU data, it can effectively and quickly obtain key information and eliminate useless message conversion time.
[0022] GNSS data includes longitude, latitude, altitude and heading angle; CAN data includes vehicle width, length, speed, steering wheel angle, wheel speed, turn signal, brake signal and fault signal.
[0023] SPAT data includes traffic light data information; MAP data includes map information; RSI data includes roadside unit information, specifically speed camera information and traffic warning sign information; RSM data includes information on pedestrians and vulnerable traffic participants within the radar detection range When the present invention is working, the main vehicle HV: sends the collected main vehicle GNSS and CAN data to V2XAPPStack through the simulation program through the HVTopic topic publishing method of MQTT to simulate the driving process of the main vehicle; performs other scene simulations by changing the collected original data, such as giving brake signals, turn signals, and vehicle speed signals; because MQTT uses the CJSON data format, the original data can be quickly changed and packaged and published to V2XAPPStack.
[0024] Remote vehicle RV: Assemble GNSS data and CAN data into BSM data packets in the program according to the BSM message protocol requirements, and send the BSM message to V2XAPPStack through the RVTopic topic publishing method of MQTT. After receiving the BSM message, the protocol stack parses it to obtain the basic information of other vehicles and simulate whether there is any danger.
[0025] Roadside Unit RSU: SPAT data, MAP data, RSI data, and RSM data are sent to the V2X protocol stack in CJSON format through the RSUTopic topic of MQTT at a fixed time frequency through a simulation program. After receiving the data, the protocol stack performs scenario algorithm processing.
[0026] The present invention provides a simulation method of the MQTT communication mode of the basic data of the bench V2X. Through the simulation program and the MQTT communication mode, three kinds of data are sent to simulate the generation of GNSS and CAN data of the HV (host vehicle); the GNSS and CAN data of the RV (remote vehicle) are simulated; the data is broadcasted by the V2XSimulation according to the BSM protocol group BSM message and then received by the host vehicle V2X protocol stack; the SPAT, MAP, RSI and RSM data of the RSU (roadside unit) are simulated; and the MQTT communication mode is used to plan PhoneTopic, HVTopic, RVTopic and RSUTopic; the data is transmitted to the V2X protocol stack in different topics through the MQTT communication framework to carry out the V2X scenario algorithm test, which can ensure that the occupied resources of the message transmission are reduced and the message transmission can be made more stable; the data types are effectively and clearly distinguished according to different topics; MQTT is more convenient in the transmission data format, and the CJSON format can be used to effectively change the data and plan the data; the scenario simulation can be carried out in the laboratory, which greatly reduces the development time and greatly reduces the safety hazards of software instability on the road.
[0027] The present invention is not limited to the above-mentioned embodiments. On the basis of the technical solution disclosed in the present invention, technicians in this field can make some substitutions and deformations to some technical features therein according to the disclosed technical content without creative labor, and these substitutions and deformations are all within the protection scope of the present invention.
Claims
1. A simulation method for the MQTT communication mode of V2X basic data on a test bench, characterized in that: The following steps are involved: 1) Use V2Xsimulation to simulate the GNSS data and CAN data of the host vehicle HV, and send it to the V2X protocol stack through MQTT communication; 2) Use V2Xsimulation to simulate and generate GNSS data and CAN data of the remote vehicle RV. The GNSS data and CAN data are assembled into BSM data packets in the program according to the BSM message protocol requirements, and the BSM messages are sent to the V2X protocol stack through MQTT communication; 3) Use V2XSimulation to simulate the roadside unit RSU, send the SPAT data, MAP data, RSI data, and RSM data of the roadside unit RSU to the V2X protocol stack through MQTT communication, and use Phone to control V2XSimulation through MQTT communication to send data in different scenarios.
2. The simulation method of the MQTT communication mode of the V2X basic data of the test bench according to claim 1 is characterized in that: The step 1) specifically includes: V2XSimulation plays the role of HV data simulation, forwarding the GNSS data and CAN data of the main vehicle HV to the V2X protocol stack in CJSON format through MQTT's Broke; V2XSimulation subscribes to PhoneTopic, and Phone publishes instructions through PhoneTopic to control the switching of various scenes.
3. The simulation method of the MQTT communication mode of the V2X basic data of the test bench according to claim 1 is characterized in that: The step 2) specifically includes: V2XSimulation plays the role of simulating the remote vehicle RV data, assembling the GNSS data and CAN data of the remote vehicle RV into a BSM message, the V2X protocol stack subscribes to RVTopic, V2XSimulation publishes data to RVTopic, the V2X protocol stack receives the BSM data forwarded by Broke, and performs V2X algorithm simulation.
4. The simulation method of the MQTT communication mode of the V2X basic data of the test bench according to claim 1 is characterized in that: The step 3) specifically includes: V2XSimulation plays the role of the roadside unit RSU, sends the SPAT data, MAP data, RSI data, and RSM data of the roadside unit to the V2X protocol stack, and uses the Phone to control V2XSimulation to send different scenario data through the MQTT communication method; after receiving the command, V2XSimulation sends the SPAT, MAP, RSI, and RSM data as RSUTopic, and after the V2X protocol stack subscribes to the RSUtopic, it will receive the SPAT, MAP, RSI, and RSM data and immediately perform scenario simulation.
5. The simulation method of the MQTT communication mode of the V2X basic data of the test bench according to claim 1 is characterized in that: The specific process of the MQTT communication method includes: transmitting messages to the V2X protocol stack through different topics in the MQTT communication framework to perform V2X scenario algorithm testing.
6. The simulation method of the MQTT communication mode of the V2X basic data of the test bench according to claim 5 is characterized in that: The different topics specifically include PhoneTopic, HVTopic, RVTopic and RSUTopic.
7. A simulation method for a test bench V2X basic data MQTT communication mode according to any one of claims 1 to 3, characterized in that: The GNSS data includes longitude, latitude, altitude and heading angle.
8. A simulation method for a test bench V2X basic data MQTT communication mode according to any one of claims 1 to 3, characterized in that: The CAN data includes vehicle width, vehicle length, vehicle speed, steering wheel angle, wheel speed, turning signal, brake signal, and fault signal.
9. The simulation method of the MQTT communication mode of the V2X basic data of the test bench according to claim 1 or 4, characterized in that: The SPAT data includes traffic light data information; the MAP data includes map information; the RSI data includes roadside unit information, specifically speed limit camera information and traffic warning sign information; the RSM data includes information on pedestrians and vulnerable traffic participants within the radar detection range.