Skip to content

Commit 31175ff

Browse files
author
Murilo Marinho
committed
[create_packages.rst] Updated to jazzy
1 parent 3bd3ca3 commit 31175ff

File tree

7 files changed

+53
-60
lines changed

7 files changed

+53
-60
lines changed

docs/source/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
'sphinx_copybutton', # https://sphinx-copybutton.readthedocs.io/en/latest/
3333
'sphinx_design', # https://sphinx-design.readthedocs.io/en/latest/get_started.html
3434
"sphinxext.remoteliteralinclude" # https://github.com/wpilibsuite/sphinxext-remoteliteralinclude
35+
3536
]
3637

3738
intersphinx_mapping = {
@@ -48,7 +49,8 @@
4849
# Tried with `furo` on May 23, 2025, but somehow it didn't look right. In particular the download button wasn't as clear.
4950
html_theme_options = {
5051
"announcement": "The documentation is being updated to Jazzy in this branch. "
51-
"See <a href='https://ros2-tutorial.readthedocs.io/en/humble/'>Humble Docs</a> for the stable ones",
52+
"See <a href='https://ros2-tutorial.readthedocs.io/en/humble/'>Humble Docs</a> for the stable ones. "
53+
"Create an <a href='https://github.com/mmmarinho/ROS2_Tutorial/issues'>issue</a> for inconsistencies.",
5254
}
5355
html_title = project
5456

docs/source/create_packages.rst

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,35 @@ ROS2 has a tool to help create package templates. We can get all available optio
1010
which outputs a list of handy options to populate the package template with useful files. Namely, the four emphasized ones.
1111

1212
.. code-block:: console
13-
:emphasize-lines: 27, 29, 35, 37
14-
15-
usage: ros2 pkg create [-h] [--package-format {2,3}] [--description DESCRIPTION]
16-
[--license LICENSE]
17-
[--destination-directory DESTINATION_DIRECTORY]
18-
[--build-type {cmake,ament_cmake,ament_python}]
19-
[--dependencies DEPENDENCIES [DEPENDENCIES ...]]
20-
[--maintainer-email MAINTAINER_EMAIL]
21-
[--maintainer-name MAINTAINER_NAME] [--node-name NODE_NAME]
22-
[--library-name LIBRARY_NAME]
23-
package_name
24-
25-
Create a new ROS 2 package
26-
27-
positional arguments:
28-
package_name The package name
29-
30-
options:
31-
-h, --help show this help message and exit
32-
--package-format {2,3}, --package_format {2,3}
33-
The package.xml format.
34-
--description DESCRIPTION
35-
The description given in the package.xml
36-
--license LICENSE The license attached to this package; this can be an arbitrary
37-
string, but a LICENSE file will only be generated if it is one
38-
of the supported licenses (pass '?' to get a list)
39-
--destination-directory DESTINATION_DIRECTORY
40-
Directory where to create the package directory
41-
--build-type {cmake,ament_cmake,ament_python}
42-
The build type to process the package with
43-
--dependencies DEPENDENCIES [DEPENDENCIES ...]
44-
list of dependencies
45-
--maintainer-email MAINTAINER_EMAIL
46-
email address of the maintainer of this package
47-
--maintainer-name MAINTAINER_NAME
48-
name of the maintainer of this package
49-
--node-name NODE_NAME
50-
name of the empty executable
51-
--library-name LIBRARY_NAME
52-
name of the empty library
13+
:emphasize-lines: 19,21,27, 29
14+
15+
usage: ros2 pkg create [-h] [--package-format {2,3}] [--description DESCRIPTION] [--license LICENSE] [--destination-directory DESTINATION_DIRECTORY] [--build-type {cmake,ament_cmake,ament_python}]
16+
[--dependencies DEPENDENCIES [DEPENDENCIES ...]] [--maintainer-email MAINTAINER_EMAIL] [--maintainer-name MAINTAINER_NAME] [--node-name NODE_NAME] [--library-name LIBRARY_NAME]
17+
package_name
18+
19+
Create a new ROS 2 package
20+
21+
positional arguments:
22+
package_name The package name
23+
24+
options:
25+
-h, --help show this help message and exit
26+
--package-format {2,3}, --package_format {2,3}
27+
The package.xml format.
28+
--description DESCRIPTION
29+
The description given in the package.xml
30+
--license LICENSE The license attached to this package; this can be an arbitrary string, but a LICENSE file will only be generated if it is one of the supported licenses (pass '?' to get a list)
31+
--destination-directory DESTINATION_DIRECTORY
32+
Directory where to create the package directory
33+
--build-type {cmake,ament_cmake,ament_python}
34+
The build type to process the package with
35+
--dependencies DEPENDENCIES [DEPENDENCIES ...]
36+
list of dependencies
37+
--maintainer-email MAINTAINER_EMAIL
38+
email address of the maintainer of this package
39+
--maintainer-name MAINTAINER_NAME
40+
name of the maintainer of this package
41+
--node-name NODE_NAME
42+
name of the empty executable
43+
--library-name LIBRARY_NAME
44+
name of the empty library

docs/source/editing_python_source.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ With the project correctly configured, you can
2121
1. move to :menuselection:`src --> python_package_with_a_node --> python_package_with_a_node`.
2222
2. double (left) click :program:`sample_python_node.py` to open the source code, showing the contents of the Node. It is minimal to the point that it doesn't have anything related to :program:`ROS` at all.
2323

24-
.. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_with_a_node/sample_python_node.py
24+
.. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/sample_python_node.py
2525
:language: python
2626
:linenos:
27+
2728
3. right click :program:`sample_python_node.py` and choose :menuselection:`Debug sample_python_node`
2829

2930
It will output in :program:`PyCharm`'s console

docs/source/preamble.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/source/preamble/python/python_best_practices.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ because our file does not have the permission to run as an executable. To give i
162162
163163
and now we can run it properly with
164164

165-
.. code-block:: commandline
165+
.. code-block:: console
166166
167167
cd ~/ros2_tutorials_preamble/python/minimalist_package/minimalist_package
168168
./minimalist_script.py
@@ -448,14 +448,14 @@ For a quick jolt of instant gratification, let's run the tests before we proceed
448448

449449
There are many ways to run tests written with :code:`unittest`. The following will run all tests found in the folder :file:`test`
450450

451-
.. code-block:: commandLine
451+
.. code-block:: console
452452
453453
cd ~/ros2_tutorials_preamble/python/minimalist_package
454454
python -m unittest discover -v test
455455
456456
which will output
457457

458-
.. code-block:: commandLine
458+
.. code-block:: console
459459
460460
test_attribute (test_minimalist_class.TestMinimalistClass) ... ok
461461
test_get_set_private_attribute (test_minimalist_class.TestMinimalistClass) ... ok

docs/source/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ sphinx-design
44
sphinx-rtd-theme
55
sphinxext-remoteliteralinclude
66
sphinx-book-theme
7+
sphinxcontrib-globalsubs

docs/source/workspace_setup.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,27 @@ for which the output will be something similar to
3636

3737
.. code :: console
3838
39-
Summary: 0 packages finished [0.17s]
39+
Summary: 0 packages finished [0.08s]
4040
4141
given that we have an empty workspace, no surprise here.
4242

4343
The folders :code:`build`, :code:`install`, and :code:`log` have been generated automatically by :program:`colcon`. The project structure becomes as follows.
4444

4545
.. code-block:: console
46-
:emphasize-lines: 3,4,5
46+
:emphasize-lines: 2-4
4747
4848
ros2_tutorial_workspace/
49-
└── src/
50-
└── build/
51-
└── install/
52-
└── log/
49+
|-- build
50+
|-- install
51+
|-- log
52+
`-- src
5353
54-
Inside the :code:`install` folder lie all programs etc generated by the project that can be accessed by the users.
54+
Inside the :code:`install` folder lie everything in the project that can be accessed by the users.
55+
56+
.. note::
57+
58+
An easy way to understand if something is not accessible via :program:`ROS2` commands is if they cannot be found
59+
inside your `install` folder.
5560

5661
Do the following just once, so that all terminal windows automatically source this new workspace for you.
5762

0 commit comments

Comments
 (0)