From 584cff1bb8c46b6f3166e2d634b86ebe23d316e8 Mon Sep 17 00:00:00 2001 From: mnhaqq <118978306+mnhaqq@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:19:10 +0000 Subject: [PATCH 1/5] Update Understanding-ROS2-Topics.rst Introduce bw and find commands to understanding topics tutorial Signed-off-by: mnhaqq <118978306+mnhaqq@users.noreply.github.com> --- .../Understanding-ROS2-Topics.rst | 53 +++++++++++++++++-- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst b/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst index 65c7683d23b..807beec9d19 100644 --- a/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst +++ b/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst @@ -313,7 +313,7 @@ If the message does not use a full header, but just has a field with type ``buil 8 ros2 topic hz ^^^^^^^^^^^^^^^ -For one last introspection on this process, you can view the rate at which data is published using: +You can also view the rate at which data is published using: .. code-block:: console @@ -329,11 +329,58 @@ It will return data on the rate at which the ``/turtlesim`` node is publishing d Recall that you set the rate of ``turtle1/cmd_vel`` to publish at a steady 1 Hz using ``ros2 topic pub --rate 1``. If you run the above command with ``turtle1/cmd_vel`` instead of ``turtle1/pose``, you will see an average reflecting that rate. -.. 9 rqt_plot +9 ros2 topic bw +^^^^^^^^^^^^^^^ + +The bandwidth used by a topic can be viewed using: + +.. code-block:: console + + ros2 topic bw /turtle1/pose + +It returns the bandwidth utilization and number of messages being published ``pose`` on the topic. + +.. code-block:: console + + Subscribed to [/turtle1/pose] + 1.51 KB/s from 62 messages + Message size mean: 0.02 KB min: 0.02 KB max: 0.02 KB + +The number of messages can be verified by running the ``echo`` command. +If you run the above command with ``turtle1/cmd_vel`` instead of ``turtle1/pose``, the number of messages should be 2. + +10 ros2 topic find +^^^^^^^^^^^^^^^ + +To list a list of available topics of a given type use: + +.. code-block:: console + + ros2 topic find + +Recall that the ``cmd_vel`` topic has the type: + +.. code-block:: console + + geometry_msgs/msg/Twist + +Using the ``find`` command outputs topics available when given the message type: + +.. code-block:: console + + ros2 topic find geometry_msgs/msg/Twist + +This outputs: + +.. code-block:: console + + /turtle1/cmd_vel + +.. 10 rqt_plot ^^^^^^^^^^ Can't do this section now because there's some significant UI issues with rqt_plot for ROS 2 -9 Clean up +11 Clean up ^^^^^^^^^^ At this point you'll have a lot of nodes running. From 221097be521d9cc33d9e3ced0c7cc3b0868c61bd Mon Sep 17 00:00:00 2001 From: mnhaqq <118978306+mnhaqq@users.noreply.github.com> Date: Fri, 4 Oct 2024 08:11:01 +0000 Subject: [PATCH 2/5] Update Understanding-ROS2-Topics.rst Rephrase description of bw command for clarity Fixes #4610 Signed-off-by: mnhaqq <118978306+mnhaqq@users.noreply.github.com> --- .../Understanding-ROS2-Topics.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst b/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst index 807beec9d19..b4108fa3ba9 100644 --- a/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst +++ b/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst @@ -346,11 +346,11 @@ It returns the bandwidth utilization and number of messages being published ``po 1.51 KB/s from 62 messages Message size mean: 0.02 KB min: 0.02 KB max: 0.02 KB -The number of messages can be verified by running the ``echo`` command. -If you run the above command with ``turtle1/cmd_vel`` instead of ``turtle1/pose``, the number of messages should be 2. +The number of messages in the output above can be verified by running the ``echo`` command and manually counting the number of messages in the output. +If you run the ``bw`` command with ``turtle1/cmd_vel`` instead of ``turtle1/pose``, the number of messages should be 2. 10 ros2 topic find -^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^ To list a list of available topics of a given type use: @@ -377,11 +377,11 @@ This outputs: /turtle1/cmd_vel .. 10 rqt_plot - ^^^^^^^^^^ + ^^^^^^^^^^^ Can't do this section now because there's some significant UI issues with rqt_plot for ROS 2 11 Clean up -^^^^^^^^^^ +^^^^^^^^^^^ At this point you'll have a lot of nodes running. Don't forget to stop them by entering ``Ctrl+C`` in each terminal. From b5def0e3b5cec53a7953b875bdf5e041045243be Mon Sep 17 00:00:00 2001 From: mnhaqq <118978306+mnhaqq@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:11:21 +0000 Subject: [PATCH 3/5] Update Understanding-ROS2-Topics.rst Remove redundant lines Signed-off-by: mnhaqq <118978306+mnhaqq@users.noreply.github.com> --- .../Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst b/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst index b4108fa3ba9..70cea8f9296 100644 --- a/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst +++ b/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst @@ -346,9 +346,6 @@ It returns the bandwidth utilization and number of messages being published ``po 1.51 KB/s from 62 messages Message size mean: 0.02 KB min: 0.02 KB max: 0.02 KB -The number of messages in the output above can be verified by running the ``echo`` command and manually counting the number of messages in the output. -If you run the ``bw`` command with ``turtle1/cmd_vel`` instead of ``turtle1/pose``, the number of messages should be 2. - 10 ros2 topic find ^^^^^^^^^^^^^^^^^^ From fe8f5ccbdb9676c447639abc9452a0ad9d0b424b Mon Sep 17 00:00:00 2001 From: mnhaqq <118978306+mnhaqq@users.noreply.github.com> Date: Tue, 8 Oct 2024 00:22:18 +0000 Subject: [PATCH 4/5] Update Understanding-ROS2-Topics.rst Signed-off-by: mnhaqq <118978306+mnhaqq@users.noreply.github.com> --- .../Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst b/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst index 70cea8f9296..75b550f93b8 100644 --- a/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst +++ b/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst @@ -344,7 +344,7 @@ It returns the bandwidth utilization and number of messages being published ``po Subscribed to [/turtle1/pose] 1.51 KB/s from 62 messages - Message size mean: 0.02 KB min: 0.02 KB max: 0.02 KB + Message size mean: 0.02 KB min: 0.02 KB max: 0.02 KB 10 ros2 topic find ^^^^^^^^^^^^^^^^^^ From 068de3938ebf9872e1acf569bae05a6409da5227 Mon Sep 17 00:00:00 2001 From: mnhaqq <118978306+mnhaqq@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:36:42 +0000 Subject: [PATCH 5/5] Update Understanding-ROS2-Topics.rst Changes for readability and remove unnecessary lines Signed-off-by: mnhaqq <118978306+mnhaqq@users.noreply.github.com> --- .../Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst b/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst index 75b550f93b8..d47ae588e41 100644 --- a/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst +++ b/source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst @@ -338,7 +338,7 @@ The bandwidth used by a topic can be viewed using: ros2 topic bw /turtle1/pose -It returns the bandwidth utilization and number of messages being published ``pose`` on the topic. +It returns the bandwidth utilization and number of messages being published to the ``/turtle1/pose`` the topic. .. code-block:: console @@ -373,10 +373,6 @@ This outputs: /turtle1/cmd_vel -.. 10 rqt_plot - ^^^^^^^^^^^ - Can't do this section now because there's some significant UI issues with rqt_plot for ROS 2 - 11 Clean up ^^^^^^^^^^^