CN113767376A - Message buffer for transmitting information between vehicle components - Google Patents

Message buffer for transmitting information between vehicle components Download PDF

Info

Publication number
CN113767376A
CN113767376A CN201880100665.6A CN201880100665A CN113767376A CN 113767376 A CN113767376 A CN 113767376A CN 201880100665 A CN201880100665 A CN 201880100665A CN 113767376 A CN113767376 A CN 113767376A
Authority
CN
China
Prior art keywords
message
messages
topic
registry
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201880100665.6A
Other languages
Chinese (zh)
Inventor
阿洛科·普立亚达尔西
沈浴竹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Voyager Technology Co Ltd
Original Assignee
Beijing Voyager Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Voyager Technology Co Ltd filed Critical Beijing Voyager Technology Co Ltd
Publication of CN113767376A publication Critical patent/CN113767376A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0284Multiple user address space allocation, e.g. using different base addresses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • G06F2212/1024Latency reduction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1032Reliability improvement, data loss prevention, degraded operation etc
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/17Embedded application
    • G06F2212/173Vehicle or other transportation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Small-Scale Networks (AREA)
  • Multi Processors (AREA)

Abstract

A method of communicating between a plurality of modules on a vehicle, each module configured as a publisher node or a subscriber node that communicates in operating an autonomous vehicle using a shared memory communication system. The method may include generating, by a publisher node, a plurality of sets of messages, each set associated with a unique subject and generated by a single publisher node associated with the unique subject, writing a set of messages in a message cache associated with the unique subject, writing location information of where the messages are written in a registry, reading new message information from the registry, the new message information indicating whether a new message associated with a particular subject is available, if a new message is available, reading location information indicating a location where the new message is stored, and reading the new message from the corresponding message cache.

Description

