Skip to content

Adding geojson conversion for Nav2 Route Server#2

Merged
rhua-nv merged 2 commits intonvidia-isaac:mainfrom
open-navigation:main
Jul 28, 2025
Merged

Adding geojson conversion for Nav2 Route Server#2
rhua-nv merged 2 commits intonvidia-isaac:mainfrom
open-navigation:main

Conversation

@SteveMacenski
Copy link
Copy Markdown
Contributor

@SteveMacenski SteveMacenski commented Jul 23, 2025

Adds a script for converting the gml files into geojson with directional edges to make SWAGGER useful for the Nav2 Route Server.

This can be tested with the following workflow:

  • Create a gml file using SWAGGER
  • Create a geojson file from the gml file using this script
  • Create a yaml file to correspond to your map png file, if not already present
  • Update nav2_params.yaml to use default_nav_to_pose_bt_xml: $(find-pkg-share nav2_bt_navigator)/behavior_trees/navigate_on_route_graph_w_recovery.xml in the BT navigator for a route BT XML behavior
  • Run the following:
ros2 launch nav2_bringup tb4_loopback_simulation_launch.py map:=/path/to/your/map.yaml graph:=/path/to/your/graph.geojson

Happy navigating!

swagger_nav2.mp4

P.S. Great job on this work - it 'just worked' as expected without much fuss and the output format was easy to work with. I will definitely tie this work back into Nav2's docs shortly!

Signed-off-by: SteveMacenski <stevenmacenski@gmail.com>
@rhua-nv
Copy link
Copy Markdown
Collaborator

rhua-nv commented Jul 24, 2025

@rhua-nv
Copy link
Copy Markdown
Collaborator

rhua-nv commented Jul 24, 2025

Also it would be great if you could add one or two simple unit tests.

Signed-off-by: SteveMacenski <stevenmacenski@gmail.com>
@SteveMacenski
Copy link
Copy Markdown
Contributor Author

SteveMacenski commented Jul 25, 2025

@rhua-nv see updates with (cough shamelessly AI generated) tests and linters run. I tested over a few maps as well and Nav2 is happy so we're all good I think.

Note that Nav2 Route's edges are uni-directional. You'll see in the parser code that we duplicate edges forward and in reverse to give full directionality as it seems this work's intent is by default.

@rhua-nv rhua-nv merged commit 3a3a272 into nvidia-isaac:main Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants