Skip to content

Commit 3e42fb6

Browse files
author
Murilo Marinho
committed
Merge branch 'main' of github.com:mmmarinho/ROS2_Tutorial
2 parents e833a12 + 1f80e15 commit 3e42fb6

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

docs/source/navigation/usage.rst

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Navigation on a known map
1919

2020
In this example, our interest is looking at how navigation can be done with built-in tools, using a known *map*. A
2121
map will have many definitions and the literature about it is extensive. For now, we can think of the map as something
22-
usual. It points out where things are, where passable (such as roads) regions are, and possibly hazards and other
23-
relevant objects.
22+
usual. It points out where things are, for instance, where passable regions (such as roads) are, and possibly hazards,
23+
obstacles, and other relevant objects.
2424

2525
In this example, a `TurtleBot3 <https://www.turtlebot.com/turtlebot3/>`_ will be used. As part of ``nav2_bringup``, there
2626
is a rather complete example that we can utilize, namely :file:`tb3_simulation_launch.py`.
@@ -36,10 +36,27 @@ is a rather complete example that we can utilize, namely :file:`tb3_simulation_l
3636
3737
ros2 launch nav2_bringup tb3_simulation_launch.py use_sim_time:=True headless:=False sigterm_timeout:=120
3838
39+
We use ``headless:=False`` for the launch file to spawn :program:`Gazebo`. We use ``use_sim_time:=True`` to make sure
40+
that :program:`Gazebo`\'s clock will be used an prevent timing issues with `/tf`.
41+
42+
This example will create a large number of nodes and open two screens. One of these will be for :program:`Gazebo` and
43+
another for :program:`rviz2`. In this example, there are two actions expected from the user.
44+
45+
#. Set the initial *2D Pose Estimate*. This can be done through :program:`rviz2`, or :program:`ROS2` interfaces.
46+
#. Send one or more *Nav2 Goal* \s.
47+
48+
An example of how to do so is shown in the video below. Please note that although I adjust :program:`Gazebo` to line
49+
up with the :program:`rviz2` view, this is for my convenience. As long as your initial estimate is fairly accurate
50+
the navigation should work fine.
51+
52+
.. raw:: html
53+
54+
<iframe width="560" height="315" src="https://www.youtube.com/embed/eoZ6lu1YWQo?si=vDkECcj_1oQtgHcl" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
55+
3956
.. warning::
4057

4158
The ``jazzy`` version of this example shows a number of errors when shutting down. This seems to be causing issues
42-
when the example is run repeatedly.
59+
when the example is run repeatedly.
4360

4461

4562
Navigation with SLAM

0 commit comments

Comments
 (0)