Skip to content

Commit 9006082

Browse files
christophebedardmergify[bot]
authored andcommitted
Fix reference to code in intra-process comms tutorials (#6169)
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> (cherry picked from commit f6d5b72)
1 parent 257b027 commit 9006082

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/Tutorials/Demos/Intra-Process-Communication.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ https://github.com/ros2/demos/blob/{REPOS_FILE_BRANCH}/intra_process_demo/src/cy
256256
Unlike the previous demo, this demo uses only one Node, instantiated twice with different names and configurations.
257257
The graph ends up being ``pipe1`` -> ``pipe2`` -> ``pipe1`` ... in a loop.
258258

259-
The line ``pipe1->pub->publish(msg);`` kicks the process off, but from then on the messages are passed back and forth between the nodes by each one calling publish within its own subscription callback.
259+
The line ``pipe1->pub->publish(std::move(msg));`` kicks the process off, but from then on the messages are passed back and forth between the nodes by each one calling publish within its own subscription callback.
260260

261261
The expectation here is that the nodes pass the message back and forth, once a second, incrementing the value of the message each time.
262262
Because the message is being published and subscribed to as a ``unique_ptr`` the same message created at the beginning is continuously used.

0 commit comments

Comments
 (0)