Skip to content

Commit 21cd330

Browse files
author
Murilo Marinho
committed
Splitting gazebo information among files.
1 parent 7302544 commit 21cd330

File tree

4 files changed

+153
-146
lines changed

4 files changed

+153
-146
lines changed

docs/source/gazebo/about.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. include:: ../the_topic_is_under_heavy_construction.rst
2+
3+
About :program:`Gazebo`
4+
=======================
5+
6+
.. note::
7+
8+
Click here for the `official docs <https://gazebosim.org/docs/harmonic/getstarted/>`_ from the developers of :program:`Gazebo`.
9+
10+
:program:`Gazebo` is a robot simulator frequently mentioned when :program:`ROS2` is used. They are officially different projects although there are `clear connections <https://gazebosim.org/docs/latest/ros_installation/#summary-of-compatible-ros-and-gazebo-combinations>`_.
11+
12+
Until :program:`ROS2 Humble`, :program:`Gazebo` worked in a different way and had a different name. The older project has been renamed to :program:`Gazebo Classic`.
13+
14+
Given that this new way to use :program:`Gazebo` has started in :program:`ROS2 Jazzy`, we can expect that some edges will be rough and some functionalities missing. Nonetheless, it is reasonable to believe this will be the way to operate :program:`Gazebo` in the foreseable future.
15+
16+
For :program:`ROS2 Jazzy`, we use :program:`Gazebo Harmonic`. This replicates the strategy of having a LTS version for a given piece of software. This makes it easier for the users to learn and trust a platform without it constantly changing.
17+
18+
Beauty and usability are in the eyes of the beholder. That said, one major improvement in :program:`Gazebo` is the motion towards not needing two robot description formats. It has always been the case that a robot would have to be described twice, once for :program:`ROS2` and another for :program:`Gazebo Classic`.
19+
Although this switch might still be ongoing and some more advanced functionalities might be missing, we will work with a single ``.sdf`` file as much as possible in these tutorials.
Lines changed: 1 addition & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,9 @@
11
.. include:: ../the_topic_is_under_heavy_construction.rst
22

3-
:program:`Gazebo` quickstart
4-
============================
5-
6-
.. note::
7-
8-
Click here for the `official docs <https://gazebosim.org/docs/harmonic/getstarted/>`_ from the developers of :program:`Gazebo`.
9-
10-
:program:`Gazebo` is a robot simulator frequently mentioned when :program:`ROS2` is used. They are officially different projects although there are `clear connections <https://gazebosim.org/docs/latest/ros_installation/#summary-of-compatible-ros-and-gazebo-combinations>`_.
11-
12-
Until :program:`ROS2 Humble`, :program:`Gazebo` worked in a different way and had a different name. The older project has been renamed to :program:`Gazebo Classic`.
13-
14-
Given that this new way to use :program:`Gazebo` has started in :program:`ROS2 Jazzy`, we can expect that some edges will be rough and some functionalities missing. Nonetheless, it is reasonable to believe this will be the way to operate :program:`Gazebo` in the foreseable future.
15-
16-
For :program:`ROS2 Jazzy`, we use :program:`Gazebo Harmonic`. This replicates the strategy of having a LTS version for a given piece of software. This makes it easier for the users to learn and trust a platform without it constantly changing.
17-
18-
Beauty and usability are in the eyes of the beholder. That said, one major improvement in :program:`Gazebo` is the motion towards not needing two robot description formats. It has always been the case that a robot would have to be described twice, once for :program:`ROS2` and another for :program:`Gazebo Classic`.
19-
Although this switch might still be ongoing and some more advanced functionalities might be missing, we will work with a single ``.sdf`` file as much as possible in these tutorials.
20-
213
.. _Gazebo installation:
224

235
:program:`Gazebo` Installation
24-
------------------------------
6+
==============================
257

268
The following command will install :program:`Gazebo Harmonic` and all the pairing libraries for :program:`ROS2 Jazzy`.
279

@@ -37,130 +19,3 @@ curl_ Helps download files from the terminal.
3719
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.
3820
=========================== =================================================================================================================================================
3921