Message buffer for transmitting information between vehicle components
Technical Field
The present disclosure relates generally to a messaging architecture, and more particularly to a centralized communication architecture for a computer system in a vehicle.
Background
The vehicle software system may be represented as a computational graph of nodes that communicate with each other by passing messages. A node is a process that performs computations for a subset of vehicle computing systems. There are dedicated nodes to perform localization, sensing, planning and control operations. For example, a sensor node associated with a light detection and ranging system (LiDAR system) may collect and provide light detection and ranging images as sensor messages. The sensing node may receive the light detection and ranging image messages and use the information to determine an aspect of the environment surrounding the vehicle (e.g., the distance of an object in front of the vehicle) based on the light detection and ranging image and provide a sensing message related to the determined aspect. The controller node may receive the awareness messages and use the information in the awareness messages to control the vehicle (e.g., brake or continue moving the vehicle forward on its planned route).
Messages from individual nodes may be routed via a cross-process communication ("IPC") system with publish/subscribe semantics. A node sends out a message by publishing the message to a given topic. A topic is a name that identifies the content of a message published by a node. Nodes interested in certain data will subscribe to the corresponding topic. For one topic, there can be multiple publishers and subscribers in parallel, and multiple topics can be published and/or subscribed in one node. Generally, the publisher node and the subscriber node are unaware of each other's existence. The idea is to decouple the production of information from its consumption. Logically, one topic may be considered a strong type of message bus. Each bus is a name, as long as they are of the correct type, to which anyone can connect to send or receive messages.
The modular architecture provides stability even if the process crashes. For example, individual processes may intermittently crash and restart without shutting down the entire system. However, this modularity is costly. The cross-process system required for node communication introduces delay. Keeping the messages low latency is critical to safe operation of autonomous vehicles, vehicles providing driver assistance features, and/or vehicles for location-based services. In a busy environment, vehicles (e.g., autonomous vehicles, vehicles providing driver assistance features, and/or vehicles for location-based services) receive a large number of inputs, often requiring prompt control actions to achieve safety of the vehicle and safety of people and property in the vicinity of the vehicle. For example, a vehicle may receive a signal indicating that a pedestrian or approaching vehicle is on its lane and must be able to read and react quickly.
Furthermore, there is unnecessary overhead for a system where multiple subscribers subscribe to a topic. For each subscriber, a communication path must be established between the publisher and each subscriber. Each path requires kernel interaction. When large numbers of messages (e.g., thousands to millions and more) are transmitted, the overhead processing in such systems can impact computing resources. The transmission control protocol/interconnection protocol (TCP/IP) used by the Robot Operating System (ROS) is too costly due to routing, Acknowledgement Characters (ACKs), flow control, etc. Indeed, any pipeline-based cross-process mechanism is very unsuitable for real-time systems for one or more of the following reasons: (1) pipes favor older data over newer data and may block or drop your message, which is contrary to what is desirable to run real-time systems; (2) messages are routed through the kernel, possibly introducing multiple scenario switches; (3) for each pair of publisher subscribers, the message is replicated at least twice (publisher to kernel and kernel to subscriber), with inefficiency for each published and subscribed message; (4) because the kernel memory is limited, a large message needs to be split into blocks and transmitted repeatedly; and (5) since real-time systems typically run on fixed timers, the overhead of signaling mechanisms is unnecessary.
Disclosure of Invention
The system, method, and apparatus of the present invention each have several aspects (features), no single one of which is solely responsible for its desirable attributes. Without limiting the scope of the invention as expressed by the claims that follow.
One innovation includes a system implemented on a vehicle, such as in an autonomous vehicle. In some embodiments, the system includes a shared memory messaging system for communication between modules in a computer system on a vehicle, the system includes a plurality of modules, each module configured to perform a function related to controlling the vehicle, each of the modules including an associated node, the associated node is configured as a publisher node for writing messages for topics related to its representative module, or a subscriber node configured to read messages of another topic written by another node, or both a publisher node for writing messages of a topic related to the module with which it is associated and a subscriber node for reading messages of another topic written by another node, each node of the plurality of modules defines a plurality of nodes for communicating messages between the plurality of modules. The system also includes a subject registry implemented on the data storage component, the subject registry configured to store information indicative of storage locations for a plurality of sets of messages, each set of messages being associated with a unique subject and each set of messages being stored in a different message cache and published by one of the plurality of nodes, the plurality of message caches each being in communication with the subject registry, each message cache comprising a ring cache storage component configured to store messages published by one of the plurality of nodes, and a communication bus coupled to the subject registry, the plurality of message caches and the plurality of nodes. The communication bus is configured to enable the node to directly write a message to at least one of the message buffers and to write location information indicating where the written message is located to the subject registry, and to enable the node to read the subject-specific message directly from at least one of the message buffers using information from the subject registry indicating where the subject-specific message is located.
Embodiments of the systems described herein may have one or more other aspects (features) of the various system embodiments, some of which are presented herein. However, as one skilled in the art will recognize, various embodiments of such systems may have additional or fewer aspects, and the aspects disclosed herein may be used together in various embodiments, even if not specifically illustrated or described as being in a certain embodiment. For example, in one aspect, each node includes at least one processor coupled to a memory component. In another aspect, the communications bus is configured to enable a subscriber node of the plurality of nodes to read messages directly from the message cache without going through a core of the computer system. In another aspect, the communication bus is configured to enable a publisher node of the plurality of nodes to write messages directly to the message cache without going through a core of the computer system.
In another aspect of such a system, the subject registry is configured to store information of where each message stored in any of the plurality of message buffers is located. In another aspect, the information stored in the subject registry for each message includes data representing an address of a message buffer storing each message. In another aspect, the information stored in the topic registry for each message includes data representing the topic for each message. In another aspect, the information stored by the topic registry for each message includes data representing the frequency of publication of the corresponding message. In another aspect, the information stored by the subject registry of messages includes a starting location of the message in a message buffer where the corresponding message is stored. In another aspect, the information stored by the subject registry of messages includes a tentative location in the message buffer that stores the message at the time the message is written to where the message ends.
In another aspect, in such systems, each of the plurality of message buffers stores messages associated with a topic. In another aspect, a message buffer of the plurality of message buffers stores all messages associated with a topic. In another aspect, each subscriber node writes messages related to a topic. In another aspect, one or more subscriber nodes read messages related to more than one topic. In another aspect, each message cache is configured to store a plurality of messages from a publisher node, each stored message including information related to the message and message content. In another aspect, the plurality of message buffers are configured to store messages of a predetermined size from a publisher node. In another aspect, the plurality of message caches are configured to store dynamically sized messages from a publisher node.
In another innovation, a shared memory messaging system for communication between modules in a computer system on a vehicle is configured to perform functions related to controlling the vehicle. The system may include a plurality of modules, each module represented as a node, collectively represented as a plurality of nodes, each node configured as a publisher node for writing messages of a topic associated with its representative module or a subscriber node for reading messages of another topic written by another node, or both. The system may also include a subject registry implemented on the data storage component configured to store information indicative of the storage location. The system may also include a plurality of message caches each in communication with the subject registry, each message cache implemented on a storage component configured to store messages published by one of the plurality of nodes. The system may also include a communication bus coupled to the topic registry, the plurality of message caches, and the plurality of nodes, wherein the communication bus is configured to enable publisher node messages to be stored in the message cache and associated storage location information to be stored in the topic registry without passing through a kernel of the computer system, and to enable subscriber nodes to read messages directly from the message cache using information from the topic registry without passing through the kernel.
Another innovation includes a method of communicating messages between modules in a system on a vehicle, each module of the plurality of modules configured as a publisher node that writes messages, a subscriber node that reads messages, or both a publisher node and a subscriber node that collectively form a plurality of nodes that communicate when operating the vehicle. One example of such a method includes: generating, by a publisher node of the plurality of nodes, a plurality of sets of messages, each set of messages being associated with a unique topic and being generated by a single publisher node associated with a unique topic, writing, by the publisher node, each set of messages of the plurality of sets of messages to a memory location of a respective message buffer associated with a same topic as the set of messages, the respective message buffer being one of a plurality of message buffers, each of the plurality of message buffers being associated with one message topic, writing, by each publisher node and for each message written to the message buffer, location information indicating where the message has been written to a registry, wherein the registry is configured to store location information associating each message written to the message buffer with an address of the message buffer, a memory location at which each message written to the message buffer is stored, and a topic, reading, by the subscriber nodes, new message information from the registry, the new message information indicating whether new messages associated with a particular topic are available, each of the subscriber nodes being configured to read one or more of the plurality of sets of messages, and determining, by each of the subscriber nodes, using the new message information read from the registry, whether at least one new message is available that is also associated with the topic associated with the respective subscriber node. The method also includes, in response to determining that at least one new message is available, reading, by each of the respective subscriber nodes, location information from the registry indicating a location at which the at least one new message is stored, and reading, by each of the respective subscriber nodes, the at least one new message from the respective message cache.
Method embodiments described herein may have one or more other aspects (features) in various system embodiments, some of which are presented herein. However, as one of ordinary skill in the art will recognize, various embodiments of such methods may have additional or fewer aspects, and the aspects disclosed herein may be used together in various embodiments, even if not specifically illustrated or described as being in a certain embodiment. For example, in one aspect, writing in the registry comprises: information indicating a position in the message buffer where the message starts and a position in the message buffer where the message ends is written in the registry. In another aspect, writing in the registry comprises: information is written indicating where the message ended before writing the message to the message buffer was completed. In another aspect, the method may further comprise: the message size is determined by a publisher node that generates the message, wherein the information indicating where the message ends in the message buffer is a tentative location determined by the size of the message. In another aspect, writing each of the plurality of sets of messages includes writing a size of the message corresponding to each of the messages. In another aspect, the size of the message comprises a sum of a message payload and a message pad.
In another aspect of the method, the method further includes determining whether the message size is larger than a message size allocated in the corresponding message buffer for storing messages, and in response to determining that the message size is larger, reallocating the larger message storage size in the corresponding message buffer. In another aspect, the message further includes, for each message topic, generating, in the registry, a count of the number of messages for the topic stored in the respective message buffer. In another aspect, the new message information includes a count of the number of messages for the topic stored in the respective message buffer. In another aspect, the method further comprises: at each subscriber node, read message information is generated, the read message information including a message count for topics read by said each subscriber node. In another aspect, determining whether at least one new message associated with the topic is available comprises: at each subscriber node, comparing the count of new messages for the topic in the new message information in the registry to the message count for topics that have been read by the subscriber node, the method further comprising determining that there are new messages associated with the first topic available for reading when the new message count is greater than the read messages counter of the subscriber node. In another aspect, each of the plurality of modules is implemented on at least one processor. In another aspect, at least two subscriber nodes are associated with the same topic. In another aspect, at least one subscriber node is associated with two or more topics.
In another aspect, reading from the registry comprises: the registry is read without utilizing the kernel of the computer system. In another aspect, reading from the message buffer comprises: the message is read from the message buffer without utilizing the kernel of the computer system. In another aspect, writing to the registry comprises: the registry is written without utilizing the kernel of the computer system. In another aspect, a write message buffer comprises: the message buffer is written without utilizing the kernel of the computer system. In another aspect, the registry and the plurality of message caches are configured as shared memory locations directly accessible by the publisher node. In another aspect, the registry and the plurality of message caches are configured as shared memory locations directly accessible by the subscriber node.
Another innovation includes a method of communicating messages between a plurality of modules in a system on a vehicle, each module of the plurality of modules implemented on at least one processor and configured to write a publisher node of a message, read a subscriber node of a message, or both, the publisher node and the subscriber node collectively forming a plurality of nodes that communicate when operating the vehicle. In some embodiments, the method comprises: generating, by a first publisher node, a first message associated with a first topic, writing, by the first publisher node, the first message into a memory location in a first message cache of a plurality of message caches, the first message cache being associated with the first topic and configured to store a plurality of messages associated with the first topic, other caches of the plurality of caches each being associated with a unique message topic and configured to each store a plurality of messages associated with the message topic with which it is associated, wherein the memory location storing the first message is a shared memory location accessible to subscriber nodes configured to read messages related to the first topic, and writing, by the first publisher node, information associated with writing the first message in a registry configured to store location information indicative of a communication address of the first message cache and information indicative of the first message stored on the first message cache Location information of the memory location.
Method embodiments described herein may have one or more other aspects (features) in various system embodiments, some of which are presented herein. However, as one of ordinary skill in the art will recognize, various embodiments of such methods may have additional or fewer aspects, and the aspects disclosed herein may be used together in various embodiments, even if not specifically illustrated or described as being in a certain embodiment. For example, in one aspect, writing the first message in the first message buffer comprises: the first message is written in a first message buffer via a communication bus configured to communicate messages between the plurality of nodes and the plurality of message buffers. In another aspect, writing the information associated with the first message in the registry comprises writing the information associated with the first message in the registry via a communication bus, wherein the communication bus is further configured to communicate location information between the registry and each of the plurality of nodes. In another aspect, writing the first message in the first message buffer comprises: the first message is written directly in the first message buffer via the communication bus. In another aspect, directly writing the first message in the first message buffer comprises: the first message is written in the first message buffer without communication interaction through the system kernel. In another aspect, writing information associated with the first message in the registry comprises: information is written directly in the registry by the first publisher node via the communication bus. In another aspect, directly writing information associated with the first message in the registry comprises: information is written in the registry without communication interaction through the system kernel. In another aspect, the first publisher node is further configured to communicate information associated with writing the first message in the first message cache directly to the registry over the communication bus. In another aspect, the plurality of nodes includes a plurality of publisher nodes and a plurality of subscriber nodes.
In another aspect of such a method, each of the plurality of publisher nodes writes a plurality of messages, each message associated with a particular topic, and wherein messages of the plurality of messages that are associated with the same topic are written by the same one of the publisher nodes. In another aspect, the method may further include generating, by the first publisher node, a second message associated with the first topic, writing, by the first publisher node, the second message into a memory location in the first message cache, and writing, by the publisher node, information associated with writing the second message in the first message cache in a registry, wherein the registry is further configured to store location information indicating the memory location in the first message cache where the second message is stored. In another aspect, the method may further include generating, by the second publisher node, a second message associated with the second topic, writing, by the second publisher node, the second message into a memory location in a second message cache of the plurality of caches, and writing, by the second publisher node, information associated with writing the second message in the second message cache in a registry, wherein the registry is further configured to store location information indicating the memory location where the second message is stored in the second message cache. In another aspect of the method, the method may further include determining, by the first publisher node, a next available location in the first message cache to store the message, wherein the plurality of nodes are configured such that the first publisher node is the only publisher node writing to the first message cache, and storing the second message in the first message cache such that it begins at the determined next available storage location. In another aspect, each of the plurality of message buffers is configured as a ring buffer. In another aspect, the information stored in the topic registry for each message includes data representing the topic for each message. In another aspect, the plurality of message buffers and registries are implemented on one or more storage components of the system that are distinct from the storage components implementing any of the plurality of modules. In another aspect, the location information also indicates the end of the message written into the message buffer. In another aspect, the registry is further configured to store location information for all messages stored on the plurality of message buffers.
Another innovation includes a method of communicating messages between modules in a system on a vehicle, each module of the plurality of modules configured as a publisher node that writes messages, a subscriber node that reads messages, or both a publisher node and a subscriber node that collectively form a plurality of nodes that communicate when operating the vehicle. In some embodiments, the method includes communicating, by each subscriber node of a first set of subscriber nodes including at least one subscriber node, with a registry (sometimes referred to herein as a "topic registry") to read information on the registry for determining whether new messages associated with a first topic are available for reading, each subscriber node of the first set of subscriber nodes being configured to read messages associated with the first topic, and then using the information read from the registry by each subscriber node of the first set of subscriber nodes to determine whether new messages associated with the first topic are available for reading. The method also includes, in response to determining that a new message associated with the first topic is available for reading, by each subscriber node in the first set of subscriber nodes, location information from the registry indicating where the first message is stored in a first message cache associated with the first topic and configured to store messages associated with the first topic, the first message cache being one of a plurality of caches, each of the plurality of caches associated with a different topic, and reading, by each subscriber node in the first set of subscriber nodes, the first message from the first message cache using the location information indicating where the first message is stored.
Method embodiments described herein may have one or more other aspects (features) in various system embodiments, some of which are presented herein. However, as one skilled in the art can appreciate, various embodiments of such methods may have additional or fewer aspects, and the aspects disclosed herein may be used together in various embodiments, even if not specifically illustrated or described as being in a certain embodiment. For example, in one aspect of the method, communicating with the registry to obtain information to determine whether a new message associated with the first topic is available comprises: new message information associated with the first topic is read from the registry by each first set of subscriber nodes and the new message information from the registry is compared to the read message information stored in each of the first set of subscriber nodes. In another aspect, the new message information includes a new message counter, the method further comprising incrementing the new message counter when a message associated with the first topic is written to the first message buffer. In another aspect, the read message information of each subscriber node in the first set of subscriber nodes includes a read message counter, the method further comprising: by each subscriber node in the first set of subscriber nodes, incrementing its read message counter as new messages associated with the first topic are read from the first message cache. In another aspect, comparing the new message information from the registry with the read message information comprises: the new message counter of the registry is compared to the read message counter of the subscriber node by each subscriber node of the first set of subscriber nodes. In another aspect, the method further comprises: when the new message counter is greater than the read message counter, it is determined that a new message associated with the first topic is available for reading. In another aspect, each of the plurality of modules is implemented on at least one processor. In another aspect, the first set of subscriber nodes includes at least two subscriber nodes.
In another aspect, the method further includes communicating, by each subscriber node of a second set of subscriber nodes configured to read messages associated with a second topic, with a registry, obtaining information to determine whether new messages associated with the second topic are available, the second set of subscriber nodes including at least one subscriber node, determining, by each second set of subscriber nodes, that new messages associated with the second topic are available for reading, in response to determining that new messages associated with the second topic are available, reading, by each subscriber node of the second set of subscriber nodes from the registry, location information indicating that the second message is stored in a second memory cache associated with the second topic and configured to store messages associated with the second topic, and by each subscriber node of the second set of subscriber nodes, the second message is read from the second message buffer using location information indicating where the second message is stored. In some embodiments, at least one subscriber node in the first set of subscriber nodes is also a subscriber node in the second set of subscriber nodes. In one aspect, reading from the registry and the first message bus comprises: the method further includes reading from the registry and the first message bus via a communication bus configured to enable the subscriber node to read the location information from the registry and to read the message from the first message cache without utilizing a kernel of the computer system. In another aspect, the registry is configured to store location information indicative of a communication address of the first message buffer and location information indicative of a memory location on the first message buffer where the first message is stored. In another aspect, the registry is further configured to store information associated with messages stored on the plurality of message buffers, the information indicating a topic associated with each stored message. In another aspect, the registry is configured to store location information including data indicative of a communication address of the first message buffer and a memory location at which the first message is stored in the first message buffer. In another aspect, the registry is configured to store location information including data indicative of communication addresses of the first and second message buffers, a memory location where the first message is stored on the first message buffer, and a memory location where the second message is stored on the second message buffer.
In such methods, yet another aspect may include: the location information for each message stored by the registry includes data indicating the frequency with which each message associated with a particular topic is published. In some embodiments of such methods described herein, a method may further comprise periodically communicating, by each subscriber node in the first set of subscriber nodes, with the registry to determine whether a new message is available for reading. In another aspect, periodically communicating for each subscriber node comprises: communicate with the registry at a predetermined frequency to determine if a new message is available for reading. In another aspect, periodically communicating for each subscriber node comprises: the method includes communicating with a registry at a predetermined frequency to determine whether new messages are available for reading, which is different for at least two subscriber nodes. In another aspect, periodically communicating includes: for at least one subscriber node, communicating with the registry at a dynamically determined frequency to determine whether a new message is available for reading.
Brief description of the drawings
The features and advantages of the apparatus described herein will become more fully apparent from the following description and appended claims, taken in conjunction with the accompanying drawings. These drawings depict only several embodiments in accordance with the disclosure and are not to be considered limiting of its scope. In the drawings, like reference numerals or symbols generally indicate like parts, unless the context dictates otherwise. In some instances, the drawings may not be to scale.
FIG. 1A illustrates a block diagram of a networked vehicle environment in which one or more vehicles and/or one or more user devices interact with a server via a network, according to one embodiment.
FIG. 1B illustrates a block diagram showing the vehicle of FIG. 1A communicating with one or more other vehicles and/or servers of FIG. 1A, according to one embodiment.
FIG. 2 is a schematic diagram of a vehicle moving along a roadway and an example of components that the vehicle may use to determine its geographic location information.
FIG. 3 is a schematic diagram of an example of various modules in a computer system that may be provided in a vehicle in some embodiments, each module being associated with a representative node, where the modules may be used to publish messages for a certain topic and subscribe to messages for one or more topics (e.g., messages published by one or more other modules).
FIG. 4 is a schematic diagram of an example of a shared messaging system that may be implemented in a computer system on a vehicle that provides more efficient communication between two or more modules such as those shown in FIG. 3.
FIG. 5 is a schematic diagram of an example of a shared memory messaging system that may be implemented in a computer system on a vehicle, illustrating a representative architecture that includes a topic registry, two or more message caches, and a communication channel for each of a plurality of nodes to publish messages of a topic and subscribe to messages of multiple topics published by one or more of the other plurality of nodes.
Figure 6 is a diagram of an example of one embodiment of a topic registry and an associated message buffer for a particular topic.
FIG. 7 is a flowchart illustration showing an example of a method for a node to publish messages on a particular topic in a shared memory messaging system that enables nodes to publish messages for reading by other nodes, such as may be performed on the shared memory messaging system shown in FIG. 5.
FIG. 8 is a flowchart illustration of an example of a method for a node to subscribe to (or read) messages on a particular topic in a shared memory messaging system that enables the node to subscribe to messages for publication by one or more nodes, as may be performed, for example, on the shared memory messaging system shown in FIG. 5.
FIG. 9 is a schematic diagram of an example of a computer system that may be disposed on a vehicle and that may be used to perform the map data loading described herein.
Detailed Description
The following detailed description is directed to certain aspects and examples of the invention. However, the invention can be embodied in many different forms. It should be apparent that the aspects herein may be embodied in a wide variety of forms and that any specific structure, function, or both being disclosed herein merely represents one or more embodiments of the invention. The various aspects disclosed herein may be implemented independently of each other, and two or more of these aspects may be combined in various ways. For example, different embodiments of a shared memory communication system may be implemented using various aspects/features disclosed herein. Further, such methods may be implemented or such systems may be practiced using other processes, steps, structures, functions, or structures in addition to or instead of one or more aspects set forth herein.
Illustrative embodiments
Embodiments of a system and method for loading map data are described below with reference to the drawings. Those skilled in the art will recognize that many modifications and changes may be made without departing from the scope of the described technology. Such modifications and alterations are intended to fall within the scope of the embodiments. Those of skill in the art will further recognize that elements included in one embodiment may be interchanged with other embodiments-one or more elements from an illustrated embodiment may be included with other illustrated embodiments in any combination. For example, any of the various components described herein and/or shown in the figures may be combined, interchanged, or eliminated in other embodiments.
Embodiments of a shared memory message system for communication in a computer system in a vehicle solve the above-described problems related to having multiple functional modules that collectively represent multiple message publishers and multiple message subscribers distributed across multiple subsystems within a centralized computer system of a vehicle. In one embodiment, for each topic, there is one message publisher for that topic, and there may be multiple subscribers for any message published on any topic. Embodiments use shared memory is the underlying message transport. Such embodiments have a number of advantages. Including concurrent operations such as reads and writes, pure user-space synchronization, and no locks or system calls to schedule and/or otherwise address (e.g., by the kernel). Another advantage is that its design has crash safety (crash safe). Both the publisher and the subscriber may crash and then safely rejoin after restarting again after the crash. The publisher will always be able to successfully write its message. Because a circular buffer is used in the described embodiment, the buffer will overwrite the oldest message if the buffer is full. In this case, the subscriber may securely detect that an override has occurred and may then attempt to read the newer message.
Slow subscribers have no effect on publishers that publish their messages because the operations of the publishers and subscribers are not connected. This is significantly different from typical systems where the kernel facilitates communication between publishers and subscribers, particularly establishing a communication channel between each publisher and subscriber, and thus publisher operations are delayed if subscribers are slow in communicating. Further, the publisher copies only one message at a time to the shared memory. Thus, the number of subscribers has no effect on the publisher, nor does it increase the number of communication operations that the kernel must perform.
Generally, in this architecture, there are two types of shared memory regions implemented on the storage device: a topic registry and two or more message buffers. The functionality of the subject registry and multiple message buffer architecture described herein may be implemented in a number of specific ways in the various embodiments described herein as several illustrative embodiments of the architecture. In such a system, there may be many publisher nodes. For each message of a particular topic, there is one publisher node that writes the message of that topic to the shared memory space. A plurality of subscriber nodes may be configured to read messages related to a particular topic from the shared memory space. In addition, a subscriber node configured to read messages related to one topic may also be configured to read other messages related to other topics. That is, each publisher node is configured to write messages related to a certain topic to the shared memory space so that they can be easily read by at least one subscriber node.
Each of the two or more message buffers stores messages associated with a topic. That is, all messages stored in a particular message buffer are related to the same topic. The message buffer may be a ring buffer. The subject registry may be a centralized array configured to store metadata for messages stored in one of the message buffers. Each element (e.g., a stored "topic record") in the topic registry corresponds to metadata for a particular message stored in one of the message buffers. The mapping between the message topic and the index in the message buffer is a common denominator between the different modules of the system. In some embodiments, the information from each message stored in the topic registry indicates the address of the message cache in which the messages are stored, and the name of the topic to which the message relates. Thus, from time to time (e.g., according to some period of the subscriber node) subscriber nodes that are to read their subscribed messages can examine the topic registry to determine that the messages are relevant to the topic to which they are subscribed, where they are found, and can then use the information from the topic registry to read the messages from their corresponding message caches where they are stored to access them.
In some embodiments, the topic registry also includes information about the frequency with which a particular publisher node publishes messages. In some embodiments, a system alert may be generated if the publisher node does not publish a message at an expected frequency (as indicated by the frequency information of the message on the topic registry). For example, vehicles, such as autonomous vehicles, vehicles providing driver assistance features, and/or vehicles for location-based services, may use multiple sensors to continuously determine information about their environment. If a sensor publisher node that publishes a light detection and ranging related message (e.g., a light detection and ranging image) stops publishing its messages or publishes its messages at a frequency that is lower than the expected message frequency as indicated by the information for the message topic in the topic registry, an alert may be generated to notify the control system that an unexpected condition has occurred, and thus loss or deficiency of light detection and ranging data may be mitigated.
There are numerous specific ways in which the architectural embodiments described herein can be implemented. Regardless of the particular implementation, the publisher node is configured to write a message cache configured to store messages for a particular topic, and to use the topic registry information to determine where to write the messages; similarly, the subscriber node uses the topic registry information to determine where to read the messages to which it subscribes and reads those messages from the shared memory space of the message cache. The publisher node can write its messages to the message cache and update the subject registry without using the computer system kernel to manage this communication. "kernel" as referred to herein refers to the broad term of a computer program that is the core of a computer operating system and that completely controls each aspect of the system. For example, the kernel connects application software to the hardware of the computer system. The kernel may be one of the first programs loaded during boot-up and it may handle other parts of the boot-up process, as well as input/output requests from the software, which are converted into data processing instructions of the central processing unit. In addition, kernel peripherals connect to the computer system and manage its memory. As discussed above, using this shared memory architecture that decouples direct communication between a publisher node (e.g., performing a particular function and writing a message related to that function, such as an output image) and a subscriber node (e.g., performing another function and reading a message related to that function, such as an input image), a number of advantages may be achieved, including, for example, reducing the number of communication tasks that the kernel must manage.
In some embodiments, the metadata in the subject registry for a message subject includes two variables, sometimes referred to as a role _ offset and a pending _ tail _ offset, that are used to synchronize read and write operations. Generally, the table _ offset references the space in the message buffer where the message starts. pending _ tail _ offset references the space in the message buffer where the message being written will end. Such variables are written by publishers and read by subscribers. For each message topic there is a ring buffer to store the messages and the topic registry comprises the addresses of the message buffers storing the messages for each topic. The topic registry also includes metadata indicating the name of each topic so that subscribers to a certain topic can refer to this metadata to identify and read only those messages that have it as the subscriber's topic. The topic registry can also include information indicating the frequency with which messages are published. Because the topic registry includes information indicating the topic associated with each message, there may be one for the topic registry: which contains metadata for each message stored regardless of topic and for each topic there is a ring buffer configured to store messages related to that topic. That is, the topic registry includes metadata for each topic. Each topic corresponds to a message buffer. Each message buffer may store one or more messages belonging to the topic. In the case where messages associated with a plurality of topics are of different sizes, the space allocated in the message buffer corresponding to the topic set is set to be adapted to the particular message it stores. In the message buffer, each message may be written with a suffix of its size.
In some embodiments of such shared memory communication systems, it may be useful for a subscriber to know whether a message has been dropped, or for a monitoring service to determine whether a message is published at a desired rate. To help achieve this functionality, message counters may be implemented on both the topic registry and the subscribers. Each time a message is written for a topic, the message counter associated with that topic is incremented. Each time a subscriber to a particular topic reads a message, its message counter associated with that topic is incremented. By comparing the message counter in the topic registry with the subscriber's message counter, the subscriber can determine whether a message has been dropped and can determine whether a message is being published at a desired rate.
In some cases, messages published for a particular topic (and stored in a particular message buffer) may differ in size. Thus, in some embodiments, when a publisher is to write a message that is larger than the previously allocated memory, it can allocate more memory on the message buffer.
To help implement the above-described functionality of a shared memory communication system, all of these message topics need to be declared at compile time. The information required for each topic may include, for example, the topic name, the maximum message size of the published message, the shared memory message buffer size, and the publication rate. Since all topics are known at compile time, the topics can be automatically given metadata such as entity ID (integer ID) and used as an index into the topic registry. In some embodiments where there are different types of messages, for example, in-vehicle messages, off-board messages, and test messages, each different type of message may be managed through a different topic registry. Thus, some embodiments may include two or more topic registrars, where in such embodiments each topic registry manages different types of messages, each topic registry being associated with a message cache that each stores messages for a particular topic.
Although the shared memory architecture described herein does not rely on knowledge of the nodes, for purposes of system monitoring, in some embodiments, this knowledge may be useful to also statically define the computational graph. In such embodiments, the information required by each node may include an incoming message topic and an outgoing message topic. In some embodiments, the subject/node information may be specified in JavaScript Object Notation (JSON) format (and optionally schema (schema) defined in a static library) for easy access from python/js/etc. at runtime. Furthermore, compile-time constants (compilations) for the C + + source code may be generated, making it easier and more efficient to use from C + +.
In some embodiments, to make it easier to calculate and adjust the characteristics of the system (e.g., maximum message size and message size buffer), the system may be configured to monitor the generated messages and determine the distribution of the various features. Even if the characteristic is not adjustable for the current message, the message may be delivered and an alert may be sent to the developer indicating that adjustments to the characteristics are needed. For example, if some messages are larger than the maximum message size but smaller than the message buffer size, they may still be passed on for processing, but each time an event may be recorded as a warning in order to let the developers know that they need to adjust the configuration characteristics of the topic. If the messages are larger than the message buffer size, the messages may be discarded and the event may be recorded as a more serious warning to the developer to resolve it as soon as possible.
Although systems with more than one publisher node per topic are possible, in almost all cases there is only one publisher node per topic. Thus, in such embodiments, the system may be designed to support only one publisher per topic, and may determine a fixed path to the naming scheme of the shared memory file. For example:
subject registry: [ dev/shm/voy ] < session _ id >. topoic _ registration. < namespace >
Subject matter: the/dev/shm/voy. < session _ id >. topoc _ registration. < namespace >. topic _ index > < generation) id > in some embodiments, the filename may be limited to no more than 255 characters.
In some embodiments, the determination of the session id (session id) may be performed using a value from the command line flag (if any) or using a port number from the ROS MASTER URI environment variable (env variable) (if any) or using some default value such as 0. The shared memory file is not deleted. To ensure that the subscriber does not still use the same session ID to read messages from the previous session, the subscriber may set the index indicator of the message that he or she is to read equal to the end of the last message that has been published for that topic, e.g., set the subscriber's "head" (the position at which the subscriber will start reading) to "tail _ now" (the end of the last message for the particular topic to which the subscriber subscribes). While this may result in a subscriber missing all messages that the publisher has published, the impact, if any, on most operations may be minimal as messages are currently and/or continuously published in such real-time systems.
FIG. 1A shows a block diagram of a networked vehicle environment 100 in which one or more vehicles 120 and/or one or more user devices 102 interact with a server 130 via a network 110, according to one embodiment. For example, vehicle 120 may be equipped to provide travel sharing and/or other location-based services to help the driver control vehicle operation (e.g., through various driver assistance features such as adaptive and/or conventional cruise control, adaptive headlamp control, antilock braking, auto parking, night vision, blind spot monitoring, collision avoidance, anti-crosswind stabilization, driver fatigue detection, driver monitoring systems, emergency driver assistance, intersection assistance, hill descent control, smart speed adaptation, lane centering, lane departure warning, forward, rear, and/or side parking sensors, pedestrian detection, rain sensors, look-around systems, tire pressure monitors, traffic sign recognition, steering assistance, reverse driving warnings, traffic condition alerts, etc.) and/or to fully control vehicle operation. Thus, the vehicle 120 may be a conventional gasoline, natural gas, biofuel, electric, hydrogen, etc. vehicle configured to provide shared egress and/or other location-based services, a vehicle providing driver assistance functionality (e.g., one or more of the driver assistance features described herein), or an automated or autonomously driven vehicle (AV). Vehicle 120 may be an automobile, truck, van, bus motorcycle, scooter, bicycle, and/or any other motorized vehicle.
Server 130 may communicate with vehicle 120 to obtain vehicle data, such as route data, sensor data, perception data, vehicle 120 control data, vehicle 120 component failure and/or fault data, and so forth. The server 130 may process and store such vehicle data for use in other operations performed by the server 130 and/or another computing system (not shown). Such operations may include running a diagnostic model to identify vehicle 120 running problems (e.g., causes of navigation errors of vehicle 120, abnormal sensor readings, unidentified objects, vehicle 120 component failures, etc.); running the model to simulate the performance of the vehicle 120 given a set of variables; identify objects that the vehicle 120 cannot identify, generate control instructions that, when executed by the vehicle 120, cause the vehicle 120 to drive and/or maneuver in some manner along the specified path; and/or the like.
Server 130 may also transmit data to vehicle 120. For example, server 130 may transmit map data, firmware and/or software updates, vehicle 120 control instructions, identification results of objects that are not recognized by vehicle 120, passenger access information, traffic data, and/or the like.
In addition to communicating with one or more vehicles 120, server 130 may also be capable of communicating with one or more user devices 102. In particular, server 130 may provide web services to enable users to request location-based services (e.g., a shipping service, such as a shared travel service) through an application running on user device 102. For example, user device 102 may correspond to a computing device, such as a smartphone, tablet, laptop, smart watch, or any other device that may communicate with server 130 over network 110. In this embodiment, the user device 102 executes an application, such as a mobile application, that the user operating the user device 102 may use to interact with the server 130. For example, the user device 102 may communicate with the server 130 to provide location data and/or queries to the server 130, receive map-related data and/or directions from the server 130, and/or the like.
Server 130 may process the request and/or other data received from user device 102 to identify a service provider (e.g., a driver of vehicle 120) to provide the requested service to the user. Further, server 130 may receive data, such as user trip access or destination data, user location query data, and the like, based on which server 130 identifies areas, addresses, and/or other locations associated with various users. The server 130 may then use the identified location to provide directions to the service provider and/or user to the determined access location.
Applications running on user device 102 may be created and/or manufactured by the same entity responsible for server 130. Alternatively, the application running on the user device 102 may be a third party application that includes features (e.g., an application programming interface or software development suite) that enable communication with the server 130.
For simplicity and ease of explanation, one server 130 is shown in FIG. 1A. However, it should be appreciated that server 130 may be a single computing device, or may include a plurality of different computing devices logically or physically combined to operate collectively as a server system. The components of the server 130 may be implemented in dedicated hardware (e.g., a server computing device with one or more ASICs), without software, or as a combination of hardware and software. Additionally, the modules and components of server 130 may be combined on one server computing device, either separately or as multiple groups distributed over several server computing devices. In some embodiments, server 130 may include additional or fewer components than shown in FIG. 1A.
The network 110 includes any wired network, wireless network, or combination thereof. For example, the network 110 may be a personal area network, a local area network, a wide area network, an over-the-air broadcast network (e.g., a network for broadcast or television), a cable network, a satellite network, a cellular telephone network, or a combination thereof. As another example, the network 110 may be a publicly accessible network linking networks, possibly operated by various different parties, such as the internet. In some embodiments, the network 110 may be a private or semi-private network, such as a corporate or university intranet. Network 110 may include one or more wireless networks, such as for a global system for mobile communications (GSM) network, a Code Division Multiple Access (CDMA) network, a Long Term Evolution (LTE) network, or any other type of wireless network. The network 110 may use protocols and components for communicating over the internet or any other of the networks described above. For example, the protocols used by the network 110 may include hypertext transfer protocol (HTTP), hypertext transfer security protocol (HTTPs), Message Queue Telemetry Transport (MQTT), restricted application protocol (CAAP), and the like. Protocols and components for communicating via the internet or any other type of communication network as previously described are well known to those skilled in the art and are therefore not described in detail herein.
The server 130 may include a navigation unit 140, a vehicle data processing unit 145, and a data store 150. The navigation unit 140 may assist in location-based services. For example, the navigation unit 140 may assist a user (also referred to herein as a "driver") in transporting another user (also referred to herein as a "lift") and/or object (e.g., food, packages, etc.) from a first location (also referred to herein as an "pickup location") to a second location (also referred to herein as a "destination location"). The navigation unit 140 may assist in enabling user and/or object transport by providing maps and/or navigation instructions to applications running on the driver's user device 102, to applications running on the lift's user device 102, and/or to a navigation system running on the vehicle 120.
As an example, the navigation unit 140 may include a matching service (not shown) that pairs a lift requesting a trip from an pickup location to a destination location with a driver who is able to complete the trip. The matching service may interact with an application running on the lift's user device 102 and/or an application running on the driver's user device 102 to establish the lift's itinerary and/or to process payment from the lift to the driver.
The navigation unit 140 may also communicate with an application running on the driver's user device 102 during the trip to obtain trip location information from the user device 102 (e.g., via Global Positioning System (GPS) components coupled to and/or embedded in the user device 102) and provide navigation directions to the application that assist the driver in traveling from the driver's current location to the destination location. The navigation unit 140 may also indicate a number of different geographical locations or points of interest to the driver, whether or not the driver is carrying a lift.
The vehicle data processing unit 145 may be configured to support driver assistance features of the vehicle 120 and/or to support autonomous driving. For example, the vehicle data processing unit 145 may generate and/or transmit map data to the vehicle 120, run a diagnostic model for identifying operational issues with the vehicle 120, run a model for simulating the performance of the vehicle 120 given a set of variables, identify objects and transmit an identification of the objects to the vehicle 120 using vehicle data provided by the vehicle 120, generate and/or transmit vehicle 120 control instructions to the vehicle 120, and/or the like.
The data storage 150 may store various types of data used by the navigation unit 140, the vehicle data processing unit 145, the user device 102, and/or the vehicle 120. For example, the data store 150 may store user data 152, map data 154, search data 156, and log data 158.
The user data 152 may include information about some or all users registered for the location-based service, such as drivers and lift riders. The information may include, for example, a username, password, name, address, billing information, data associated with previous trips taken or serviced by the user, user rating information, user loyalty rating information, and/or the like.
Map data 154 may include high-resolution (HD) maps generated from sensors (e.g., light detection and ranging (LiDAR) sensors, radio detection and ranging sensors, infrared cameras, visible light cameras, stereo cameras, Inertial Measurement Units (IMU), etc.), satellite images, Optical Character Recognition (OCR) performed on captured street images (e.g., recognizing street names, recognizing street sign text, recognizing point of interest names, etc.), and so forth; information for calculating a route; information for rendering a two-dimensional (2D) and/or three-dimensional (3D) graphical map; and/or the like. For example, the map data 154 may include a number of elements: such as street and intersection layouts, bridges (e.g., including information about the height and/or width of a overpass), exit ramps, buildings, parking structure entrances and exits (e.g., including information about the height and/or width of a vehicle entrance and/or exit), locations of signboards and stop lights, emergency crossings, points of interest (e.g., parks, restaurants, gas stations, attractions, landmarks, etc., and associated names), road markings (e.g., centerline markings separating opposing lanes, lane markings, stop lines, left turn guide lines, right turn guide lines, pedestrian crossings, bus lane markings, bicycle lane markings, safety island markings, road surface text, highway exit and entrance markings, etc.), curb stones, railway lines, waterways, turn radii and/or angles for left and right turns, distances and sizes of road features, road length, and size of road features, road length, and/or distance between two or more roads, and/or between two roads, The location of the partition between two-way traffic, and/or the like, along with the associated geographic locations (e.g., geographic coordinates) of these elements. The map data 154 may also include reference data such as real-time and/or historical traffic information, current and/or predicted weather conditions, road work information, information regarding laws and regulations (e.g., speed limits, whether to allow or disallow a right turn at a red light, whether to allow or disallow a turn around, allowed travel directions, and/or the like), news events, and/or the like.
Although the map data 154 is illustrated as being stored in the data store 150 of the server 130, this is not meant to be limiting. For example, server 130 may transmit map data 154 to vehicle 120 for storage therein (e.g., in data store 129, as described below).
The search data 156 may include searches that were entered by a number of different users in the past. For example, the search data 156 may include a text search for access and/or destination locations. The search may be for a particular address, geographic location, name associated with the geographic location (e.g., name of park, restaurant, gas station, attraction, landmark, etc.), and so forth.
The log data 158 may include vehicle data provided by one or more vehicles 120. For example, the vehicle data may include route data, sensor data, perception data, vehicle 120 control data, vehicle 120 component failure and/or fault data, and the like.
FIG. 1B illustrates a block diagram showing the vehicle 120 of FIG. 1A communicating with one or more other vehicles 170A-N of FIG. 1A and/or the server 130, according to one embodiment. As shown in fig. 1B, vehicle 120 may include various components and/or data storage. For example, the vehicle 120 may include a sensor array 121, a communication array 122, a data processing system 123, a communication system 124, an internal interface system 125, a vehicle control system 126, an operating system 127, a map engine 128, and/or a data store 129.
Communications 180 may be sent and/or received between vehicle 120, one or more vehicles 170A-N, and/or server 130. Server 130 may transmit and/or receive data from vehicle 120, as described above in connection with fig. 1A. For example, server 130 may transmit vehicle control instructions or commands to vehicle 120 (e.g., as communication 180). The vehicle control instructions may be received by a communication array 122 (e.g., an array of one or more antennas configured to transmit and/or receive wireless signals) operated by a communication system 124 (e.g., a transceiver). The communication system 124 may communicate vehicle control commands to a vehicle control system 126 that may operate an acceleration, steering, braking, lights, signals, and other operating systems 127 of the vehicle 120 to drive and/or steer the vehicle 120 and/or assist the driver in driving and/or steering the vehicle 120 through road traffic to a destination location specified by the vehicle control commands.
As an example, the vehicle control instructions may include route data 163 that may be processed by the vehicle control system 126 to maneuver the vehicle 120 and/or assist a driver in maneuvering the vehicle 120 along a given route (e.g., an optimized route calculated by the server 130 and/or the map engine 128) toward a specified destination location. In processing the route data 163, the vehicle control system 126 may generate control commands 164 for execution by the operating system 127 (e.g., to accelerate, steer, brake, steer, reverse, etc.) to cause the vehicle 120 to travel along the route to the destination location and/or to assist the driver in steering the vehicle 120 along the route to the destination location.
Destination location 166 may be specified by server 130 based on a user request (e.g., an access request, a delivery request, etc.) transmitted from an application running on user device 102. Alternatively or additionally, the lift and/or driver of the vehicle 120 may provide user input 169 via the internal interface system 125 (e.g., a vehicle navigation system) to provide the destination location 166. In some embodiments, vehicle control system 126 may transmit the input destination location 166 and/or the current location of vehicle 120 (e.g., as a GPS data packet) as communication 180 to server 130 via communication system 124 and communication array 122. The server 130 (e.g., navigation unit 140) may perform an optimization operation using the current location of the vehicle 120 and/or the input destination location 166 to determine an optimal route for the vehicle 120 to travel to the destination location 166. Route data 163, including the optimal route, may be communicated from server 130 to vehicle control system 126 via communication array 122 and communication system 124. As a result of receiving the route data 163, the vehicle control system 126 can cause the operating system 127 to maneuver the vehicle 120 through traffic along the optimal route to the destination location 166, assist the driver in maneuvering the vehicle 120 through traffic along the optimal route to the destination location 166, and/or cause the internal interface system 125 to display and/or present instructions for maneuvering the vehicle 120 through traffic along the optimal route to the destination location 166.
Alternatively or additionally, the route data 163 includes an optimal route and the vehicle control system 126 automatically inputs the route data 163 into the map engine 128. The map engine 128 may generate map data 165 using the optimal route (e.g., generate a map to display the optimal route and/or take instructions for the optimal route) and provide the map data 165 to the internal interface system 125 (e.g., via the vehicle control system 126) for display. The map data 165 may include information derived from the map data 154 stored in the data store 150 on the server 130. The displayed map data 165 may indicate an estimated time of arrival and/or show the progress of the vehicle 120 along an optimal route. The displayed map data 165 may also include indicators such as diversion commands, emergency notifications, road work information, real-time traffic data, current weather conditions, information about laws and regulations (e.g., speed limits, whether or not to allow or prohibit a right turn at a red light, where to allow or prohibit a turn around, allowed directions of travel, etc.), news events, and/or the like.
User input 169 may also be a request to access a network (e.g., network 110). In response to such a request, the internal interface system 125 can generate an access request 168, which can be processed by the communication system 124 to configure the communication array 122 to transmit and/or receive data corresponding to user interaction with the internal interface system 125 and/or user device 102 interaction with the internal interface system 125 (e.g., user device 102 connected to the internal interface system 125 via a wireless connection). For example, the vehicle 120 may include an onboard Wi-Fi that passengers and/or drivers may access to send and/or receive email and/or text messages, streaming audio and/or video content, browse content pages (e.g., web pages, etc.), and/or access applications using web access. Based on the user interaction, internal interface system 125 can receive content 167 via network 110, communication array 122, and/or communication system 124. Communication system 124 may dynamically manage network access to avoid or minimize disruption of the transmission of content 167.
The sensor array 121 may include any number of one or more types of sensors, such as a satellite radio navigation system (e.g., GPS), light detection and ranging sensors, landscape sensors (e.g., radar sensors), inertial measurement units, cameras (e.g., infrared cameras, visible light cameras, stereo cameras, etc.), Wi-Fi detection systems, cellular communication systems, inter-vehicle communication systems, road sensor communication systems, feature sensors, proximity sensors (e.g., infrared, electromagnetic, photoelectric, etc.), distance sensors, depth sensors, and/or the like. The satellite radio navigation system may calculate the current position of vehicle 120 (e.g., within a range of 1-10 meters) based on analyzing signals received from a constellation of satellites.
Light detection and ranging sensors, radar sensors, and/or any other similar type of sensor may be used to detect the environment surrounding vehicle 120 when vehicle 120 is in motion or is about to begin moving. For example, light detection and ranging sensors may be used to reflect multiple laser beams from an approaching object to assess their distance and provide accurate three-dimensional information about the surrounding environment. Data obtained from the light detection and ranging sensors may be used to perform object identification, motion vector determination, collision prediction, and/or implement accident avoidance procedures. Alternatively, the light detection and ranging sensor may use a rotating scanning mirror assembly to provide a 360 ° viewing angle. The light detection and ranging sensors may optionally be mounted on the roof of the vehicle 120.
The inertial measurement unit may include an X, Y, Z-oriented gyroscope and/or accelerometer. The inertial measurement unit provides data about the rotational and linear motion of the vehicle 120, which can be used to calculate the motion and position of the vehicle 120.
The camera may be used to capture a visual image of the environment surrounding the vehicle 120. Depending on the configuration and number of cameras, the cameras may provide a 360 ° view around the vehicle 120. The images from the camera may be used to read road markings (e.g., lane markings), read street signs, detect objects, and/or the like.
A Wi-Fi detection system and/or a cellular communication system may be used to triangulate Wi-Fi hotspots or cell towers, respectively, to determine the location of the vehicle 120 (optionally in conjunction with a satellite radio navigation system).
The inter-vehicle communication system (which may include a Wi-Fi detection system, a cellular communication system, and/or the communication array 122) may be used to receive and/or transmit data to other vehicles 170A-N, such as current speed and/or position coordinates of the vehicle 120, corresponding time and/or position coordinates and a planned deceleration rate when deceleration is planned, time and/or position coordinates when stopping operations are planned, time and/or position coordinates and a lane change direction when lane changes are planned, time and/or position coordinates when turning operations are planned, time and/or position coordinates when stopping operations are planned, and/or the like.
A road sensor communication system (which may include a Wi-Fi detection system and/or a cellular communication system) may be used to read information (e.g., indicative of traffic speed and/or traffic congestion) from road sensors and/or to read information (e.g., traffic signals) from traffic control devices.
When a user requests a shipment (e.g., through an application running on the user device 102), the user may specify a particular destination location. The initial position may be a current position of the vehicle 120, which may be determined using a satellite radio navigation system (e.g., GPS, Galileo, COMPASS, DORIS, GLONASS, and/or other satellite radio navigation systems) installed in the vehicle, a Wi-Fi positioning system, cellular tower triangulation, and/or the like. Alternatively, the initial location may be specified by the user through a user interface provided by the vehicle 120 (e.g., the internal interface system 125) or through the user device 102 running the application. Alternatively, the initial location may be automatically determined from location information obtained from the user device 102. In addition to the initial location and the destination location, one or more navigation points may be specified, enabling multiple destination locations.
Raw sensor data 161 from sensor array 121 may be processed by an on-board data processing system 123. The processed data 162 may then be transmitted by the data processing system 123 to the vehicle control system 126 and optionally to the server 130 via the communication system 124 and the communication array 122.
Data store 129 may store map data (e.g., map data 154) and/or a subset of map data 154 (e.g., a portion of map data 154 corresponding to an approximate area in which vehicle 120 is currently located). In some embodiments, the vehicle 120 may record updated map data along the travel route using the sensor array 121 and transmit the updated map data to the server 130 via the communication system 124 and the communication array 122. The server 130 may then transmit the updated map data to one or more of the vehicles 170A-N and/or further process the updated map data.
The data processing system 123 may provide continuously or near continuously processed data 162 to the vehicle control system 126 in response to point-to-point activity in the environment surrounding the vehicle 120. Processed data 162 may include a comparison between raw sensor data 161, representing the operating environment of vehicle 120 and continuously collected by sensor array 121, and map data stored in data store 129. In one example, the data processing system 123 is programmed with machine learning or other artificial intelligence capabilities to enable the vehicle 120 to identify and respond to conditions, events, and/or potential hazards. In a variation, the data processing system 123 may continuously or near continuously compare the raw sensor data 161 to stored map data in order to perform positioning to continuously or near continuously determine the position and/or orientation of the vehicle 120. The positioning of vehicle 120 may enable vehicle 120 to learn the immediate location and/or orientation of vehicle 120 as compared to stored map data in order to maneuver vehicle 120 through traffic on a block road, and/or to assist a driver in maneuvering vehicle 120 through traffic on a block road and identifying and responding to potentially dangerous (e.g., pedestrians) or local conditions, such as weather or traffic conditions.
Further still, positioning may enable vehicle 120 to tune or beam steer communication array 122 to maximize the quality of the communication link and/or minimize interference from other communications of other vehicles 170A-N. For example, communication system 124 may beam steer the radiation pattern of communication array 122 in response to network configuration commands received from server 130. Data store 129 may store current network resource map data that identifies network base stations and/or other network sources that provide network connectivity. The network resource map data may indicate the location of the base stations and/or available network types (e.g., 3G, 4G, LTE, Wi-Fi, etc.) within the area in which the vehicle 120 is located.
Although fig. 1B describes certain operations as being performed by the vehicle 120 or the server 130, this is not meant to be limiting. The operations performed by the vehicle 120 and the server 130 as described herein may be performed by any entity. For example, certain operations typically performed by the server 130 (e.g., transmitting update map data to the vehicles 170A-N) may be performed by the vehicle 120 for load balancing purposes (e.g., reducing the processing load of the server 130, utilizing idle processing power on the vehicle 120, etc.).
Still further, any of the vehicles 170A-N may include some or all of the components of the vehicle 120 described herein. For example, vehicles 170A-N may include communication array 122 to communicate with vehicle 120 and/or server 130.
FIG. 2 is a schematic diagram of a vehicle moving along a roadway and an example of components that the vehicle may use to determine its geographic location information. The computer system 105 is located on a vehicle 120 and performs operations to partially or fully control the vehicle. Computer system 105 may include any of the components of vehicle 120 described above in connection with FIG. 1B. In the case where the vehicle 120 is operating in an autonomous driving mode, the computer system 105 has full control of the vehicle. The computer system 105 is configured to perform a number of functions related to positioning, sensing, planning, and control operations to control the vehicle 120. For example, in various embodiments of the invention, one or more of the described components or one or more other components may be used to determine the position of the vehicle. Various functions and operations of computer system 105 may be performed by module 109 of computer system 105. Illustrative examples of the various types of modules may be implemented in a computer system 105 on a vehicle, as shown in FIG. 3. During operation of the computer system 105 in controlling the vehicle 120, the various modules 109 transmit messages of various themes, some modules 109 write messages, and some modules 109 read messages. In the context of the embodiments of the shared communication system described herein, the module 109 that writes messages may be represented as a publisher node and the module 109 that reads messages may be represented as a subscriber node.
Fig. 2 shows an example of the movement of the vehicle 120 along a road 241. Road 241 may be a portion of a route that vehicle 120 is controlled to travel from a first point to a second point in an autonomous manner. In fig. 2, vehicle 120 is moving along road 241 at a speed and direction indicated by motion vector 230. Fig. 2 also shows an example of a locating component that may be used by vehicle 120 or passively or actively provided to vehicle 120 with geographic location information that vehicle 120 may use to determine a location (e.g., geographic location) of vehicle 120.
Positioning components along road 241 or in communication with sensors on vehicle 120 may be used to help control and/or position vehicle 120 as vehicle 120 moves along road 241. Fig. 2 shows several examples of such positioning components, as well as examples of sensing systems described herein that may be used to position and control a vehicle. In one example, the proximal positioning members 250A, 250B may extend along the pathway 241. In various embodiments, such components may be contiguous or closely arranged, and may be passive (sensed by sensors on vehicle 120, e.g., reflected by an emitting sensor on vehicle 120, or sensed by an IR or optical sensor) or active (e.g., emitting radiation sensed by vehicle 120). One or more of the distal locating members 225 may be disposed beside the roadway or some distance away from the roadway. The distal positioning member 225 may also be active or passive and have a variety of embodiments. In some embodiments, global positioning system transmitter 215 may provide GPS signals that are received by vehicle 120. In some embodiments, one or more stationary transmitters 220 may be disposed along roadway 241 and may provide transmissions or communications to vehicle 120 for determining its location.
In various embodiments, the vehicle 120 may include a sensor system as part of the computer system 105 or may include a sensor system on the vehicle that interfaces with the computer system 105. In various embodiment components, the sensor system may include one or more sensors configured to sense information about the environment in which the vehicle 120 is located and which includes the locating component. In various embodiments, the one or more sensors may include one or more of a Global Positioning System (GPS) module, an Inertial Measurement Unit (IMU), a radio detection and ranging unit, a laser rangefinder and/or light detection and ranging unit, an Infrared (IR) camera, and/or an optical camera. The global positioning system module may be any sensor configured to estimate the geographic location of the vehicle 120. To this end, the global positioning system module may include a transceiver configured to estimate the position of the automobile 100 relative to the earth from the satellite-based positioning data. In one example, the computer system 105 may be configured to use a global positioning system module in conjunction with map data to estimate the location of lane boundaries on a road on which the vehicle 120 may travel.
The inertial measurement unit may be any combination of sensors configured to sense changes in position and orientation of the vehicle 120 based on inertial acceleration. In some examples, the combination of sensors may include, for example, an accelerometer and a gyroscope. Other combinations of sensors are also possible.
The radio detection and ranging unit may be considered to be an object detection system that may be configured to use radio waves to determine characteristics of an object, such as the range, height, direction or speed of the object. The radio detection and ranging unit may be configured to emit pulses of radio waves or microwaves that may bounce off any object in the wave path. The object may return a portion of the energy of the wave to a receiver (e.g., a dish or antenna), which may also be part of the radio detection and ranging unit. The radio detection and ranging unit may also be configured to perform digital signal processing of the received signal (bounced off the object) and may be configured to identify the object.
Other systems similar to radio detection and ranging have been applied in other parts of the electromagnetic spectrum. One example is LiDAR (light detection and ranging), which may be configured to use visible light from a laser rather than radio waves.
The light detection and ranging unit may include a sensor configured to sense or detect an object in the environment in which the vehicle 120 is located using light. In general, optical detection and ranging is an optical remote sensing technique that can measure the distance or other properties to a target by illuminating the target with light. As an example, the light detection and ranging unit may comprise a laser source and/or a laser scanner configured to emit laser pulses and a detector configured to receive reflections of the laser pulses. For example, the light detection and ranging unit may comprise a laser rangefinder that reflects off a rotating mirror and scans the laser in one or two dimensions around the scene being digitized, collecting distance measurements at specified angular intervals. In various examples, the light detection and ranging unit may include components such as a light (e.g., laser) source, scanners and optics, photodetector and receiver electronics, and a positioning and navigation system.
In one example, the light detection and ranging unit may be configured to image objects using Ultraviolet (UV), visible, or infrared light, and may be used with a wide range of targets including non-metallic objects. In one example, a narrow laser beam may be used to map physical features of an object at high resolution.
In an example, wavelengths in the range from about 10 microns (infrared) to about 250nm (uv) may be used. Typically the light is reflected by backscattering. Different types of scattering are used for different optical detection and ranging applications, such as rayleigh scattering, mie scattering and raman scattering, and fluorescence scattering. Based on the different kinds of backscattering, light detection and ranging may be referred to as rayleigh light detection and ranging, mie light detection and ranging, raman light detection and ranging, and sodium/iron/potassium fluorescence light detection and ranging, respectively, for example. Suitable wavelength combinations can enable distant mapping of objects by looking for wavelength-dependent changes in reflected signal intensity.
Three-dimensional imaging may be achieved using both scanning and non-scanning light detection and ranging systems. "three-dimensional gated imaging light detection and ranging" is an example of a non-scanning laser ranging system that employs a pulsed laser and a fast gated camera. Imaging light detection and ranging may also be performed using high-speed detector arrays and modulation-sensitive detector arrays, which are typically built on a single chip using complementary metal-oxide-semiconductor (CMOS) and hybrid CMOS/charge-coupled device (CCD) fabrication techniques. In these devices, each pixel can be processed locally by demodulation or high speed gating, so that the array can be processed to represent the image from the camera. Using this technique, thousands of pixels may be acquired simultaneously to create a three-dimensional point cloud representing an object or scene detected by the light detection and ranging unit.
The point cloud may include a set of vertices in a three-dimensional coordinate system. For example, these vertices may be defined by X, Y and Z coordinates, and may represent the outer surface of an object. The light detection and ranging unit may be configured to create a point cloud by measuring a large number of points on the surface of the object, and may output the point cloud as a data file. As a result of the three-dimensional scanning process of the object by the light detection and ranging unit, the point cloud can be used to identify and visualize the object. In one example, the point cloud may be rendered directly to visualize the object. In another example, the point cloud may be converted to a polygonal or triangular mesh model by a process that may be referred to as surface reconstruction. Example techniques for converting a point cloud to a three-dimensional surface may include Delaunay triangulation (Delaunay triangulation), alpha shapes (alpha maps), and ball rotation (ball rolling). These techniques include building a network of triangles on existing vertices of the point cloud. Other example techniques may include converting the point cloud to a volumetric distance field and reconstructing an implicit surface defined by a marching cubes algorithm.
The camera may be any camera (e.g., a still camera, a video camera, etc.) configured to capture images of the environment in which the vehicle 120 is located. To this end, the camera may be configured to detect visible light, or may be configured to detect light from other parts of the spectrum, such as infrared or ultraviolet light. Other types of cameras are also possible. The camera may be a two-dimensional detector, or may have a three-dimensional spatial extent. In some examples, the camera may be, for example, a range detector configured to generate a two-dimensional image indicative of distances from the camera to a plurality of points in the environment. To this end, the camera may use one or more ranging techniques. For example, the camera may be configured to use structured light technology, where the vehicle 120 illuminates an object in the environment with a predetermined light pattern (e.g., a grid or checkerboard pattern) and uses the camera to detect a reflection of the predetermined light pattern from the object. Based on the distortion of the reflected light pattern, the vehicle 120 may be configured to determine a distance to a point on the object. The predetermined light pattern may comprise infrared light or light of another wavelength. The sensor system may additionally or alternatively include components other than those described herein.
FIG. 3 is a schematic diagram of an example of various modules 109 that may be provided in a computer system 105 of a vehicle, according to some embodiments. Various embodiments of computer system 105 may have more or fewer modules 109 or different modules 109, the modules 109 shown in fig. 3 being representative examples of such modules and not intended to limit the modules 109 of computer system 105 or to be considered necessary in any particular computer system 105. In the example shown in FIG. 3, the computer system 105 includes a vehicle location module 109A, an optical sensor module 109B, an infrared sensor module 109C, a light detection and ranging sensor module 109D, a radar sensor module 109E, a global positioning system module 109F, a user interface module 109G, and a map data-geography module 109H, a map data-geometry module 109I, and an inertial sensor module 109J, a navigation module 109K, an automatic drive controller module 109L, a vehicle system controller module 109M, a communication interface module 109N, and a car-to-car interface module 109O.
Each of these modules 109 may send and receive messages from any other module 109, other subsystems and components of the computer system 105, or systems in the computer system 105 connected to the off-vehicle 120. To facilitate such communication, the shared message propagator architecture described herein can be employed. For such implementations, each of the modules 109A-O may be considered a representative node 141a-O that may publish messages of a certain topic (e.g., provide messages related to sensor data or control functions) and one or more messages for subscribing to one or more topics published by one or more other ones of the modules 109.
FIG. 4 is a schematic diagram of an example of a portion of a shared communication system illustrating a subject registry 410 and a plurality of message buffers 420, 425, 430 that may be implemented in the shared message communication system in the computer system 105 on a vehicle that provides efficient communication between two or more modules 109, such as shown in FIG. 3. In various embodiments, a single topic registry 410 may interact with two or more message caches 420, 425, 430 to enable a publisher node to write messages related to a topic to a message cache configured to store messages for that topic, and to enable multiple subscriber nodes to read messages stored on any of the message caches 420, 425, 430.
The subject registry 410 is a single registry for storing information related to messages published by all nodes 141 in the system. The topic registry 410 includes topic records 411, 412, 413 associated with each message stored in each of the message buffers 420, 425, 430 (e.g., topic record 411 pertains to messages stored in the message buffer 420, topic record 412 pertains to messages stored in the message buffer 425, and topic record 413 pertains to messages stored in the message buffer 430). For each message stored in the message caches 420, 425, 430, the topic registry 410 includes information for a publisher node to write a message to one of the message caches 420, 425, 430 and information for a subscriber node to read a message from one of the message caches 420, 425, 430. For example, the topic registry 410 may correspond to each message including the address of the message cache in which the message is stored, the name of the topic associated with each message, and the frequency of messages for which a topic is expected to be published.
The message buffers 420, 425, 430 may be implemented on one or more storage devices. In some embodiments, two or more message buffers may be implemented on the same storage device. Each of the message buffers 420, 425, 430 stores messages of a particular (single) topic. For example, the message buffer 420 stores messages 421, 422, 423 of a first topic, the message buffer 425 stores messages 426, 427, 428 of a second topic, and the message buffer 425 stores messages 431, 432, 433 of a third topic. Because messages relate to multiple information (e.g., sensor data, navigation, control functions), messages of one topic may differ in size (greatly) from messages of another topic. With each message buffer storing messages for a single topic, memory in each message buffer may be allocated for the expected message size of the stored messages for the topic. Each message buffer is configured as a ring buffer such that once a message is written to the last available storage location in the buffer, the buffer wraps around to the beginning of the buffer as indicated by connection 435 and the writing of the message or other messages can continue.
FIG. 5 is a schematic diagram of an example of a shared propagator communication system that can be implemented in a computer system on a vehicle, showing a representative architecture including a topic registry, two or more message buffers, and a communication channel for each of a plurality of nodes to publish messages for a topic and subscribe to messages of various topics published by one or more of the other plurality of nodes. FIG. 5 illustrates the subject registry 410 and message buffers 420, 425, 430 shown in FIG. 4 in communication with one another, which may be or be considered to be communicating via communication buses 505, 510, 515, 520 connecting each node 141a-o to each subject registry 410 and each of the applicable message buffers 420, 425, 430. That is, the shared memory read/write function of operation may be considered a communication bus. For example, a publisher node of the plurality of nodes 141 writes to a message cache or a subscriber node of the plurality of nodes 141 reads from. Thus, as used herein, the term "communication bus" is a broad term that may include any hardware or software that allows shared memory read operations and shared memory write operations.
The communication bus, represented in FIG. 5 as communication buses 505, 510, 515, 520, may be any suitable bus structure suitable for coupling node 141 to one or more message buffers of the topic registry 410 and message buffers 420, 425, 430 as needed for publication and subscription messages. Although the communication buses are shown in the schematic of fig. 5 as portions 505, 510, 515, and 520, they may be represented as a single bus communication structure. In various embodiments, the communication bus may include any suitable hardware and software for wired or wireless coupling of node 141 to the subject registry 410 and node 141 and message caches 420, 425, 430 to perform the operational functions described herein, and may include any suitable hardware and software for message and information transfer between the subject registry 410 and node 141 and message caches 420, 425, 430 and node 141.
In this architecture, any one of the nodes 141 that is a publishing node may access the subject registry 410 via the communication buses 505, 515, 520 and may access an applicable one of the message buffers 420, 425, 430 via the communication buses 520, 515, 510 to write a message to the applicable message buffer and the subject registry associated with the written message. Any one of the nodes 141 that is a subscriber node may access the topic registry 410 via portions of the communication buses 520, 515, 505 and may access an applicable one of the message caches 420, 425, 430 via portions of the communication buses 520, 515, 510 to read messages from the shared store on the applicable message cache.
Fig. 6 is a schematic diagram of an example of an embodiment of a topic registry 410 and a message cache associated therewith that stores messages for a particular topic. The topic registry 410 includes entries for each message in the message cache, e.g., topic records 411, 412, 413. The topic record includes information that the publishing node accesses to know where to begin writing new messages into the message cache associated with the topic. The topic record also includes information that the subscriber node can access to know where to read the messages to which it subscribes. As can be appreciated by those skilled in the art, various embodiments may include various representations of such index information, and what is described herein is merely an example relating to such information and is not intended to limit the information that can be used.
Each record pertaining to a separate message buffer. In this example, each topic record 411, 412, 413 pertains to a corresponding message stored in a respective message buffer 421, 422, 423. The information in the subject record may indicate where the written message ends (e.g., the "tail _ offset" variable). The information in the subject record may indicate where the message being written ends (e.g., a "pending _ tail _ offset" variable), which indicates how much memory the message being written will use in the message buffer. the tail _ offset variable indicates where the written message ends in the message buffer and is used by the subscriber node to indicate where to begin reading new messages. The pending _ tail _ offset variable indicates where a message being written to the message buffer will end and is set by the publisher node when writing a message to indicate the space allocated for that message. Each message buffer 420, 425, 430 includes messages associated with a topic for each message entry in the topic registry associated with the topic. In various embodiments, each message may include additional information related to the message (e.g., at the beginning of the message or at the end of the message). For example, the information may include a message size, which indicates the size of the message content and any additional padding in the message. Various indexing schemes may be used in the topic registry and the message cache to facilitate efficient writing of messages to the message cache and recording information about such messages in the topic registry to allow subscriber nodes and publisher nodes to efficiently access the message cache in the topic registry to read and write messages.
FIG. 7 is a flowchart illustration of an example of a method for a node to publish messages on a particular topic in a shared memory messaging system that enables a node 705 to publish messages for reading by other nodes, which may be performed on a shared memory messaging system such as that shown in FIG. 5. As above, a node may represent a module 109 (FIG. 2) that performs some function in the vehicle's computer system 105. Accordingly, in this and other portions of this disclosure, unless the context of the reference indicates otherwise, the reference to node 141 corresponds to module 109, and vice versa.
At block 710, the node generates a message to be published. Such as images collected from sensors on the vehicle. At block 715, the node accesses the subject registry via the communication bus and reads information from the subject registry indicating which message bus to write the message to and where in the message bus the node should begin writing the message. In the case where there is only one publisher node per topic, the message buffer may be known, and it may also be known where to stop writing messages in the message buffer, so that the pathname of the location where the message is written may be known in advance. In such cases, the publisher node topic registry may be accessed to update information about the messages being published to enable subscriber nodes to access new messages. For example, at block 720, the publisher node determines where the message will end in the message cache, and may update this information into the topic registry at block 725. At block 730, the publisher node writes the message to a message cache associated with the subject of the message it is publishing. Because these operations include nodes writing to a shared memory location rather than message transfers between two processes, accessing the subject registry to write and read information and accessing the message buffer to write messages need not pass through the computer system kernel.
FIG. 8 is a flowchart illustration of an example of a method of node subscription (or reading) of messages on a particular topic in a shared memory messaging system that enables a subscriber node 805 to subscribe to messages for publication by one or more nodes, such as may be performed on the shared memory messaging system shown in FIG. 5. At block 810, the subscriber node 805 checks the topic registry for information indicating new messages for published topics. In one embodiment, the topic registry will have a counter for each particular topic of the published message. Each subscriber node for the topic will also have a counter to indicate how many messages for the topic have been read. By comparing the subscriber counter to the topic registry counter, the subscriber node may determine whether a new message has been published (e.g., when the counter of the topic registry is greater than the counter of the subscriber node).
When a new message is available, at block 815 the subscriber node determines a starting point for reading the new message from the topic registry, and at block 820 the subscriber node determines the address of the message cache in which the message is stored (if needed). At block 825, the subscriber node uses the information provided by the topic registry to read the new message from the message cache. Because these operations include nodes reading from a shared memory location rather than message transfers between two processes, accessing the subject registry to read information and accessing the message cache to read messages need not pass through the computer system kernel. At block 830, the subscriber node determines that there is another message to read (e.g., compares the subscriber counter of messages read by the subscriber node for a topic with a topic registry counter indicating the number of messages written for a topic). If a new message is available, the process returns to block 815 where the subscriber node determines a starting point for reading the new message. If it is determined that there is no other message to read at this time, process 800 returns to block 810 where the subscriber node continues to periodically check to see if a new message has been published relating to the topic to which it subscribes.
In various embodiments, a number of different processes may be implemented to read and write information from and to the subject registry, and to read and write messages from and to the message cache. The following is an example of process operations that may be performed in some embodiments to set certain variables associated with the topic registry, message cache, and publisher/subscriber nodes. As can be appreciated by those skilled in the art, there are many ways to name and define the variables associated with reading and writing information and messages to the subject registry and message cache, and the following process operations are merely examples and are not intended to limit the features of any of the embodiments described herein.
Initial state
Tail _ offset and pending _ tail _ offset are initialized with values in the existing shared memory file. If a shared memory file is created, both are initialized to zero.
For each reader: head _ offset is tail _ offset.
Writing process
pending_tail_offset=std::max(tail_offset+msg_size,pending_tail_offset)
actual_size=WriteMessage(msg_bytes)
tail_offset+=actual_size
Reading algorithm
if head_offset==tail_offset:
// no new messages written by the publisher.
return EAGAIN
msg_size=ReadMessageSize(head_offset)
if pending_tail_offset>head_offset+shm_body_size:
The publisher has overwritten the memory just read.
// reset the head to a known safe position.
head_offset=tail_offset
return EAGAIN
msg_bytes=ReadMessageBytes(head_offset,msg_size)
if pending_tail_offset>head_offset+sizeof(msg_header)+shm_body size:
The publisher has overwritten the memory just read.
// reset the head to a known safe position.
head_offset=tail_offset
return EAGAIN
head_offset+=msg_size
return msg_size,msg_bytes
Fig. 7 and 8 depict an innovative method of communicating messages between modules in a system on a vehicle, each of which is configured as a publisher node that writes messages, a subscriber node that reads messages, or both a publisher node and a subscriber node that collectively form nodes that communicate when operating the vehicle. An example of such a method includes generating, by a publisher node of a plurality of nodes, a plurality of sets of messages. Each set of messages is associated with a single and unique topic and is generated by a single publisher node associated with the unique topic. The publisher nodes write their respective sets of messages to the memory locations of the respective message buffers, i.e., the message buffers associated with the same subject as the set of messages. Each message cache is one of a plurality of message caches configured to allow access by publisher nodes and subscriber nodes associated with topics of messages stored by the message cache, one for each of the message topics.
The publisher node may store a message by, for each message written in the message cache, writing in a registry (subject registry) certain location information indicating the location in which the message was written (to be stored). The registry is configured to store information associated with each message written in the message cache, e.g., an address of the message cache, a memory location where each message written in the message cache is stored, and a subject with which the stored message is associated. The method includes reading, by a subscriber node, new message information from a registry, the new message information indicating whether a new message associated with a particular topic is available. Each subscriber node is configured to read one or more of the sets of messages (e.g., of the topic with which they are associated). The subscriber nodes are further configured to use the new message information read from the registry to determine whether at least one new message associated with the topic associated with the respective subscriber node is available. In response to determining that at least one new message is available, determining that each subscriber node for which a new message is available for its associated topic, reading from the registry location information indicating where the at least one new message is stored. The respective subscriber node also reads at least one new message from the respective message cache.
The publisher node writing in the registry may include writing in the registry information indicating a location (e.g., a memory address) in the message buffer where the message begins and a location (e.g., a memory address) in the message buffer where the message ends. The publisher node may also write information in the registry indicating the location of the end of the message before writing the message to the message buffer is complete, which may be referred to as the tentative end (or tail) location of the message stored in the message buffer. The publisher node that generated the message may determine the message size and may use it to write the tentative location of the message to the registry. The size of the message may include the sum of the message payload or content (e.g., image) and the message pad. If the determined message size is larger than the message size allocated for storing messages in the corresponding message cache, the publisher node may, in some embodiments, reallocate the larger message storage size in the corresponding message cache.
To determine whether a new message is available for the publisher node to read, the registry may include, for each topic, a counter of new messages written to the respective message cache. Each subscriber node may also have a counter associated with each message topic to which it subscribes. For a particular topic, the subscriber node may periodically check the topic's read message counter against the topic's new message counter at the registry. A new message is indicated when the new message counter at the registry is greater than the read message counter of the subscriber node. Other implementations are possible in which the new message information at the registry indicates that a new message is available for the subscriber to read. In some embodiments, the subscriber node is not notified that a new message is available (e.g., using the above-described counters of the subscriber node and the registry). Rather, the subscriber node periodically checks for new message information on the registry and uses the new message information to determine if a new message is available for reading. Different subscriber nodes may examine new messages at different periodicities depending, for example, on the priority ranking of the messages, or on the known or publication rate of messages for a certain topic. In addition, other factors may affect the frequency with which subscriber nodes check for new messages. Such as vehicle speed, vehicle location, actions taken by the vehicle (e.g., parking, traveling in a crowded city, traveling on a rural highway), the number of other vehicles on the road, or information received from external sources of the vehicle.
In various embodiments, the configuration of the communication system for message passing operations of the subscriber nodes and publisher nodes does not require the utilization of a kernel of the host computer system, e.g., a kernel that controls vehicle operations. Unlike systems that utilize a kernel to establish a communication link between a message producer and a message recipient, the use of the described shared memory messaging system enables communication with less overhead because communication operations between publisher nodes, subscriber nodes, registries, and message buffers do not require or use another layer of overall communication management.
The techniques described herein may be implemented by one or more special-purpose computing devices. A special purpose computing device may be hardwired to perform the techniques, or may include circuitry or digital electronics, such as one or more Application Specific Integrated Circuits (ASICs) or Field Programmable Gate Arrays (FPGAs), that are continuously programmed to perform the techniques, or may include one or more hardware processors programmed to perform the techniques according to program instructions in firmware, memory, other storage, or a combination. Such special-purpose computing devices may also incorporate custom hardwired logic, ASICs or FPGAs with custom programming to implement these techniques. A specific purpose computing device may be a desktop computer system, a server computer system, a portable computer system, a handheld device, a network device, or any other device or combination of devices that incorporate hardwired and/or program logic to implement the techniques. Computing devices are typically controlled and coordinated by operating system software. Conventional operating systems control and schedule computer processes for executing, performing memory management, providing file systems, networking, I/O services, and providing user interface functions, such as a Graphical User Interface (GUI), and the like.
FIG. 9 is a block diagram that illustrates a computer system 105, such as the computer system 105 shown in FIG. 2, on which any of the embodiments described herein may be implemented. The system 105 may correspond identically to the system 105 described above, or have one or more different components. Computer system 105 includes a bus 902 or other communication mechanism for communicating information, and one or more hardware processors 904 coupled to bus 902 for processing information. For example, bus 902 may be the communication buses 505, 510, 115, and 520 shown in FIG. 5. For example, hardware processor 904 may be one or more general purpose microprocessors. Processor 904 may correspond to the processor described above with reference to computer system 105.
Computer system 105 also includes a main memory 906, such as a Random Access Memory (RAM), cache memory, and/or other dynamic storage device, coupled to bus 902 for storing information and instructions to be executed by processor 904. Main memory 906 also may be used for storing temporary variables or other intermediate information during execution of instructions to be executed by processor 904. When stored in a storage medium accessible to processor 904, the instructions cause computer system 105 to enter a special purpose machine that is customized to perform the operations specified in the instructions. In some embodiments, the instructions may cause node 141 of computer system 105 to generate a message to be published, access a topic registry and a message cache corresponding to the topic of the message to determine a location to store the message, write the message to the appropriate location in the message cache, and update the topic registry to indicate that the message has been stored and its starting location. In some embodiments, the instructions may cause node 141 of computer system 105 to determine from the topic registry whether a new message is available for reading and the location of the message, read the new message from the message cache, determine whether another message is to be read, if so, read the message, and after determining that no new message remains to be read, return to starting to periodically check the status of the topic registry by node 141 to obtain information indicating that a new message directed to the topic to which it subscribes has been published.
Computer system 105 also includes a read only memory 908 or other static storage device coupled to bus 902 for storing static information and instructions for processor 904. A storage device 910, such as a magnetic disk, optical disk or USB thumb drive (flash drive), is provided and coupled to bus 902 for storing information and instructions. The main memory 906, the read only memory 908, and/or the memory 910 may correspond to the memory 106 for storing map data described above. In some embodiments, the main memory 906 is a memory for storing map data blocks when they are used to control the vehicle 120. For example, one or more map data blocks may be initially stored on storage device 910, and then loaded into memory 906 and used to control vehicle 120, as desired, based on the methods and systems described herein.
Computer system 105 may implement the techniques of this invention using custom hardwired logic, one or more ASICs or FPGAs, firmware and/or program logic that, in combination with the computer system, render computer system 105 a special-purpose machine or program the system into a special-purpose machine. According to one embodiment, the techniques of this invention are performed by computer system 105 in response to processor 904 executing one or more sequences of one or more instructions contained in main memory 906. Such instructions may be read into main memory 906 from another storage medium, such as storage device 910. Execution of the sequences of instructions contained in main memory 906 causes processor 904 to perform the process steps described herein. In alternative embodiments, hard-wired circuitry may be used in place of or in combination with software instructions.
Main memory 906, read only memory 908, and/or storage device 910 may include non-transitory storage media. The term "non-transitory medium" and similar terms, as used herein, refers to a medium that stores data and/or instructions that cause a machine to operate in a specific manner, wherein the medium does not contain transitory signals. Such non-transitory media may include non-volatile media and/or volatile media. Non-volatile media includes, for example, optical or magnetic disks, such as storage device 910. Volatile media includes dynamic memory, such as main memory 906. For example, common forms of non-transitory media include: floppy disk, hard disk, solid state disk, magnetic tape, or any other magnetic data storage medium, CD-ROM, any other optical data storage medium, any physical medium with patterns of holes, RAM, PROM, and EPROM, FLASH-EPROM, NVRAM, any other memory chip or cartridge, and network versions thereof.
Computer system 105 also includes a communication interface 918 coupled to bus 902. Communication interface 918 provides a two-way data communication coupling to one or more network links that connect to one or more local networks. For example, communication interface 918 may be an Integrated Services Digital Network (ISDN) card, cable modem, satellite modem, or a modem to provide a data communication connection to a corresponding type of telephone line. As another example, communication interface 918 may be a local area network card to provide a data communication connection to a compatible local area network (or wide area network component in communication with a wide area network). Wireless links may also be implemented. In any such implementation, communication interface 918 sends and receives electrical, electromagnetic or optical signals that carry digital data streams representing various types of information.
Computer system 105 can send messages and receive data, including program code, through the network 925, network link 919, and communication interface 918. The network 925 may be connected to one or more server(s) 930. In the Internet example, a server might transmit a requested code for an application program through the Internet, an Internet service provider, the local network, and communication interface 918. The received code may be executed by processor 904 as it is received, and/or may be stored in storage device 910, or other non-volatile storage for later execution.
Although the present disclosure is generally described in connection with vehicle 120 operating in an autonomous driving mode, this is for illustrative purposes only and is not intended to be limiting. Any of the techniques or operations described herein may be applied to a vehicle 120 providing driver assistance features and/or for sharing travel or other location-based services.
The foregoing description details certain embodiments of the systems, devices, and methods disclosed herein. It can be appreciated, however, that no matter how detailed the foregoing appears in text, the systems, devices, and methods can be practiced in many ways. Also as stated above, it should be noted that the use of particular terminology when describing certain features or aspects of the invention should not be taken to imply that the terminology is being re-defined herein to be restricted to including specific characteristics of the features or aspects of the technology with which that terminology is associated.
Each of the processes, methods, and algorithms described in the preceding sections may be implemented by, and fully or partially automated by, code modules executed by one or more computer systems or computer processors comprising computer hardware. The processes and algorithms may be implemented in part or in whole in application specific circuitry.
The various features and processes described above may be used independently of one another or may be combined in a variety of ways. All possible combinations and sub-combinations are intended to fall within the scope of the present disclosure. Additionally, certain method or process blocks may be omitted in some embodiments. The methods and processes described herein are also not limited to any particular sequence, and the blocks or states associated therewith can be performed in other sequences as appropriate. For example, the blocks or states described may be performed in an order different than that specifically disclosed, or multiple blocks or states may be combined in a single block or state. The exemplary blocks or states may be performed serially, in parallel, or in some other manner. Blocks or states may be added to, or removed from, the disclosed exemplary embodiments. The example systems and components described herein may be configured differently than described. For example, elements may be added, removed, or rearranged as compared to the disclosed exemplary embodiments.
Various operations of the example methods described herein may be performed at least in part by algorithms. The algorithm may be embodied in program code or instructions stored in a memory (e.g., the non-transitory computer-readable storage medium described above). Such algorithms may include machine learning algorithms or models. In some embodiments, the machine learning algorithm or model may not explicitly program the computer to perform a function, but may learn from training data to produce a predictive model (trained machine learning model) that performs the function.
Various operations of the example methods described herein may be performed, at least in part, by one or more processors that are temporarily configured (e.g., via software) or permanently configured to perform the relevant operations. Whether temporarily configured or permanently configured, such a processor may constitute a processor-implemented engine operable to perform one or more operations or functions described herein.
Similarly, the methods described herein may be implemented at least in part by a processor, where one or more particular processors are examples of hardware. For example, at least some of the operations of a method may be performed by one or more processors or processor-implemented engines. In addition, one or more processors may also run in a "cloud computing" environment or as a "software as a service" (SaaS) to support the performance of related operations. For example, at least some of the operations may be performed by a group of computers (e.g., machines including multiple processors), which may be accessible through a network (e.g., the Internet) and one or more appropriate interfaces (e.g., Application Program Interfaces (APIs)).
The execution of certain operations may be distributed among multiple processors, and may reside not only within a single machine, but may be deployed across multiple machines. In some example embodiments, the processor or processor-implemented engine may be located in a single geographic location (e.g., within a home environment, an office environment, or a server farm). In other example embodiments, the processor or processor-implemented engine may be distributed across multiple geographic locations.
Throughout the specification, various examples may implement various components, operations, or structures described as single examples. Although the individual operations of one or more methods are illustrated and described as separate operations, one or more of the separate operations may be performed concurrently and nothing requires that the operations be performed in the order illustrated. Structures and functionality presented as separate components in the exemplary configurations may be implemented as a combined structure or component. Similarly, structures and functionality illustrated as separate components may be implemented as a single set of components. These and other variations, modifications, additions, and improvements thereto fall within the scope of the subject matter herein.
Although the summary of the subject matter has been described with reference to specific example embodiments, various modifications and changes may be made to the embodiments without departing from the broader scope of the embodiments of the disclosure. Such embodiments of the subject matter herein may be referred to, individually or collectively, by the term "invention" merely for convenience and without intending to voluntarily limit the scope of this application to any single disclosure or concept if more than one is in fact disclosed.
The embodiments illustrated herein are described in sufficient detail to enable those skilled in the art to practice the teachings disclosed. Other embodiments may be utilized and derived therefrom, such that structural and logical substitutions and changes may be made without departing from the scope of this disclosure. The detailed description, therefore, is not to be taken in a limiting sense, and the scope of various embodiments is defined only by the appended claims, along with the full range of equivalents to which such claims are entitled.
Any process descriptions, elements, or blocks in flow diagrams described herein and/or depicted in the drawings should be understood to potentially represent modules, segments, or portions of code which include one or more executable instructions for implementing the functions or steps of particular logic in the process. Alternative implementations are included within the scope of the embodiments described herein in which elements or functions may be deleted, executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art.
As used herein, the term "or" may be interpreted as including or not including a meaning. Further, multiple examples may be provided for the various resources, operations, or structures described herein as one example. In addition, boundaries between various resources, operations, engines, and data stores are somewhat arbitrary, and particular operations are illustrated in the context of specific illustrative configurations. Other allocations of functionality are envisioned and may fall within the scope of various embodiments of the disclosure. In general, structures and functionality presented as separate resources in the example configurations may be implemented as a combined structure or resource. Similarly, structures and functionality presented as a single resource may be implemented as separate resources. These and other variations, modifications, additions, and improvements may fall within the scope of the embodiments of the disclosure as represented in the claims that follow. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.
Conditional language, such as "can," "might," "may," or "may," unless specifically stated otherwise, or otherwise understood in the context of usage, is generally intended to convey that certain embodiments include, while other embodiments do not include, certain features, elements, and/or steps. Thus, such conditional language is not generally intended to imply that features, elements and/or steps are in any way required for one or more embodiments or that one or more embodiments necessarily include instructions for deciding, with or without user input or prompting, whether to include such features, elements and/or steps in or to be performed by any particular embodiment.
In addition, certain terminology has been used to describe embodiments of the disclosure. For example, the terms "one embodiment," "an embodiment," and "some embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Therefore, it is emphasized and should be appreciated that two or more references to "one embodiment" or "an alternative embodiment" in various portions of this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined as desired in one or more embodiments of the disclosure. Similarly, it should be appreciated that in the foregoing description of embodiments of the disclosure, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure aiding in the understanding of one or more of the various embodiments. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed subject matter requires more features than are expressly recited in each claim. Rather, the claimed subject matter does not rely on all of the features of a single foregoing disclosed embodiment.
Further, those skilled in the art will recognize that aspects of the present disclosure may be illustrated and described herein in any of a number of patentable classes or contexts, including any new and useful process, machine, manufacture, or combination thereof, or any new and useful improvement thereof. Accordingly, aspects of the present disclosure may be implemented entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in an implementation combining software and hardware, which may all generally be referred to herein as a "module," unit, "" component, "" device "or" system. Furthermore, aspects of the present disclosure may take the form of a computer program product embodied in one or more computer-readable media having computer-readable program code embodied thereon.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C + +, C #, VB, NET, Python, and the like; conventional procedural programming languages, such as the "C" programming language, Visual Basic, Fortran 2003, Perl, COBOL 2002, PHP, ABAP; dynamic programming languages such as Python, Ruby and Groovy or other programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, via the Internet using an Internet service provider) or provided in a cloud computing environment or as a service, such as a software as a service (SaaS).
Headings are included herein for reference and to aid in locating the various parts. These headings are not intended to limit the scope of the concepts described in connection therewith. Such concepts have applicability throughout the present specification.
Unless specifically stated otherwise, an extracted language such as the phrase "X, Y or at least one of Z," as conventionally used in connection with the context understood to refer to an item, term, etc., may be X, Y or Z, or any combination thereof (e.g., X, Y and/or Z). Thus, such disjunctive language is generally not intended to, and should not, imply that certain embodiments require at least one of X, at least one of Y, or at least one of Z to be present for each. Those skilled in the art will recognize that many modifications and changes may be made without departing from the scope of the described technology. Such modifications and alterations are intended to fall within the scope of the embodiments. One skilled in the art will also recognize that components included in one embodiment may be interchanged with other embodiments; one or more components from the illustrated embodiments may be included with other illustrated embodiments in any combination. For example, any of the various components described herein and/or shown in the figures may be combined, interchanged, or eliminated in other embodiments.
The phrase "based on" does not mean "based only on," unless explicitly stated otherwise. In other words, the phrase "based on" describes both "based only on" and "based at least on". Articles such as "a" or "an" should generally be construed to include one or more of the described items unless explicitly stated otherwise. Thus, phrases such as "a device configured to perform." are intended to include one or more of the recited devices.
The above description discloses several methods and materials of the present invention. The present invention is susceptible to modification of the methods and materials and alteration of the manufacturing methods and equipment. Such modifications will become apparent to those skilled in the art from the disclosure or practice of the invention disclosed herein. It is therefore intended that the invention be not limited to the particular embodiments disclosed herein, but that it cover all modifications and alternatives falling within the true scope and spirit of the invention as encompassed by the appended claims. Applicants reserve the right to submit claims to combinations and subcombinations of the disclosed inventions that are regarded as novel and nonobvious. Inventions embodied in other combinations and subcombinations of features, functions, elements, and/or properties may be claimed through amendment of these claims or presentation of new claims in this or a related application. Such amended or new claims, whether they are directed to the same invention or directed to a different invention, and whether they are different, broader, narrower or equal in scope to the original claims, are also regarded as included within the subject matter of the inventions of the present disclosure.

