Patent · US10922154B1 · B1 · US
Systems and methods for inter-process communication within a robot
- (11) Publication number
- US10922154B1
- (21) Application number
- 16/890,354
- (22) Filing date
- 2020-06-02
- (30) Priority date
- 2020-06-02
- (43) Publication date
- 2021-02-16
- (45) Date of grant
- 2021-02-16
- (51) IPC
- G06F 9/44; G06F 9/54
- (52) CPC
- G06F Electric digital data processing: 9/544, 2209/547, 9/542, 9/546
- (73) Assignee
- X Development LLC
- (72) Inventors
- David Allison; Nathan Pooley; Craig Latimer
- (54) Title
- Systems and methods for inter-process communication within a robot
- (57) Abstract
A method includes creating a publisher configured to send messages over a channel having a shared memory. The method includes creating at least one subscriber configured to receive the messages over the channel by sequentially referencing memory slots of the plurality of memory slots. The method includes determining that the next sequential memory slot is currently referenced by a subscriber. The method includes delaying sending the message by the publisher based on determining that the next sequential memory slot is currently referenced by the subscriber. The method includes receiving an event trigger indicative of message reading by the subscriber. The method includes, responsive to receiving the event trigger, determining that the next sequential memory slot is not currently referenced. The method includes sending the message to the next sequential memory slot based on determining that the next sequential memory slot is not currently referenced.
- Full text
- View on Google Patents
Claims (20)
- A method comprising: creating a publisher configured to send messages over a channel having a shared memory, wherein the shared memory comprises a plurality of sequentially-related memory slots, and wherein each sent message sequentially occupies a memory slot of the plurality of memory slots; creating at least one subscriber configured to receive the messages over the channel by sequentially referencing memory slots of the plurality of memory slots; determining, at a first attempt for sending a message by the publisher, based on an indicator associated with a next sequential memory slot in the plurality of memory slots, that the next sequential memory slot is currently referenced by a subscriber; delaying sending the message by the publisher based on determining that the next sequential memory slot is currently referenced by the subscriber; receiving an event trigger indicative of message reading by the subscriber; responsive to receiving the event trigger, determining, at a second attempt for sending the message by the publisher, based on the indicator associated with the next sequential memory slot, that the next sequential memory slot is not currently referenced by any of the at least one subscriber; and sending, by the publisher, the message to the next sequential memory slot based on determining that the next sequential memory slot is not currently referenced by any of the at least one subscriber.
- The method of claim 1, wherein the message is a first message of a plurality of messages, the method further comprising: sending a second message to another sequential memory slot while the at least one subscriber reads the first message.
- The method of claim 1, further comprising: while delaying sending the message, monitoring for the event trigger, wherein responsive to receiving the event trigger, determining that the next sequential memory slot is not currently referenced by any of the at least one subscriber comprises checking the indicator associated with the next sequential memory slot directly after receiving the event trigger.
- The method of claim 1, wherein creating the at least one subscriber comprises sending an activation message to the at least one subscriber over the channel prior to the publisher sending the message.
- The method of claim 1, wherein the at least one subscriber is of a first type of subscriber, wherein the first type of subscriber is configured to change indicators for respective memory slots while referencing each respective memory slot, the method further comprising: creating at least one additional subscriber of a second type, wherein the second type of subscriber is not configured to change indicators for respective memory slots while referencing each respective memory slot.
- The method of claim 1, further comprising: determining a subscriber type for the at least one subscriber based on a task associated with the publisher.
- The method of claim 6, wherein the task of the publisher corresponds to a task of a robot, wherein the robot performs a plurality of tasks, wherein each task corresponds to a priority level, and wherein determining the subscriber type for the at least one subscriber comprises determining the subscriber type based on a priority level the task.
- The method of claim 1, further comprising, for each respective memory slot: incrementing an indicator for the respective memory slot while the subscriber reads a particular message stored in the respective memory slot; and decrementing the indicator after the subscriber moves to another sequential memory slot in the shared memory.
- The method of claim 8, further comprising, for each respective memory slot having a stored message: sending an event trigger indicating message reading by the subscriber concurrently with decrementing the indicator for the respective memory slot.
- The method of claim 1, wherein the message is a second message of a plurality of messages, further comprising, prior to determining that the next sequential memory slot is currently referenced by the subscriber: determining based on an indicator associated with a preceding sequential memory slot in the plurality of memory slots, that the preceding sequential memory slot is not currently referenced by the subscriber; and sending a first message to the preceding sequential memory slot.
- The method of claim 1, wherein the publisher is associated with a first computing device, and the at least one subscriber is associated with a second computing device.
- The method of claim 11, wherein the shared memory comprises a first shared memory on the first computing device and a second shared memory on the second computing device, wherein the second shared memory matches the first shared memory.
- The method of claim 12, further comprising: establishing a link between a first server of the first computing device and a second server of the second computing device, wherein sending the message to the next sequential memory slot comprises: sending the message to a memory slot in the first shared memory; and sending the message to a corresponding memory slot in the second shared memory.
- A system comprising: one or more processors; a non-transitory computer readable medium; and program instructions stored on the non-transitory computer readable medium and executable by the one or more processors to: create a publisher configured to send messages over a channel having a shared memory, wherein the shared memory comprises a plurality of sequentially-related memory slots, and wherein each sent message sequentially occupies a memory slot of the plurality of memory slots; create at least one subscriber configured to receive the messages over the channel by sequentially referencing memory slots of the plurality of memory slots; determine, at a first attempt for sending a message by the publisher, based on an indicator associated with a next sequential memory slot in the plurality of memory slots, that the next sequential memory slot is currently referenced by a subscriber; delay sending the message by the publisher based on determining that the next sequential memory slot is currently referenced by the subscriber; receive an event trigger indicative of message reading by the subscriber; responsive to receiving the event trigger, determine, at a second attempt for sending the message by the publisher, based on the indicator associated with the next sequential memory slot, that the next sequential memory slot is not currently referenced by any of the at least one subscriber; and send, by the publisher, the message to the next sequential memory slot based on determining that the next sequential memory slot is not currently referenced by any of the at least one subscriber.
- The system of claim 14, wherein the message is a first message of a plurality of messages, the program instructions being further executable to: send a second message to another sequential memory slot while the at least one subscriber reads the first message.
- The system of claim 14, the program instructions being further executable to: while delaying sending the message, monitor for the event trigger, wherein responsive to receiving the event trigger, determine that the next sequential memory slot is not currently referenced by any of the at least one subscriber comprises checking the indicator associated with the next sequential memory slot directly after receiving the event trigger.
- The system of claim 14, the program instructions being further executable to send an activation message to the at least one subscriber over the channel prior to the publisher sending the message.
- The system of claim 14, wherein the at least one subscriber is of a first type of subscriber, wherein the first type of subscriber is configured to change indicators for respective memory slots while referencing each respective memory slot, the program instructions being further executable to: create at least one additional subscriber of a second type, wherein the second type of subscriber is not configured to change indicators for respective memory slots while referencing each respective memory slot.
- The system of claim 14, further comprising a robot, wherein the one or more processors are comprised within the robot.
- A non-transitory computer readable medium having stored therein instructions executable by one or more processors to cause a computing system to perform functions comprising: creating a publisher configured to send messages over a channel having a shared memory, wherein the shared memory comprises a plurality of sequentially-related memory slots, and wherein each sent message sequentially occupies a memory slot of the plurality of memory slots; creating at least one subscriber configured to receive the messages over the channel by sequentially referencing memory slots of the plurality of memory slots; determining, at a first attempt for sending a message by the publisher, based on an indicator associated with a next sequential memory slot in the plurality of memory slots, that the next sequential memory slot is currently referenced by a subscriber; delaying sending the message by the publisher based on determining that the next sequential memory slot is currently referenced by the subscriber; receiving an event trigger indicative of message reading by the subscriber; responsive to receiving the event trigger, determining, at a second attempt for sending the message by the publisher, based on the indicator associated with the next sequential memory slot, that the next sequential memory slot is not currently referenced by any of the at least one subscriber; and sending, by the publisher, the message to the next sequential memory slot based on determining that the next sequential memory slot is not currently referenced by any of the at least one subscriber.
Description
A robot may have several components that communicate in order to facilitate operations in the robot. For example, a central controller may be a communications server of the robot that coordinates this communication using an inter-process communication (IPC) protocol. In such protocols, publishers are designated as communication nodes that send messages to other nodes in the system, and subscribers are designated as communication nodes that receive messages from one or more publishers. While a robot operates, certain subscribers might be crucial to performance of given tasks, and may require prompt and complete information in order to facilitate the task.
Example embodiments involve communications within a robot. A computing device within the robot can be configured to create publishers and subscribers for sending and receiving messages respectively. Example embodiments further relate to ensuring that one or more subscribers read each message sent by a corresponding publisher. Different types of subscribers within the robot may communicate with the publisher in different ways.
In an embodiment, a method is provided. The method includes creating a publisher configured to send messages over a channel having a shared memory. The shared memory comprises a plurality of sequentially-related memory slots, and wherein each sent message sequentially occupies a memory slot of the plurality of memory slots. The method includes creating at least one subscriber configured to receive the messages over the channel by sequentially referencing memory slots of the plurality of memory slots.
Citations (8)
- US7080385B1
- US20040153511A1
- US7478402B2
- EP3200132B1
- US20090064177A1
- US8452448B2
- US9984112B1
- US20170139411A1
Record as JSON
{
"publication_number": "US10922154B1",
"country": "US",
"kind": "B1",
"title": "Systems and methods for inter-process communication within a robot",
"abstract": "A method includes creating a publisher configured to send messages over a channel having a shared memory. The method includes creating at least one subscriber configured to receive the messages over the channel by sequentially referencing memory slots of the plurality of memory slots. The method includes determining that the next sequential memory slot is currently referenced by a subscriber. The method includes delaying sending the message by the publisher based on determining that the next sequential memory slot is currently referenced by the subscriber. The method includes receiving an event trigger indicative of message reading by the subscriber. The method includes, responsive to receiving the event trigger, determining that the next sequential memory slot is not currently referenced. The method includes sending the message to the next sequential memory slot based on determining that the next sequential memory slot is not currently referenced.",
"claims": [
"1. A method comprising: creating a publisher configured to send messages over a channel having a shared memory, wherein the shared memory comprises a plurality of sequentially-related memory slots, and wherein each sent message sequentially occupies a memory slot of the plurality of memory slots; creating at least one subscriber configured to receive the messages over the channel by sequentially referencing memory slots of the plurality of memory slots; determining, at a first attempt for sending a message by the publisher, based on an indicator associated with a next sequential memory slot in the plurality of memory slots, that the next sequential memory slot is currently referenced by a subscriber; delaying sending the message by the publisher based on determining that the next sequential memory slot is currently referenced by the subscriber; receiving an event trigger indicative of message reading by the subscriber; responsive to receiving the event trigger, determining, at a second attempt for sending the message by the publisher, based on the indicator associated with the next sequential memory slot, that the next sequential memory slot is not currently referenced by any of the at least one subscriber; and sending, by the publisher, the message to the next sequential memory slot based on determining that the next sequential memory slot is not currently referenced by any of the at least one subscriber.",
"2. The method of claim 1, wherein the message is a first message of a plurality of messages, the method further comprising: sending a second message to another sequential memory slot while the at least one subscriber reads the first message.",
"3. The method of claim 1, further comprising: while delaying sending the message, monitoring for the event trigger, wherein responsive to receiving the event trigger, determining that the next sequential memory slot is not currently referenced by any of the at least one subscriber comprises checking the indicator associated with the next sequential memory slot directly after receiving the event trigger.",
"4. The method of claim 1, wherein creating the at least one subscriber comprises sending an activation message to the at least one subscriber over the channel prior to the publisher sending the message.",
"5. The method of claim 1, wherein the at least one subscriber is of a first type of subscriber, wherein the first type of subscriber is configured to change indicators for respective memory slots while referencing each respective memory slot, the method further comprising: creating at least one additional subscriber of a second type, wherein the second type of subscriber is not configured to change indicators for respective memory slots while referencing each respective memory slot.",
"6. The method of claim 1, further comprising: determining a subscriber type for the at least one subscriber based on a task associated with the publisher.",
"7. The method of claim 6, wherein the task of the publisher corresponds to a task of a robot, wherein the robot performs a plurality of tasks, wherein each task corresponds to a priority level, and wherein determining the subscriber type for the at least one subscriber comprises determining the subscriber type based on a priority level the task.",
"8. The method of claim 1, further comprising, for each respective memory slot: incrementing an indicator for the respective memory slot while the subscriber reads a particular message stored in the respective memory slot; and decrementing the indicator after the subscriber moves to another sequential memory slot in the shared memory.",
"9. The method of claim 8, further comprising, for each respective memory slot having a stored message: sending an event trigger indicating message reading by the subscriber concurrently with decrementing the indicator for the respective memory slot.",
"10. The method of claim 1, wherein the message is a second message of a plurality of messages, further comprising, prior to determining that the next sequential memory slot is currently referenced by the subscriber: determining based on an indicator associated with a preceding sequential memory slot in the plurality of memory slots, that the preceding sequential memory slot is not currently referenced by the subscriber; and sending a first message to the preceding sequential memory slot.",
"11. The method of claim 1, wherein the publisher is associated with a first computing device, and the at least one subscriber is associated with a second computing device.",
"12. The method of claim 11, wherein the shared memory comprises a first shared memory on the first computing device and a second shared memory on the second computing device, wherein the second shared memory matches the first shared memory.",
"13. The method of claim 12, further comprising: establishing a link between a first server of the first computing device and a second server of the second computing device, wherein sending the message to the next sequential memory slot comprises: sending the message to a memory slot in the first shared memory; and sending the message to a corresponding memory slot in the second shared memory.",
"14. A system comprising: one or more processors; a non-transitory computer readable medium; and program instructions stored on the non-transitory computer readable medium and executable by the one or more processors to: create a publisher configured to send messages over a channel having a shared memory, wherein the shared memory comprises a plurality of sequentially-related memory slots, and wherein each sent message sequentially occupies a memory slot of the plurality of memory slots; create at least one subscriber configured to receive the messages over the channel by sequentially referencing memory slots of the plurality of memory slots; determine, at a first attempt for sending a message by the publisher, based on an indicator associated with a next sequential memory slot in the plurality of memory slots, that the next sequential memory slot is currently referenced by a subscriber; delay sending the message by the publisher based on determining that the next sequential memory slot is currently referenced by the subscriber; receive an event trigger indicative of message reading by the subscriber; responsive to receiving the event trigger, determine, at a second attempt for sending the message by the publisher, based on the indicator associated with the next sequential memory slot, that the next sequential memory slot is not currently referenced by any of the at least one subscriber; and send, by the publisher, the message to the next sequential memory slot based on determining that the next sequential memory slot is not currently referenced by any of the at least one subscriber.",
"15. The system of claim 14, wherein the message is a first message of a plurality of messages, the program instructions being further executable to: send a second message to another sequential memory slot while the at least one subscriber reads the first message.",
"16. The system of claim 14, the program instructions being further executable to: while delaying sending the message, monitor for the event trigger, wherein responsive to receiving the event trigger, determine that the next sequential memory slot is not currently referenced by any of the at least one subscriber comprises checking the indicator associated with the next sequential memory slot directly after receiving the event trigger.",
"17. The system of claim 14, the program instructions being further executable to send an activation message to the at least one subscriber over the channel prior to the publisher sending the message.",
"18. The system of claim 14, wherein the at least one subscriber is of a first type of subscriber, wherein the first type of subscriber is configured to change indicators for respective memory slots while referencing each respective memory slot, the program instructions being further executable to: create at least one additional subscriber of a second type, wherein the second type of subscriber is not configured to change indicators for respective memory slots while referencing each respective memory slot.",
"19. The system of claim 14, further comprising a robot, wherein the one or more processors are comprised within the robot.",
"20. A non-transitory computer readable medium having stored therein instructions executable by one or more processors to cause a computing system to perform functions comprising: creating a publisher configured to send messages over a channel having a shared memory, wherein the shared memory comprises a plurality of sequentially-related memory slots, and wherein each sent message sequentially occupies a memory slot of the plurality of memory slots; creating at least one subscriber configured to receive the messages over the channel by sequentially referencing memory slots of the plurality of memory slots; determining, at a first attempt for sending a message by the publisher, based on an indicator associated with a next sequential memory slot in the plurality of memory slots, that the next sequential memory slot is currently referenced by a subscriber; delaying sending the message by the publisher based on determining that the next sequential memory slot is currently referenced by the subscriber; receiving an event trigger indicative of message reading by the subscriber; responsive to receiving the event trigger, determining, at a second attempt for sending the message by the publisher, based on the indicator associated with the next sequential memory slot, that the next sequential memory slot is not currently referenced by any of the at least one subscriber; and sending, by the publisher, the message to the next sequential memory slot based on determining that the next sequential memory slot is not currently referenced by any of the at least one subscriber."
],
"description_excerpt": "A robot may have several components that communicate in order to facilitate operations in the robot. For example, a central controller may be a communications server of the robot that coordinates this communication using an inter-process communication (IPC) protocol. In such protocols, publishers are designated as communication nodes that send messages to other nodes in the system, and subscribers are designated as communication nodes that receive messages from one or more publishers. While a robot operates, certain subscribers might be crucial to performance of given tasks, and may require prompt and complete information in order to facilitate the task.\n\nExample embodiments involve communications within a robot. A computing device within the robot can be configured to create publishers and subscribers for sending and receiving messages respectively. Example embodiments further relate to ensuring that one or more subscribers read each message sent by a corresponding publisher. Different types of subscribers within the robot may communicate with the publisher in different ways.\n\nIn an embodiment, a method is provided. The method includes creating a publisher configured to send messages over a channel having a shared memory. The shared memory comprises a plurality of sequentially-related memory slots, and wherein each sent message sequentially occupies a memory slot of the plurality of memory slots. The method includes creating at least one subscriber configured to receive the messages over the channel by sequentially referencing memory slots of the plurality of memory slots.",
"cpc": [
"G06F 9/544",
"G06F 2209/547",
"G06F 9/542",
"G06F 9/546"
],
"ipc": [
"G06F 9/44",
"G06F 9/54"
],
"assignees": [
"X Development LLC"
],
"inventors": [
"David Allison",
"Nathan Pooley",
"Craig Latimer"
],
"filing_date": "2020-06-02",
"publication_date": "2021-02-16",
"grant_date": "2021-02-16",
"priority_date": "2020-06-02",
"application_number": "US-202016890354-A",
"family_id": "74569975",
"cited_by_count": 1,
"citations": [
"US7080385B1",
"US20040153511A1",
"US7478402B2",
"EP3200132B1",
"US20090064177A1",
"US8452448B2",
"US9984112B1",
"US20170139411A1"
]
}
Record 1,755 of 8,000 in Patents full text (MLC-0201). Request the full dataset.