40-
Running :program:`Gazebo`
41-
-------------------------
42-
43-
After installation, :program:`Gazebo Harmonic` can be run with the following command
44-
45-
.. code-block:: console
46-
47-
gz sim
48-
49-
Which should result in something similar to the following, if the installation went well.
50-
I would recommend strongly against letting the curiosity get the best of you and clicking on the ``3d_shapes.sdf`` given that it's current freezing all my machines.
51-
Other scenes seem to be working in general.
52-
53-
.. image:: images/screen_quickstart.png
54-
:width: 100%
55-
56-
Basic functionality
57-
-------------------
58-
59-
These two official tutorials cover the basic functionality of :program:`Gazebo`. They are very well made with up-to-date images and videos. Please go through them to familiarise yourself with the basic functionality.
60-
61-
.. hint::
62-
63-
In the ``Understanding the GUI`` tutorial, you can skip the part about using ``--force-version``.
64-
The current version of :program:`Gazebo Harmonic` is ``8.9.0`` so the command would be changed to
65-
66-
.. code-block:: console
67-
68-
gz sim --force-version 8.9.0 shapes.sdf
69-
70-
71-
But you should not have multiple versions of :program:`Gazebo` installed anyway!!
72-
73-
- `Understanding the GUI <https://gazebosim.org/docs/harmonic/gui/>`_.
74-
- `Manipulating Models <https://gazebosim.org/docs/harmonic/manipulating_models/>`_
75-
76-
Fun with plugins
77-
----------------
78-
79-
.. note::
80-
81-
Apply Force Torque Plugin
82-
https://gazebosim.org/api/sim/8/apply_force_torque.html
83-
84-
Mouse Drag
85-
https://gazebosim.org/api/sim/8/mouse_drag.html
86-
87-
We can start by choosing the file :file:`ackermann_steering.sdf`
88-
89-
.. _curl: https://curl.se/
90-
.. _`lsb-release`: https://packages.debian.org/sid/lsb-release
91-
.. _gnupg: https://gnupg.org/download/
92-
93-
94-
:program:`Gazebo` and :program:`ROS2` structure
95-
-----------------------------------------------
96-
97-
A :program:`Gazebo`\-related development in :program:`ROS2` will generally have four packages for each robot or system.
98-
One example is shown below, in the official https://github.com/gazebosim/ros_gz_project_template.
99-
100-
.. code-block::
101-
:emphasize-lines: 2,5,10,15
102-
103-
.
104-
|-- ros_gz_example_application
105-
| |-- CMakeLists.txt
106-
| `-- package.xml
107-
|-- ros_gz_example_bringup
108-
| |-- CMakeLists.txt
109-
| |-- config
110-
| |-- launch
111-
| `-- package.xml
112-
|-- ros_gz_example_description
113-
| |-- CMakeLists.txt
114-
| |-- hooks
115-
| |-- models
116-
| `-- package.xml
117-
`-- ros_gz_example_gazebo
118-
|-- CMakeLists.txt
119-
|-- README.md
120-
|-- hooks
121-
|-- include
122-
|-- package.xml
123-
|-- src
124-
`-- worlds
125-
126-
This means that if you were to develop packages for a robot called ``beautiful_bot`` you'd be expected to create the four packages as follows.
127-
128-
.. code-block::
129-
130-
.
131-
|-- beautiful_bot_application
132-
|-- beautiful_bot_bringup
133-
|-- beautiful_bot_description
134-
`-- beautiful_bot_gazebo
135-
136-
According to the developers `here <https://gazebosim.org/docs/harmonic/ros_gz_project_template_guide/>`_ and `here <https://github.com/gazebosim/docs/issues/580>`_, our hypotetical packages would have the following roles.
137-
138-
================================= ==================================
139-
:file:`beautiful_bot_application` :program:`ROS2`\-specific code.
140-
:file:`beautiful_bot_bringup` Project's main launch files and robot configuration.
141-
:file:`beautiful_bot_description` The :file:`.sdf` files for robots and other simulation things.
142-
:file:`beautiful_bot_gazebo` World :file:`.sdf` file and :Program:`Gazebo` configuration.
143-
================================= ==================================
144-
145-
If you explore the :program:`ROS` packages made avialable by vendors, you will notice this structure or part of it. Some examples
146-
147-
- `Denso <https://github.com/DENSORobot/denso_robot_ros2>`_
148-
- `Kawasaki <https://github.com/Kawasaki-Robotics/khi_robot>`_
149-
- `Franka <https://github.com/frankarobotics/franka_ros2>`_
150-
151-
.. important::
152-
153-
Owing to the lifecycle of products and resource allocation (we also suffer from this at Universities), you can always expect the official packages for :program:`ROS2` and
154-
:program:`Gazebo` shipped officially by vendors to considerably lag behind.
155-
156-
:program:`Gazebo` and :program:`ROS2` example
157-
---------------------------------------------
158-
159-
.. note::
160-
161-
https://github.com/gazebosim/ros_gz_project_template
162-
163-
.. code-block:: console
164-
165-
ros2 launch ros_gz_example_bringup diff_drive.launch.py
166-

