From 1c462f5916be3f41bd48b1146d0c39e3f5c643a3 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Mon, 27 May 2019 14:45:46 +0200 Subject: [PATCH] Add first version of 'message publishing' section --- doc/ros_2.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/ros_2.md b/doc/ros_2.md index f4c5cfc..fc287aa 100644 --- a/doc/ros_2.md +++ b/doc/ros_2.md @@ -187,3 +187,24 @@ sequenceDiagram end Executor->>Subscription: return_message(msg) ``` + +### Message publishing + +To publish a message, an object is first allocated and then populated by the `Component` (or equivalent). Then, the message is sent to the `Publisher` through `publish()`. This then passes that on to `rcl`, which itself passes it to `rmw`. + +TODO add inter- vs. intra-process execution flow +TODO talk about IntraProcessManager stuff? + +```mermaid +sequenceDiagram + participant Component + participant Publisher + participant rcl + participant tracetools + + Note over Component: creates a msg + Component->>Publisher: publish(msg) + Note over Publisher: ... + Publisher->>rcl: rcl_publish(rcl_publisher_t, msg) + rcl->>rmw: rmw_publisher(rmw_publisher, msg) +```