Claims (20)

1. A method of communicating messages between a plurality of modules in a system on a vehicle, each module of the plurality of modules configured as a publisher node that writes messages, a subscriber node that reads messages, or both a publisher node and a subscriber node that collectively form a plurality of nodes that communicate when operating the vehicle, the method comprising:
generating, by a publisher node of the plurality of nodes, a plurality of sets of messages, each set of messages associated with a unique topic and generated by a single publisher node associated with the unique topic;
writing, by the publisher node, each group of messages in the plurality of groups of messages to a memory location of a respective message cache associated with a same topic as the group of messages, the respective message cache being one of a plurality of message caches, each of the plurality of message caches being associated with one message topic;
writing, by each publisher node and for each message written to a message cache, location information in a registry indicating where the message has been written, wherein the registry is configured to store location information associating each message written to a message cache with an address of the message cache, a memory location storing each message written to a message cache, and a storage subject;
reading, by subscriber nodes, new message information from the registry, the new message information indicating whether new messages associated with a particular topic are available, each of the subscriber nodes configured to read one or more sets of the messages;
determining, by each of the subscriber nodes, using the new message information read from the registry, whether at least one new message is available that is also associated with the topic associated with the respective subscriber node;
in response to determining that at least one new message is available, reading, by each of the respective subscriber nodes, location information from the registry indicating a location at which the at least one new message is stored; and is
Reading, by each of the respective subscriber nodes, the at least one new message from the respective message cache.
2. The method of claim 1, wherein the writing in the registry comprises: writing in the registry a location indicating a start of a message in the message buffer and a location in the message buffer where the message ends.
3. The method of claim 2, wherein writing in the registry further comprises: writing information indicating a location where the message ends before writing the message to the message buffer is complete.
4. The method of claim 2, further comprising: determining, by a publisher node that generated the message, the message size, wherein the information indicating a location where the message ends in the message buffer is a tentative location determined by the size of the message.
5. The method of claim 1, wherein writing each of the plurality of sets of messages comprises, for each message, writing the size of the message.
6. The method of claim 1, wherein the size of the message comprises a sum of the message payload and message padding.
7. The method of claim 4, further comprising:
determining whether the message size is larger than a message size allocated for storing messages in the corresponding message buffer, and
in response to determining that the message size is larger, reallocating a larger message storage size in the respective message buffer.
8. The method of claim 1, further comprising: for each message topic, in the registry, a count of the number of messages for the topic stored in the corresponding message buffer is generated.
9. The method of claim 8, wherein the new message information includes a count of the number of messages for a topic stored in the respective message buffer.
10. The method of claim 9, further comprising: at each subscriber node, generating read message information including a message count for topics read by the each subscriber node.
11. The method of claim 10, wherein determining whether at least one new message associated with a topic is available comprises: at each subscriber node, comparing a count of the new messages for a topic in the new message information in the registry to a message count for a topic that the subscriber node has read, the method further comprising determining that a new message associated with the first topic is available for reading when the new message count is greater than a read-out message counter for the subscriber node.
12. The method of claim 1, wherein each of the plurality of modules is implemented on at least one processor.
13. The method of claim 1, wherein at least two subscriber nodes are associated with the same topic.
14. The method of claim 1, wherein at least one subscriber node is associated with two or more topics.
15. The method of claim 1, wherein reading from the registry comprises: reading from the registry without utilizing a kernel of the computer system.
16. The method of claim 1, wherein reading from the message buffer comprises: reading from the message cache without utilizing the kernel of the computer system.
17. The method of claim 1, wherein writing to the registry comprises: writing the registry without utilizing the kernel of the computer system.
18. The method of claim 1, wherein writing to the message buffer comprises: writing to the message cache without utilizing the kernel of the computer system.
19. The method of claim 1, wherein the registry and the plurality of message caches are configured as shared memory locations directly accessible by the publisher node.
20. The method of claim 1, wherein the registry and the plurality of message caches are configured as shared memory locations directly accessible by the subscriber node.
CN201880100665.6A 2018-12-28 2018-12-28 Message buffer for transmitting information between vehicle components Pending CN113767376A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/US2018/068038 WO2020139393A1 (en) 2018-12-28 2018-12-28 Message buffer for communicating information between vehicle components

