Skip to content

Commit cfdc613

Browse files
author
Murilo Marinho
committed
Fixed some warnings, adding gazebo basics draft.
1 parent 777e28b commit cfdc613

9 files changed

Lines changed: 38 additions & 17 deletions

File tree

.devcontainer/serve_sphinx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
set -e
33

4-
# This is expected to be run at the root of the repository
4+
# This is expected to be run at the root of the repository
55
sphinx-autobuild docs/source build/html

docs/source/cpp/cpp_vent.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ In things entirely written in modern C++ (loosely C++11 and above, but C++14 and
6060

6161
Use `smart pointers <https://en.cppreference.com/w/cpp/memory>`_. In general, `std::shared_ptr <https://en.cppreference.com/w/cpp/memory/shared_ptr>`_ and, if needed, `std::unique_ptr <https://en.cppreference.com/w/cpp/memory/unique_ptr>`_.
6262

63-
If only using smart pointers you still manage to get a segmentation fault, then hats off to you.
63+
If only using smart pointers, you still manage to get a segmentation fault, then hats off to you.
6464

6565
But I can get segfaults with ``std::vector``
6666
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -69,7 +69,7 @@ As a successor of C, the standard library in C++ kept some of its predecessor's
6969

7070
For example, with trigonometric functions in C++, the error handling is `C-like <https://en.cppreference.com/w/cpp/numeric/math/math_errhandling>`_
7171

72-
For instance getting the ``acos`` of 1.1, which is invalid, will fail silently in C++. We must check if the output is ``NaN``, e.g. with
72+
For instance, getting the ``acos`` of 1.1, which is invalid, will fail silently in C++. We must check if the output is ``NaN``, e.g., with
7373

7474
.. code-block:: cpp
7575
@@ -82,7 +82,7 @@ For instance getting the ``acos`` of 1.1, which is invalid, will fail silently i
8282
std::cout << std::isnan(a) ? "the output was invalid but no exception was thrown " : a << std::endl;
8383
}
8484
85-
the same applies if we try to access beyond a vector's limits with the good and old ``operator[]``.
85+
The same applies if we try to access beyond a vector's limits with the good and old ``operator[]``.
8686
Instead of doing that, use the method ``.at()``, which `checks the bounds <https://en.cppreference.com/w/cpp/container/vector/at>`_.
8787

8888
.. code-block:: cpp
@@ -111,7 +111,7 @@ As a conclusion, find the correct function/method or throw an exception yourself
111111
But C++ makes too many copies of objects: The sonata of "I don't know `perfect forwarding <https://en.cppreference.com/w/cpp/utility/forward>`_"
112112
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113113

114-
I see this claim all the time and it has many `skill-issue <https://knowyourmeme.com/memes/skill-issue-simply-a-difference-in-skill>`_\ -related causes, but basically, it shows up more frequently in the constructors of ``std::vector`` and ``std::shared_ptr``.
114+
I see this claim all the time, and it has many `skill-issue <https://knowyourmeme.com/memes/skill-issue-simply-a-difference-in-skill>`_\ -related causes, but basically, it shows up more frequently in the constructors of ``std::vector`` and ``std::shared_ptr``.
115115

116116
Let's suppose that we have a class
117117

docs/source/gazebo/gazebo_installation.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. _Gazebo installation:
2+
3+
Gazebo Installation
4+
===================
5+
6+
The following command will install :program:`Gazebo Harmonic` and all the pairing libraries for :program:`ROS2 Jazzy`.
7+
8+
.. rli:: https://raw.githubusercontent.com/UoMMScRobotics/SFR_Gazebo/refs/heads/main/install_gazebo.sh
9+
:language: bash
10+
:lines: 5-15
11+
12+
Here is the description of the packages we are installing. You can notice that the packages are being used in the commands to add the :program:`Gazebo Harmonic` packages to our :program:`apt` sources.
13+
14+
=========================== ================================================================================================================================================
15+
curl_ Helps download files from the terminal.
16+
`lsb-release`_ The lsb_release command is a simple tool to help identify the Linux distribution being used and its compliance with the Linux Standard Base
17+
gnupg_ :program:`GnuPG` is an universal crypto engine which can be used directly from a command line prompt, from shell scripts, or from other programs.
18+
=========================== ================================================================================================================================================
19+
20+
.. _curl: https://curl.se/
21+
.. _`lsb-release`: https://packages.debian.org/sid/lsb-release
22+
.. _gnupg: https://gnupg.org/download/

docs/source/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ This is a tutorial that supposes that the user will follow it linearly. Some rea
115115
launch_configurable_nodes
116116
inspecting_parameters
117117

118+
.. toctree::
119+
:caption: Gazebo Basics
120+
:maxdepth: 2
121+
:hidden:
122+
123+
gazebo/installation
124+
118125
.. toctree::
119126
:caption: ROS2 C++ Basics
120127
:maxdepth: 2

docs/source/inspecting_parameters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ If everything is correct, we'll get
117117
118118
Set parameter successful
119119
120-
.. info::
120+
.. important::
121121

122122
Some errors are easy to debug, such as when we get the name of the Node wrong
123123

docs/source/preamble/python.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Python Basics
44
=============
55

6-
.. info::
6+
.. important::
77
This tutorial expects prior knowledge in Python and object-oriented programming.
88
As such, this section is not meant to be a comprehensive Python tutorial. You have better resources
99
made by smarter people available online, e.g. `The Python Tutorial <https://docs.python.org/3.10/tutorial/index.html>`_.

docs/source/preamble/python/editing_python_source_pycharm.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Then, you can run :program:`PyCharm` with
4747
4848
pycharm_ros2
4949
50-
.. info::
50+
.. important::
5151
We use :program:`pycharm_ros2` instead of :program:`pycharm` on purpose. This prevents our alias from misbehaving if you have another version of :program:`PyCharm` installed.
5252

5353
2024.09 Update

docs/source/preamble/ubuntu.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ So, enough of this example, let's get rid of everything with
172172
:program:`bash` redirections
173173
----------------------------
174174

175-
.. info::
175+
.. important::
176176

177177
More info is available at the `Bash Reference Manual <https://www.gnu.org/software/bash/manual/html_node/Redirections.html>`_.
178178

0 commit comments

Comments
 (0)