Communication#
Communication latency is an expression of how much time it takes for a topic message to travel from source callback to next callback.
Info
In this definition, communication latency is affected by the scheduling of callbacks, and includes not only the communication latency of the DDS, but also the delay due to scheduling. For example, if multiple callbacks are dispatched simultaneously, the communication latency may include the execution time of other callbacks. For more information on scheduling, see Event and latency_definitions | overview.
ROS communication is performed by the subscription side for intra-process communication and inter-process communication. Since ROS communication is capable of many-to-many communication, there are cases where both intra-process and inter-process communication are performed in a single publish. In CARET, communication is divided into 1:1 pairs and latency is calculated.
Intra process communication#
A simplified sequence diagram focusing only on the relevant data flow is shown below.
to_dataframe
API returns a table which has the following columns.
Column | Type | Description |
---|---|---|
rclcpp_publish_timestamp | System time | Publish time in rclcpp. |
callback_start_timestamp | System time | Callback start time |
See also
- Trace points | rclcpp_intra_publish
- Trace points | dispatch_intra_process_subscription_callback
- Trace points | callback start
- Trace points | message_construct
- RuntimeDataProvider API
Inter process communication#
A simplified sequence diagram focusing only on the relevant data flow is shown below.
to_dataframe
API returns a table which has the following columns.
Column | Type | Description |
---|---|---|
rclcpp_publish_timestamp | System time | Publish time in rclcpp. |
rcl_publish_timestamp | System time | Publish time in rcl. |
dds_write_timestamp | System time | Publish time in rmw. |
callback_start_timestamp | System time | Callback start time. |
See also
- Trace points | message_construct
- Trace points | rclcpp_publish
- Trace points | rcl_publish
- Trace points | dds_write
- Trace points | rclcpp_ring_buffer_enqueue
- Trace points | rclcpp_ring_buffer_dequeue
- Trace points | dds_bind_addr_to_addr
- Trace points | dds_bind_addr_to_stamp
- Trace points | callback start
- Trace points | dispatch_subscription_callback
- Trace points | rmw_take
- RuntimeDataProvider API