Skip to content

Communication#

Communication latency is an expression of how much time it takes for a topic message to travel from source callback to next callback.

l_{comm} = t_{sub} - t_{pub}

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.

uml diagram

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

Inter process communication#

A simplified sequence diagram focusing only on the relevant data flow is shown below.

uml diagram

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