docs/source/gazebo/quickstart.rst

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
.. include:: ../the_topic_is_under_heavy_construction.rst
2+
3+
:program:`Gazebo` Quickstart
4+
============================
5+
6+
Running :program:`Gazebo`
7+
-------------------------
8+
9+
After installation, :program:`Gazebo Harmonic` can be run with the following command
10+
11+
.. code-block:: console
12+
13+
gz sim
14+
15+
Which should result in something similar to the following, if the installation went well.
16+
I would recommend strongly against letting the curiosity get the best of you and clicking on the ``3d_shapes.sdf`` given that it's current freezing all my machines.
17+
Other scenes seem to be working in general.
18+
19+
.. image:: images/screen_quickstart.png
20+
:width: 100%
21+
22+
Basic functionality
23+
-------------------
24+
25+
These two official tutorials cover the basic functionality of :program:`Gazebo`. They are very well made with up-to-date images and videos. Please go through them to familiarise yourself with the basic functionality.
26+
27+
.. hint::
28+
29+
In the ``Understanding the GUI`` tutorial, you can skip the part about using ``--force-version``.
30+
The current version of :program:`Gazebo Harmonic` is ``8.9.0`` so the command would be changed to
31+
32+
.. code-block:: console
33+
34+
gz sim --force-version 8.9.0 shapes.sdf
35+
36+
37+
But you should not have multiple versions of :program:`Gazebo` installed anyway!!
38+
39+
- `Understanding the GUI <https://gazebosim.org/docs/harmonic/gui/>`_.
40+
- `Manipulating Models <https://gazebosim.org/docs/harmonic/manipulating_models/>`_
41+
42+
Fun with plugins
43+
----------------
44+
45+
.. note::
46+
47+
Apply Force Torque Plugin
48+
https://gazebosim.org/api/sim/8/apply_force_torque.html
49+
50+
Mouse Drag
51+
https://gazebosim.org/api/sim/8/mouse_drag.html
52+
53+
We can start by choosing the file :file:`ackermann_steering.sdf`
54+
55+
.. _curl: https://curl.se/
56+
.. _`lsb-release`: https://packages.debian.org/sid/lsb-release
57+
.. _gnupg: https://gnupg.org/download/
58+
59+
60+
:program:`Gazebo` and :program:`ROS2` structure
61+
-----------------------------------------------
62+
63+
A :program:`Gazebo`\-related development in :program:`ROS2` will generally have four packages for each robot or system.
64+
One example is shown below, in the official https://github.com/gazebosim/ros_gz_project_template.
65+
66+
.. code-block::
67+
:emphasize-lines: 2,5,10,15
68+
69+
.
70+
|-- ros_gz_example_application
71+
| |-- CMakeLists.txt
72+
| `-- package.xml
73+
|-- ros_gz_example_bringup
74+
| |-- CMakeLists.txt
75+
| |-- config
76+
| |-- launch
77+
| `-- package.xml
78+
|-- ros_gz_example_description
79+
| |-- CMakeLists.txt
80+
| |-- hooks
81+
| |-- models
82+
| `-- package.xml
83+
`-- ros_gz_example_gazebo
84+
|-- CMakeLists.txt
85+
|-- README.md
86+
|-- hooks
87+
|-- include
88+
|-- package.xml
89+
|-- src
90+
`-- worlds
91+
92+
This means that if you were to develop packages for a robot called ``beautiful_bot`` you'd be expected to create the four packages as follows.
93+
94+
.. code-block::
95+
96+
.
97+
|-- beautiful_bot_application
98+
|-- beautiful_bot_bringup
99+
|-- beautiful_bot_description
100+
`-- beautiful_bot_gazebo
101+
102+
According to the developers `here <https://gazebosim.org/docs/harmonic/ros_gz_project_template_guide/>`_ and `here <https://github.com/gazebosim/docs/issues/580>`_, our hypotetical packages would have the following roles.
103+
104+
================================= ==================================
105+
:file:`beautiful_bot_application` :program:`ROS2`\-specific code.
106+
:file:`beautiful_bot_bringup` Project's main launch files and robot configuration.
107+
:file:`beautiful_bot_description` The :file:`.sdf` files for robots and other simulation things.
108+
:file:`beautiful_bot_gazebo` World :file:`.sdf` file and :Program:`Gazebo` configuration.
109+
================================= ==================================
110+
111+
If you explore the :program:`ROS` packages made avialable by vendors, you will notice this structure or part of it. Some examples
112+
113+
- `Denso <https://github.com/DENSORobot/denso_robot_ros2>`_
114+
- `Kawasaki <https://github.com/Kawasaki-Robotics/khi_robot>`_
115+
- `Franka <https://github.com/frankarobotics/franka_ros2>`_
116+
117+
.. important::
118+
119+
Owing to the lifecycle of products and resource allocation (we also suffer from this at Universities), you can always expect the official packages for :program:`ROS2` and
120+
:program:`Gazebo` shipped officially by vendors to considerably lag behind.
121+
122+
:program:`Gazebo` and :program:`ROS2` example
123+
---------------------------------------------
124+
125+
.. note::
126+
127+
https://github.com/gazebosim/ros_gz_project_template
128+
129+
.. code-block:: console
130+
131+
ros2 launch ros_gz_example_bringup diff_drive.launch.py

docs/source/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ If you enjoyed this tutorial, please
143143
:maxdepth: 2
144144
:hidden:
145145

146+
gazebo/about
146147
gazebo/installation
148+
gazebo/quickstart
147149

148150
.. toctree::
149151
:caption: ROS2 C++ Basics

0 commit comments

Comments
 (0)