Publications (1)

Publication Number Publication Date
CN113767376A true CN113767376A (en) 2021-12-07

Family

ID=71127406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880100665.6A Pending CN113767376A (en) 2018-12-28 2018-12-28 Message buffer for transmitting information between vehicle components

Country Status (2)

Country Link
CN (1) CN113767376A (en)
WO (1) WO2020139393A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118025049A (en) * 2024-04-15 2024-05-14 成都创科升电子科技有限责任公司 Control method and system for vehicle electric control based on scheduler and vehicle

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102859541A (en) * 2010-04-19 2013-01-02 国际商业机器公司 Controlling message delivery in publish/subscribe messaging
CN105830059A (en) * 2014-11-28 2016-08-03 华为技术有限公司 Fine pitch connector socket
CN107864694A (en) * 2016-07-21 2018-03-30 百度时代网络技术(北京)有限公司 The efficient communication among calculate node for operating automatic driving vehicle

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7203706B2 (en) * 2002-08-01 2007-04-10 Oracle International Corporation Buffered message queue architecture for database management systems with memory optimizations and “zero copy” buffered message queue
CN101222449A (en) * 2007-01-10 2008-07-16 国际商业机器公司 Publish/subscribe system
US9325650B2 (en) * 2014-04-02 2016-04-26 Ford Global Technologies, Llc Vehicle telematics data exchange
US9794340B2 (en) * 2014-09-15 2017-10-17 Ge Aviation Systems Llc Mechanism and method for accessing data in a shared memory
CN106021000B (en) * 2016-06-02 2018-06-01 北京百度网讯科技有限公司 For the shared-memory management method and apparatus of robot operating system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102859541A (en) * 2010-04-19 2013-01-02 国际商业机器公司 Controlling message delivery in publish/subscribe messaging
CN105830059A (en) * 2014-11-28 2016-08-03 华为技术有限公司 Fine pitch connector socket
CN107864694A (en) * 2016-07-21 2018-03-30 百度时代网络技术(北京)有限公司 The efficient communication among calculate node for operating automatic driving vehicle

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118025049A (en) * 2024-04-15 2024-05-14 成都创科升电子科技有限责任公司 Control method and system for vehicle electric control based on scheduler and vehicle

