The method of distributed communication is realized in automatic Pilot based on DDS agreement
Technical field
The invention belongs to automatic Pilot technical fields, are related to data communication/data processing, and specifically DDS agreement is in reality
Application in existing automatic Pilot distributed communication.
Background technique
With scientific and technological progress and Artificial Intelligence Development, automatic Pilot Industry Quick Development.Currently, automatic Pilot technology master
To surround environment sensing, accurate positioning, decision and planning and the formation functions software platform such as control and execution.Because of automatic Pilot
Road environment is complicated and changeable with scene, and perception part needs to have sensing capability and redundancy backup under different scenes, depends on
The information collection and data fusion of the multisensors such as laser radar, vision, millimetre-wave radar, ultrasonic radar, software platform need
Has the features such as big bandwidth, real-time, stability and distribution.
Currently, Some Domestic scheme is based on robot operating system ROS (Robot Operating System) building certainly
Dynamic driving software platform, uses ROS as message-oriented middleware, provides based on news release-subscription distributed communication frame, easily
In integrated multi-sensor, it is widely used in Industry Control.
ROS realizes news release-subscription between different nodes (node), such as Fig. 1 institute centered on ROS Master
Show, sensor node is ordered as publisher (Publisher), the first data type of notice (Advertise) oneself offer
Reader (Subscriber) subscribes to (Subscribe) certain message to ROS Master, if ROS Master discovery publication is ordered
It reads type of message and message name is consistent, then update the information of (Pub Update) publisher (Publisher) to subscriber
(Subscriber), request of data (Data of the subscriber (Subscriber) to publisher (Publisher) is established
Request), realize that publisher (Publisher) sends (Data Messages) to the message of subscriber.As it can be seen that the model is deposited
The problem of depending on ROS Master single node unduly, and lack abnormal restoring mechanism, once ROS Master congestion or
Person is abnormal, will affect whole system interacting message;And ROS does not provide QoS service quality policy, it cannot be guaranteed that the height of data
Effect is neatly distributed;In addition ROS is open source software, although function ecology is abundant, is difficult the building in automatic Pilot field and meets
The software platform of vehicle rule grade.
Data distributing DDS (Data Distribution Service for Real-Time-Systems), as
Distributing real communication middleware, the data distribution service towards real-time system, Publish-subscribe architectural framework are emphasized with number
Centered on, as shown in Fig. 2, realizing that complete P2P node is found using RTPS service discovery protocol, completes node and find automatically
Construct the network topology of non-stop layer;And QoS service quality policy abundant is provided, can ensure data carry out real-time,
Efficiently, neatly distribute;It is provided simultaneously with cross-platform characteristic, is widely used in national defence, civil aviaton and industrial control field.And vapour
Vehicle development system framework AUTOSAR (AUTOmotive Open System Architecture) also starts integrated DDS service,
Make it possible with DDS service construction automatic Pilot platform.
Summary of the invention
Goal of the invention: in order to overcome deficiency existing for ROS system in the prior art, and sensor data transmission quality is improved
With reduction data processing overheads, the present invention is provided realizes distributed communication method based on DSS agreement in automatic Pilot.
Technical solution: in order to solve the above technical problems, provided by the invention realized in automatic Pilot based on DDS agreement is divided
The method of cloth communication comprising the steps of:
Step 1) constructs DDS environment, multisensor is facilitated to access using Ubuntu system as platform;
Step 2, according to sensing data feature, definition meets the data structure of DDS specification, generates corresponding publisher and subscription
Person's program, by RTPS protocol discovery data publisher and subscriber, data publisher and subscriber are according to same data type
It is interrelated;
Step 3), for the sensor of distribution access, by network transmission, according to different sensors data priority, setting
The TOS field of corresponding data message, guarantees sensor data network transmission quality;
Step 4), in data processing unit, sensing data is supplied to data fusion, positioning by the way of shared drive
Etc. modules, avoid data copy;
Step 5), UI when realization node administration is run, sensor node parameters inquiry is inquired with configuration, node operating status,
Node data transmitting-receiving statistics.
Specifically, the sensor includes camera, laser radar, ultrasonic radar, GPS and inertance element etc..
Specifically, further include qos policy configuration in the step 2, most reliably configured with most high efficiency selected, queue depth
Deng, guarantee data send when flexibility.
Specifically, according to different sensors data priority, uninterrupted in the step 3), in conjunction with Linux TC flow
Control framework is arranged sensing data message TOS field, is mapped to different TC queues, guarantees the network transmission quality of data.
Specifically, in data processing unit, multiple modules need to adopt using same sensing data the step 4)
With the mode of shared drive, data copy is avoided, improves data-handling efficiency, guarantees real-time.
Specifically, the step 5) provides visual interface, realizes to sensor node distribution subscription application program
Monitoring and statistics reflect that present node is subscribed situation, data transmit-receive statistics etc. in real time, and whether monitoring node is abnormal.
The utility model has the advantages that the present invention using DSS data service connecting sensor, decision and path planning, vehicle control, V2X,
High-precision map etc. constructs the network topology of non-stop layer, quickly accessing and counting convenient for multisensor using data as tie
According to communication, and DDS service provides QoS service quality policy abundant, can ensure that data carry out real-time, efficiently, flexibly
Ground distribution, in conjunction with Linux TC flow control frame, further increases data transmission efficiency, in data processing, uses
The mode of shared drive, avoids data copy.
Except it is above-described present invention solves the technical problem that, constitute technical solution technical characteristic and by these technologies
Outside advantage brought by the technical characteristic of scheme.To keep the object of the invention, technical scheme and beneficial effects clearer, below will
In conjunction with the attached drawing in the embodiment of the present invention, to other for including in the other technologies problem of the invention that can solve, technical solution
The advantages of technical characteristic and these technical characteristics are brought does apparent, complete description.
Detailed description of the invention
Fig. 1 is the process flow diagram of existing ROS system;
Fig. 2 is that P2P node finds schematic diagram in DDS agreement;
Fig. 3 is the distributed communication system architecture diagram that DDS is serviced in the embodiment of the present invention;
Fig. 4 is DDS service qos policy schematic diagram;
Fig. 5 is data communication hierarchical diagram in the embodiment of the present invention;
UI functional schematic when Fig. 6 is node administration of the present invention operation.
Specific embodiment
Embodiment:
Automatic Pilot core includes environment sensing, accurate positioning, decision and planning and control and executes, and environment sensing needs
It to be realized by multisensor, in automatic software platform, sensing data communication is basis.
During automatic Pilot, needs to accomplish to be accurately positioned, be accurate to specific lane.As shown in figure 3, according to accurately
Figure (HD Map) and vehicle body other sensors information (such as GNSS/RTK, Lidar) are positioned (Location);In conjunction with traffic
Lamp, traffic marking carry out the decision and path planning of next step, and there are two approach for traffic lights information, first is that high-precision map itself
Traffic lights location information is provided, by visual identity traffic lights situation, second is that, it is subsequent with V2X (Vehicle to
Everything development), V2X can provide traffic information, including traffic lights information, road congestion information etc., and DDS supports to divide
Cloth network communication can merge V2X.
In entire DDS network, according to multi-sensor environment perception information, realize vehicle body positioning, detection of obstacles and
Traffic lights information, can do decision and path planning (Planning), and it is vertical to be converted into lateral direction of car for passage path coordinate information
To control information, to realize the control (Vehicle Control) of vehicle.
In addition, as shown in figure 4, DDS QoS is provided most reliably and most efficiently two kinds of (Reliability-Best Effort)
Data transmission policies, wherein publisher confirms whether data normally receive by subscriber's response (Ack) in most reliable strategy,
If loss is retransmitted;And it is most efficiently tactful, cover untreated legacy data in subscriber's receiving queue, it is ensured that latest data
Transmission in time.DDS is serviced while being provided unicast and multicast two kinds of data modes, in multiple application subscription identical datas,
The data publication of multicast form is provided, bandwidth burden is mitigated.In data issuing process, bound data publisher's period, which is issued, is deposited
In property packet (LiveLiness), whether failed with detection data publisher, it is automatic to restore.
Vehicle body sensor generallys use distributed access, and operative sensor has pretreatment unit, as shown in figure 5, with number
When communicating according to processing unit, TCP or UDP is generallyd use, DDS QoS provides data transmission policies, still, for different data
When dispatching by the network equipment, real-time and the difference of certain priority are not ensured that.This programme is by Linux TC
Different sensors data message service type TOS (Type Of is arranged in (Traffic Control) flow control frame
Service) field, different TC queues is mapped to according to different priorities, and the data high for priority enter high priority
TC queue, obtains priority scheduling;Sensing data biggish for data volume enters the deeper queue of queue, is more dispatched
Chance, to improve sensor data transmission quality.
For data processing unit, need to subscribe to processing multiple sensors data, and same sensing data is usual
It is subscribed to by multiple modules, this programme reduces the copy of same sensing data by the way of shared drive, can be to avoid data
Processing delay.
DDS service includes RTPS agreement, and RTPS agreement is divided into simple field participant and finds agreement SPDP (Simple
Participant Discovery Protocol) and simple endpoint discovery agreement SEDP (Simple Endpoint
Discovery Protocal).SPDP for finding other domains participant (Participant), SEDP for domain participant it
Between exchange publisher and subscriber information, if data type is consistent with data name, to realize between publisher subscriber
One-to-one, one-to-many automatic discovery, be not present central node.
DDS QoS is provided most reliably with most efficient (Reliability-Best Effort) two kinds of data transmission policies, is led to
Most high efficiency of transmission strategy is usually used, for providing the data publication of multicast form in multiple application subscription identical datas,
Mitigate bandwidth burden and different message TOS fields are arranged according to different data priority, uninterrupted, is mapped to different TC teams
Column, when for multiple application subscription identical datas, by the way of shared drive, avoid data copy.
DDS service provides Interface Definition Language IDL (the Interface Definition for meeting DDS specification
Language), user is generated corresponding according to sensing data type, customized sensing data structured file by DDS tool
Publish-subscribe station code can fast implement the data access of sensor.
DDS service is realized based on C/C++, does not depend on other complicated third party libraries, support Window, Linux and other
Real time operating system is easy to build, and by taking automatic Pilot sensors GPS as an example, illustrates sensor access procedure.
1) using Ubuntu system as platform, DDS environment is built, multisensor is facilitated to access;
2) according to sensing data feature, customized GPS data type is struct NavSatFix, generate corresponding publisher and
Subscriber's program passes through RTPS protocol discovery associated data publisher and subscriber;
struct Time{
long sec;
unsigned long nanosec;
};
struct Header{
Time stamp;
string frame_id;
};
struct NavSatStatus{
octet status;
unsigned short service;
};
struct NavSatFix{
Header header;
NavSatStatus status;
double latitude;
double longitude;
double altitude;
double position_covariance[9];
octet position_covariance_type;
};
3) GPS data is usually 10HZ ~ 50HZ, and frequency is not high, data volume is little, and configuring corresponding TOS priority is 3, is mapped to
TC queue;
4) since multiple modules use GPS data, release process is issued by the way of multicast;
5) for data processing unit, multiple subscription programs subscribe to processing GPS data by way of shared drive;
6) as shown in fig. 6, by node administration UI, it can be achieved that the qos parameter of GPS node adjusts, the subscriber of GPS data looks into
It askes, GPS data frequency queries, whether detection node operation is normal.
The present invention provides the thinking and method of DDS agreement for the distributed communication of automatic Pilot, implements the technology
There are many method and approach of scheme, and described embodiments are some of the embodiments of the present invention, instead of all the embodiments.It is logical
The component for the embodiment of the present invention being often described and illustrated herein in the accompanying drawings can be arranged and be designed with a variety of different configurations.
Therefore, the model of claimed invention is not intended to limit to the detailed description of the embodiment of the present invention provided in attached drawing
It encloses, but is merely representative of selected embodiment of the invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not having
Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.