Skip to content

Commit 278c507

Browse files
Add $ to Beginner-CLI-Tools and Beginner-Client Libraires (#5359)
Signed-off-by: Nils-Christian Iseke <[email protected]> Signed-off-by: Nils-Christian Iseke <[email protected]> Signed-off-by: Christophe Bedard <[email protected]> Co-authored-by: Christophe Bedard <[email protected]>
1 parent 867cb80 commit 278c507

File tree

9 files changed

+46
-70
lines changed

9 files changed

+46
-70
lines changed

source/Tutorials/Beginner-CLI-Tools/Recording-And-Playing-Back-Data/Recording-And-Playing-Back-Data.rst

+17-21
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,22 @@ Let's also make a new directory to store our saved recordings, just as good prac
6767

6868
.. code-block:: console
6969
70-
mkdir bag_files
71-
cd bag_files
70+
$ mkdir bag_files
71+
$ cd bag_files
7272
7373
.. group-tab:: macOS
7474

7575
.. code-block:: console
7676
77-
mkdir bag_files
78-
cd bag_files
77+
$ mkdir bag_files
78+
$ cd bag_files
7979
8080
.. group-tab:: Windows
8181

8282
.. code-block:: console
8383
84-
md bag_files
85-
cd bag_files
84+
$ md bag_files
85+
$ cd bag_files
8686
8787
8888
2 Choose a topic
@@ -441,15 +441,15 @@ You can see more details for :doc:`Action Introspection Demo <../../Demos/Action
441441

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

444-
.. code-block:: bash
444+
.. code-block:: console
445445
446-
ros2 run action_tutorials_py fibonacci_action_server --ros-args -p action_server_configure_introspection:=contents
446+
$ ros2 run action_tutorials_py fibonacci_action_server --ros-args -p action_server_configure_introspection:=contents
447447
448448
Open another terminal and run ``fibonacci_action_client``, enabling ``Action Introspection``:
449449

450-
.. code-block:: bash
450+
.. code-block:: console
451451
452-
ros2 run action_tutorials_cpp fibonacci_action_client --ros-args -p action_client_configure_introspection:=contents
452+
$ ros2 run action_tutorials_cpp fibonacci_action_client --ros-args -p action_client_configure_introspection:=contents
453453
454454
2 Check action availability
455455
^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -488,15 +488,15 @@ Action data can be recorded with topics and services at the same time.
488488

489489
To record specific actions:
490490

491-
.. code-block:: bash
491+
.. code-block:: console
492492
493-
ros2 bag record --action <action_names>
493+
$ ros2 bag record --action <action_names>
494494
495495
To record all actions:
496496

497-
.. code-block:: bash
497+
.. code-block:: console
498498
499-
ros2 bag record --all-actions
499+
$ ros2 bag record --all-actions
500500
501501
Run the command:
502502

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

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

597-
Run this command before ``ros2 bag play`` to see the ``fibonacci_action_server``:
598-
599-
.. code-block:: bash
600-
601-
ros2 action echo --flow-style /fibonacci
602-
603-
You can see the action goal request from the bag file and the service response from ``fibonacci_action_server``.
597+
Run this command before ``ros2 bag play`` to see the ``fibonacci_action_server``.
598+
You can see the action goal request from the bag file and the service response from ``fibonacci_action_server``:
604599

605600
.. code-block:: console
606601
602+
$ ros2 action echo --flow-style /fibonacci
607603
interface: STATUS_TOPIC
608604
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}]
609605
---

source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Actions/Understanding-ROS2-Actions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ Enter the following command with the action type in your terminal:
249249
250250
Which will return:
251251

252-
.. code-block:: console
252+
.. code-block:: text
253253
254254
# The desired heading in radians
255255
float32 theta

source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Nodes/Understanding-ROS2-Nodes.rst

+3-6
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,12 @@ You can find node names by using ``ros2 node list``
7777
``ros2 node list`` will show you the names of all running nodes.
7878
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.
7979

80-
Open a new terminal while turtlesim is still running in the other one, and enter the following command:
81-
82-
.. code-block:: console
83-
84-
$ ros2 node list
85-
80+
Open a new terminal while turtlesim is still running in the other one, and enter the following command.
8681
The terminal will return the node name:
8782

8883
.. code-block:: console
8984
85+
$ ros2 node list
9086
/turtlesim
9187
9288
Open another new terminal and start the teleop node with the command:
@@ -102,6 +98,7 @@ You will now see the names of two active nodes:
10298

10399
.. code-block:: console
104100
101+
$ ros2 node list
105102
/turtlesim
106103
/teleop_turtle
107104

source/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,11 @@ Specifically, what structure of data the message expects.
200200
201201
$ ros2 interface show geometry_msgs/msg/Twist
202202
203-
.. code-block:: console
203+
Which will return:
204204

205-
# This expresses velocity in free space broken into its linear and angular parts.
205+
.. code-block:: text
206206
207+
# This expresses velocity in free space broken into its linear and angular parts.
207208
Vector3 linear
208209
float64 x
209210
float64 y

source/Tutorials/Beginner-CLI-Tools/Using-Rqt-Console/Using-Rqt-Console.rst

+5-7
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,11 @@ Press ``Ctrl+C`` in the terminal where you ran the ``ros2 topic pub`` command to
8787

8888
ROS 2's logger levels are ordered by severity:
8989

90-
.. code-block:: console
91-
92-
Fatal
93-
Error
94-
Warn
95-
Info
96-
Debug
90+
1. Fatal
91+
2. Error
92+
3. Warn
93+
4. Info
94+
5. Debug
9795

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

source/Tutorials/Beginner-Client-Libraries/Colcon-Tutorial.rst

+2
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ These files will add all of the required elements to your path and library paths
257257
258258
.. group-tab:: Windows
259259

260+
In a Windows command line interface:
261+
260262
.. code-block:: console
261263
262264
$ call install\setup.bat

source/Tutorials/Beginner-Client-Libraries/Custom-ROS2-Interfaces.rst

+13-31
Original file line numberDiff line numberDiff line change
@@ -188,49 +188,31 @@ In a new terminal, run the following command from within your workspace (``ros2_
188188
189189
$ call install/setup.bat
190190
191-
Now you can confirm that your interface creation worked by using the ``ros2 interface show`` command:
191+
Now you can confirm that your interface creation worked by using the ``ros2 interface show`` command.
192+
The output you see in your terminal should look similar to the following:
192193

193194
.. code-block:: console
194195
195196
$ ros2 interface show tutorial_interfaces/msg/Num
196-
197-
should return:
198-
199-
.. code-block:: bash
200-
201-
int64 num
202-
203-
And
197+
int64 num
204198
205199
.. code-block:: console
206200
207201
$ ros2 interface show tutorial_interfaces/msg/Sphere
208-
209-
should return:
210-
211-
.. code-block:: console
212-
213-
geometry_msgs/Point center
214-
float64 x
215-
float64 y
216-
float64 z
217-
float64 radius
218-
219-
And
202+
geometry_msgs/Point center
203+
float64 x
204+
float64 y
205+
float64 z
206+
float64 radius
220207
221208
.. code-block:: console
222209
223210
$ ros2 interface show tutorial_interfaces/srv/AddThreeInts
224-
225-
should return:
226-
227-
.. code-block:: bash
228-
229-
int64 a
230-
int64 b
231-
int64 c
232-
---
233-
int64 sum
211+
int64 a
212+
int64 b
213+
int64 c
214+
---
215+
int64 sum
234216
235217
7 Test the new interfaces
236218
^^^^^^^^^^^^^^^^^^^^^^^^^

source/Tutorials/Beginner-Client-Libraries/Pluginlib.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Navigate back to the root of your workspace, ``ros2_ws``, and build your new pac
276276

277277
.. code-block:: console
278278
279-
colcon build --packages-select polygon_base polygon_plugins
279+
$ colcon build --packages-select polygon_base polygon_plugins
280280
281281
From ``ros2_ws``, be sure to source the setup files:
282282

source/Tutorials/Beginner-Client-Libraries/Using-Parameters-In-A-Class-CPP.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Navigate into ``ros2_ws/src`` and create a new package:
4545

4646
.. code-block:: console
4747
48-
ros2 pkg create --build-type ament_cmake --license Apache-2.0 cpp_parameters --dependencies rclcpp
48+
$ ros2 pkg create --build-type ament_cmake --license Apache-2.0 cpp_parameters --dependencies rclcpp
4949
5050
Your terminal will return a message verifying the creation of your package ``cpp_parameters`` and all its necessary files and folders.
5151

0 commit comments

Comments
 (0)