Skip to content

Add $ to Beginner-CLI-Tools and Beginner-Client Libraires #5359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 27, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ Let's also make a new directory to store our saved recordings, just as good prac

.. code-block:: console

mkdir bag_files
cd bag_files
$ mkdir bag_files
$ cd bag_files

.. group-tab:: macOS

.. code-block:: console

mkdir bag_files
cd bag_files
$ mkdir bag_files
$ cd bag_files

.. group-tab:: Windows

.. code-block:: console

md bag_files
cd bag_files
$ md bag_files
$ cd bag_files


2 Choose a topic
Expand Down Expand Up @@ -441,15 +441,15 @@ You can see more details for :doc:`Action Introspection Demo <../../Demos/Action

Open a new terminal and run ``fibonacci_action_server``, enabling ``Action Introspection``:

.. code-block:: bash
.. code-block:: console

ros2 run action_tutorials_py fibonacci_action_server --ros-args -p action_server_configure_introspection:=contents
$ ros2 run action_tutorials_py fibonacci_action_server --ros-args -p action_server_configure_introspection:=contents

Open another terminal and run ``fibonacci_action_client``, enabling ``Action Introspection``:

.. code-block:: bash
.. code-block:: console

ros2 run action_tutorials_cpp fibonacci_action_client --ros-args -p action_client_configure_introspection:=contents
$ ros2 run action_tutorials_cpp fibonacci_action_client --ros-args -p action_client_configure_introspection:=contents

2 Check action availability
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -488,15 +488,15 @@ Action data can be recorded with topics and services at the same time.

To record specific actions:

.. code-block:: bash
.. code-block:: console

ros2 bag record --action <action_names>
$ ros2 bag record --action <action_names>

To record all actions:

.. code-block:: bash
.. code-block:: console

ros2 bag record --all-actions
$ ros2 bag record --all-actions

Run the command:

Expand Down Expand Up @@ -594,16 +594,12 @@ This is because ``ros2 bag play`` sends the action goal request data from the ba

We can also introspect action communication as ``ros2 bag play`` is playing it back to verify the ``fibonacci_action_server``.

Run this command before ``ros2 bag play`` to see the ``fibonacci_action_server``:

.. code-block:: bash

ros2 action echo --flow-style /fibonacci

You can see the action goal request from the bag file and the service response from ``fibonacci_action_server``.
Run this command before ``ros2 bag play`` to see the ``fibonacci_action_server``.
You can see the action goal request from the bag file and the service response from ``fibonacci_action_server``:

.. code-block:: console

$ ros2 action echo --flow-style /fibonacci
interface: STATUS_TOPIC
status_list: [{goal_info: {goal_id: {uuid: [34, 116, 225, 217, 48, 121, 146, 36, 240, 98, 99, 134, 55, 227, 184, 72]}, stamp: {sec: 1744953720, nanosec: 804984321}}, status: 4}]
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Enter the following command with the action type in your terminal:

Which will return:

.. code-block:: console
.. code-block:: text

# The desired heading in radians
float32 theta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,12 @@ You can find node names by using ``ros2 node list``
``ros2 node list`` will show you the names of all running nodes.
This is especially useful when you want to interact with a node, or when you have a system running many nodes and need to keep track of them.

Open a new terminal while turtlesim is still running in the other one, and enter the following command:

.. code-block:: console

$ ros2 node list

Open a new terminal while turtlesim is still running in the other one, and enter the following command.
The terminal will return the node name:

.. code-block:: console

$ ros2 node list
/turtlesim

Open another new terminal and start the teleop node with the command:
Expand All @@ -102,6 +98,7 @@ You will now see the names of two active nodes:

.. code-block:: console

$ ros2 node list
/turtlesim
/teleop_turtle

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,11 @@ Specifically, what structure of data the message expects.

$ ros2 interface show geometry_msgs/msg/Twist

.. code-block:: console
Which will return:

# This expresses velocity in free space broken into its linear and angular parts.
.. code-block:: text

# This expresses velocity in free space broken into its linear and angular parts.
Vector3 linear
float64 x
float64 y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,11 @@ Press ``Ctrl+C`` in the terminal where you ran the ``ros2 topic pub`` command to

ROS 2's logger levels are ordered by severity:

.. code-block:: console

Fatal
Error
Warn
Info
Debug
1. Fatal
2. Error
3. Warn
4. Info
5. Debug

There is no exact standard for what each level indicates, but it's safe to assume that:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ These files will add all of the required elements to your path and library paths

.. group-tab:: Windows

In a Windows command line interface:

.. code-block:: console

$ call install\setup.bat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,49 +188,31 @@ In a new terminal, run the following command from within your workspace (``ros2_

$ call install/setup.bat

Now you can confirm that your interface creation worked by using the ``ros2 interface show`` command:
Now you can confirm that your interface creation worked by using the ``ros2 interface show`` command.
The output you see in your terminal should look similar to the following:

.. code-block:: console

$ ros2 interface show tutorial_interfaces/msg/Num

should return:

.. code-block:: bash

int64 num

And
int64 num

.. code-block:: console

$ ros2 interface show tutorial_interfaces/msg/Sphere

should return:

.. code-block:: console

geometry_msgs/Point center
float64 x
float64 y
float64 z
float64 radius

And
geometry_msgs/Point center
float64 x
float64 y
float64 z
float64 radius

.. code-block:: console

$ ros2 interface show tutorial_interfaces/srv/AddThreeInts

should return:

.. code-block:: bash

int64 a
int64 b
int64 c
---
int64 sum
int64 a
int64 b
int64 c
---
int64 sum

7 Test the new interfaces
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion source/Tutorials/Beginner-Client-Libraries/Pluginlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Navigate back to the root of your workspace, ``ros2_ws``, and build your new pac

.. code-block:: console

colcon build --packages-select polygon_base polygon_plugins
$ colcon build --packages-select polygon_base polygon_plugins

From ``ros2_ws``, be sure to source the setup files:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Navigate into ``ros2_ws/src`` and create a new package:

.. code-block:: console

ros2 pkg create --build-type ament_cmake --license Apache-2.0 cpp_parameters --dependencies rclcpp
$ ros2 pkg create --build-type ament_cmake --license Apache-2.0 cpp_parameters --dependencies rclcpp

Your terminal will return a message verifying the creation of your package ``cpp_parameters`` and all its necessary files and folders.

Expand Down