Skip to content

Commit ae62781

Browse files
finished first draft of route tool tutorial
Signed-off-by: John Chrosniak <chrosniakj@gmail.com>
1 parent a4276d0 commit ae62781

7 files changed

Lines changed: 74 additions & 6 deletions

File tree

2.67 MB
Loading
1.65 MB
Loading
1.32 MB
Loading
2.33 MB
Loading
5.48 MB
Loading
-1.31 MB
Loading

tutorials/docs/navigation2_route_tool.rst

Lines changed: 74 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,94 @@ Using the Nav2 Route Tool
44
*************************
55

66
- `Overview`_
7-
- `Requirements`_
7+
- `Prerequisites`_
88
- `Tutorial Steps`_
99

1010
.. image:: images/Navigation2_route_tool/route_tool_demo.gif
11-
:width: 60%
11+
:width: 90%
1212
:align: center
1313

1414
Overview
1515
========
1616

1717
The Nav2 route tool is an Rviz panel designed to ease the process of creating and editing the route graphs used by the Nav2 Route Server.
18-
1918
Supported operations include loading in existing route graphs, adding new nodes/edges, editing existing nodes/edges, removing nodes/edges, and saving changes to a new file.
2019

21-
Requirements
20+
Prerequisites
2221
============
2322

24-
TODO
23+
Prior to using the route tool, you will need to create an occupancy grid map using the slam_toolbox package.
24+
Follow [this tutorial](https://roboticsbackend.com/ros2-nav2-generate-a-map-with-slam_toolbox/) for instructions on how to generate and save an occupancy grid map.
2525

2626
Tutorial Steps
2727
==============
2828

29-
TODO
29+
To start the route tool, open a terminal and run the command:
30+
31+
.. code-block:: bash
32+
33+
ros2 launch nav2_rviz_plugins route_tool.launch.py yaml_filename:=/path/to/map.yaml
34+
35+
This should open Rviz with the route tool panel on the left side and your occupancy grid map displayed in the center.
36+
37+
Loading a Route Graph
38+
---------------------
39+
40+
.. image:: images/Navigation2_route_tool/route_load.gif
41+
:width: 90%
42+
:align: center
43+
44+
To load in an existing route graph, click on the load button on the bottom left of the route tool panel.
45+
This will open up a file explorer so you can navigate to the existing geojson file you would like to load.
46+
After clicking open, you should see the route graph overlayed with your occupancy grid map.
47+
48+
Adding Nodes and Edges
49+
----------------------
50+
51+
.. image:: images/Navigation2_route_tool/route_add.gif
52+
:width: 90%
53+
:align: center
54+
55+
To add nodes and edges to your route graph, select the "Add" tab of the route tool panel.
56+
You can then add nodes by selecting the "Node" option and specifying coordinates for the new node.
57+
Coordinates can be specified manually or by using the "Publish Point" feature in Rviz.
58+
Once you have coordinates selected, click the "Create" button to add the node to your route graph.
59+
For edges, follow the same process with the "Edge" option selected and specifying the ID for the starting and ending node you wish to connect.
60+
61+
Editing Nodes and Edges
62+
-----------------------
63+
64+
.. image:: images/Navigation2_route_tool/route_edit.gif
65+
:width: 90%
66+
:align: center
67+
68+
To edit an existing node or edge, select the "Edit" tab of the route tool panel.
69+
You can edit an existing node by selecting the "Node" option, entering the ID of the node you wish to edit, and specifying the new coordinates for the node.
70+
Similar to adding in a node, you can enter these coordinates manually or using the "Publish Point" feature.
71+
After clicking the "Confirm" button, you should see the location of the node move.
72+
If the node has any edges connecting to it, those will be adjusted as well.
73+
Existing edges can be edited by selecting the "Edge" option, entering the ID of the edge you wish to edit, and specifying the IDs for the new starting and ending nodes.
74+
75+
Removing Nodes and Edges
76+
------------------------
77+
78+
.. image:: images/Navigation2_route_tool/route_delete.gif
79+
:width: 90%
80+
:align: center
81+
82+
To remove an existing node or edge, select the "Remove" tab of the route tool panel.
83+
Select the "Node" option if you would like to remove a node and the "Edge" option if you would like to remove an edge.
84+
Then enter the ID of the graph element you wish to remove and click the "Delete" button to remove it from the route graph.
85+
If you remove a node that has edges attached to it, those edges will be removed as well.
86+
You may need to toggle the visibility of the route graph in Rviz to see the change take effect.
87+
88+
Saving a Route Graph
89+
--------------------
90+
91+
.. image:: images/Navigation2_route_tool/route_save.gif
92+
:width: 90%
93+
:align: center
94+
95+
Once you are ready to save your route graph, click the "Save" button at the bottom right of the panel.
96+
This will then open a file explorer so you can specify where you would like to save your graph as a geojson file.
97+
After entering in a filepath and clicking "Save", your route graph should be ready for use with the Nav2 route server!

0 commit comments

Comments
 (0)