Also Published As

Publication number Publication date
WO2020139393A1 (en) 2020-07-02

Similar Documents

Publication Publication Date Title
US11080216B2 (en) Writing messages in a shared memory architecture for a vehicle
US11616737B2 (en) Reading messages in a shared memory architecture for a vehicle
US10747597B2 (en) Message buffer for communicating information between vehicle components
US11550623B2 (en) Distributed system task management using a simulated clock
US11327489B2 (en) Shared memory architecture for a vehicle
US10876844B2 (en) Systems and methods for loading and tracking maps on a vehicle
US20200209005A1 (en) Systems and methods for loading object geometry data on a vehicle
US11480964B2 (en) Distributed system execution using a serial timeline
CN111693055B (en) Road network change detection and local propagation of detected changes
US11397610B2 (en) Architecture for simulation clock-based simulation of distributed systems
US11409927B2 (en) Architecture for configurable distributed system simulation timing
CN114072784A (en) System and method for loading object geometric data on a vehicle
US11456890B2 (en) Open and safe monitoring system for autonomous driving platform
WO2022067295A1 (en) Architecture for distributed system simulation timing alignment
WO2020139396A1 (en) Writing messages in a shared memory architecture for a vehicle
US20230341554A1 (en) Methods and apparatus with hardware logic for pre-processing lidar data
CN113767376A (en) Message buffer for transmitting information between vehicle components
WO2020139395A1 (en) Reading messages in a shared memory architecture for a vehicle
CN113748418B (en) System and method for loading and tracking maps on a vehicle
US11809790B2 (en) Architecture for distributed system simulation timing alignment
US11669657B2 (en) Architecture for distributed system simulation with realistic timing
WO2020139389A1 (en) Shared memory architecture for a vehicle
US20230342316A1 (en) Scalable configurable chip architecture
WO2024092559A1 (en) Navigation method and corresponding device
US20240116540A1 (en) Distributed Computing System For A Vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination