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: doc/Tutorials/Chain-Python.rst
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,14 @@ It allows you to store an N-long set of filters inside a single structure, makin
11
11
To demonstrate the functionality of the ``Chain`` filter in a more clear manner, we are going to add a custom filter to this tutorial.
12
12
This is going to be the ``CounterFilter`` that will be counting the number of messages passing through it.
13
13
This filter class will be a successor to the ``SimpleFilter`` class, but this is a topic for another tutorial.
14
-
15
-
.. TODO: @EsipovPA: Add message_filters.SimpleFilter tutorial reference, when ready
14
+
For more information on this topic, please refer to the `SimpleFilter for Python tutorial <https://docs.ros.org/en/kilted/p/message_filters/doc/Tutorials/SimpleFilter-Python.html>`.
16
15
17
16
Prerequisites
18
17
~~~~~~~~~~~~~
19
18
20
19
This tutorial assumes you have a working knowledge of ROS 2.
21
20
22
-
If you have not done so already `create a workspace <https://docs.ros.org/en/rolling/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html>`_ and `create a package <https://docs.ros.org/en/rolling/Tutorials/Beginner-Client-Libraries/Creating-Your-First-ROS2-Package.html>`_
21
+
If you have not done so already `create a workspace <https://docs.ros.org/en/kilted/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html>`_ and `create a package <https://docs.ros.org/en/kilted/Tutorials/Beginner-Client-Libraries/Creating-Your-First-ROS2-Package.html>`_
23
22
24
23
1. Create a Basic Node
25
24
~~~~~~~~~~~~~~~~~~~~~~
@@ -174,8 +173,7 @@ The ``add`` method increases messages count, and passes messages to the followin
174
173
The ``connectInput`` connects this filter to a previous filter's output.
175
174
The ``counter`` property grants access to the current messages count.
176
175
177
-
.. More on this succession mechanism should be in the corresponding tutorial
178
-
.. TODO: @EsipovPA Add link to the message_filters.SimpleFilter tutorial, when added.
176
+
For more information on this succession mechanism, please refer to the `SimpleFilter for Python tutorial <https://docs.ros.org/en/kilted/p/message_filters/doc/Tutorials/SimpleFilter-Python.html>`.
179
177
180
178
And now we can turn our attention to the main tutorial class, that is the ``ChainNode`` class.
181
179
For starters, let's take a look at the ``__init__`` method of this class:
@@ -201,7 +199,7 @@ For starters, let's take a look at the ``__init__`` method of this class:
201
199
self.chain_counter =0
202
200
203
201
First we declare a Quality of Service profile.
204
-
After that we initialize a basic ``ros2`` ``publisher`` that will generate the input for our filters chain.
202
+
After that we initialize a basic ``ros2`` ``publisher`` that will generate the input for our filters chain.
205
203
The chain is giong to contain three filters.
206
204
A ``Subscriber`` filter and two instances of a ``CounterFilter`` that is defined earlier.
207
205
We initialize all of those.
@@ -367,7 +365,7 @@ After that the first message passes through the all filters in chain as indicate
367
365
368
366
From this point on, all three counters increase their values as more messages are passed down the filter chain.
369
367
370
-
6. Other methods of the Chain filter interface
368
+
6. Other methods of the Chain filter interface
371
369
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
372
370
373
371
In this example we've passed the ``subscriber_filter`` object to the ``chain_filter`` as a constructor argument.
@@ -380,7 +378,7 @@ In this case, the ``subscriber_filter`` was used as an input filter for the ``ch
380
378
The other way to do it is by calling ``connectInput`` method of the ``Chain`` class.
0 commit comments