You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rclcpp/topics/minimal_subscriber/README.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,10 @@ This package contains a few different strategies for creating nodes which receiv
4
4
*`lambda.cpp` uses a C++11 lambda function
5
5
*`member_function.cpp` uses a C++ member function callback
6
6
*`not_composable.cpp` uses a global function callback without a Node subclass
7
-
*`wait_set.cpp` uses a `rclcpp::WaitSet` to wait and poll for data
8
-
*`static_wait_set.cpp` uses a `rclcpp::StaticWaitSet` to wait and poll for data
9
-
*`wait_set_time_triggered.cpp` uses a `rclcpp::Waitset` and a timer to poll for data periodically
7
+
*`wait_set_subscriber.cpp` uses a `rclcpp::WaitSet` to wait and poll for data
8
+
*`static_wait_set_subscriber.cpp` uses a `rclcpp::StaticWaitSet` to wait and poll for data
9
+
*`time_triggered_wait_set_subscriber.cpp` uses a `rclcpp::Waitset` and a timer to poll for data
10
+
periodically
10
11
11
12
Note that `not_composable.cpp` instantiates a `rclcpp::Node`_without_ subclassing it.
12
13
This was the typical usage model in ROS 1, but this style of coding is not compatible with composing multiple nodes into a single process.
@@ -16,9 +17,9 @@ All of these nodes do the same thing: they create a node called `minimal_subscri
16
17
When a message arrives on that topic, the node prints it to the screen.
17
18
We provide multiple examples of different coding styles which achieve this behavior in order to demonstrate that there are many ways to do this in ROS 2.
18
19
19
-
The following examples `wait_set.cpp`, `static_wait_set.cpp` and`wait_set_time_triggered.cpp`
20
-
show how to use a subscription in a node using a `rclcpp` wait-set. This is not a common use case
21
-
in ROS 2 so this is not the recommended strategy to use by-default. This strategy makes sense
22
-
in some specific situations, for example when the developer needs to have more control over
23
-
callback order execution, create custom triggering conditions or use the timeouts provided by the
24
-
wait-sets.
20
+
The following examples `wait_set_subscriber.cpp`, `static_wait_set_subscriber.cpp` and
21
+
`time_triggered_wait_set_subscriber.cpp`show how to use a subscription in a node using a `rclcpp`
22
+
wait-set. This is not a common use case in ROS 2 so this is not the recommended strategy to
23
+
use by-default. This strategy makes sense in some specific situations, for example when the
24
+
developer needs to have more control over callback order execution, to create custom triggering
25
+
conditions or to use the timeouts provided by the wait-sets.
0 commit comments