ROS Data Transmission via Shared Memory Template Traversal
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current data transmission methods in robot operating systems are inefficient due to time-consuming serialization and deserialization processes and excessive memory usage from repeated data copying.
Innovation Solution
A method and apparatus that traverse data templates in shared memory to identify and utilize templates not being written into or read from, allowing direct writing and reading of data without serialization, thereby improving transmission performance and reducing memory occupancy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If streaming data transmission technology with serialization and deserialization is used, then data can be transmitted between nodes, but the transmission process becomes time-consuming and data transmission performance degrades
Solution Approach 1:
The patent extracts and removes the serialization and deserialization steps from the data transmission process. By using data templates that define the structure and type of data beforehand, the system can directly transmit raw data between nodes without converting it to a serialized format, thereby eliminating the time-consuming serialization and deserialization operations while maintaining data transmission capability
Solution Approach 2:
The patent applies preliminary action by pre-defining data templates that specify the structure, type, and format of data before transmission occurs. These templates are established in advance, allowing the transmitting node to directly write raw data into the template structure without needing to serialize it during the transmission process, thus eliminating the time loss associated with serialization
2Reliability
If streaming data transmission with repeated copying is used, then data can be transmitted between nodes, but considerable memory space is occupied
Solution Approach 1:
The patent merges the data storage and transmission functions by using shared memory that is directly accessible by multiple nodes. Instead of copying data through multiple intermediate buffers during transmission, the system allows nodes to access and operate on the same data in shared memory, thereby reducing memory space occupation while maintaining data transmission capability
Solution Approach 2:
The patent eliminates unnecessary copying operations by allowing direct access to data in shared memory. The receiving node can directly read and process the data without requiring multiple copies to be created during the transmission process, thus reducing the quantity of memory space occupied while preserving reliable data transmission
3Productivity
If data templates are traversed and monitored to find available templates, then direct data writing is enabled improving transmission performance, but the template traversal process adds computational overhead
Solution Approach 1:
The patent applies periodic action by implementing a cyclic monitoring mechanism for data template availability. Instead of continuously checking or using complex real-time allocation algorithms, the system periodically checks template status and uses simple sequential traversal, balancing the computational overhead of template management with the benefit of direct data writing and improved transmission efficiency
Data Source
AI summary
This disclosure discloses a method and apparatus for transmitting data in a robot operating system. The robot operating system includes a transmitting node, a receiving node, and a shared memory as a transmission medium between the transmitting and receiving nodes. The method in a particular embodiment includes: traversing, by the transmitting node, a sequence of data templates stored in advance in the shared memory, and determining whether the respective data templates in the sequence of data templates are currently being written into or read from; identifying a data template in the sequence of data templates currently being neither written into nor read from as a target data template, and obtaining information of the target data template; and writing data into the target data template according to the information of the target data template. This embodiment can improve the performance of transmitting the data while occupying less memory resources.


