Isaac sim 4.2.0 NavMesh has no attribute 'query_navmesh_path'

When I was using Isaac sim 4.2.0 NavMesh Python API case, I couldn’t find ‘query_navmesh_dath’ on Windows 11 system version.
I also referred to relevant tutorials:
API Commands — Omniverse Extensions latest documentation (nvidia.com)
The error is displayed as follows:

2024-09-27 03:30:51 [Error] [carb.scripting-python.plugin] AttributeError: ‘omni.anim.navigation.core.bindings._omni_anim_navi’ object has no attribute ‘query_navmesh_path’
This is an official routine called navmesh-basic.usda and navmesh-basic-bevior.py

1 Like


Everything is normal in USD Composer.

Another error occurred in Isaac Sim4.1.0:

[Error][D__path__omniverse_Downloads_Assets_Isaac_4__dot__2_NVIDIA_Assets_AnimGraph_105__dot__0_Samples_Navigation_.navmesh-basic-behavior] NavMesh could not query points between Usd.Prim(</World/PathPoints/Start>) and Usd.Prim(</World/PathPoints/End>)


I suspect that query_navmesh-path may have been abandoned, and the latest one should be INavMesh.query_sthortest-path, but where is the document?
The latest official version is this, it should still be the old one: API Commands — Omniverse Extensions latest documentation

The plugin ‘omni. anim. navigation. core’={version=‘106.1.3’} has been updated for a month, why haven’t the documentation been updated? Why?

The Navigation/NavMesh extension has been updated with modified APIs that are unfortunately breaking changes from the previous Beta versions.
That particular Navigation example has a sample script on AWS that wont be updated until next release.
In the meantime, if you are creating a new script and want to perform pathfinding with the NavMesh you have first baked. Try out this code snippet as the modified usage:

        import omni.anim.navigation.core as nav

        inav = nav.acquire_interface()

        navmesh = inav.get_navmesh()
        if navmesh:
            start = carb.Float3(0, 0, 0)
            end = carb.Float3(100, 100, 0)
            navmesh_path = navmesh.query_shortest_path(start_pos=start, end_pos=end)

If the navmesh is not baked ahead of time, the get_navmesh() will return None.

The navmesh_path that is returned from query_shorted_path will have all the points that are computed.

1 Like

Thank you very much, seant.
Thank you very much for your prompt and patient answer.
After various attempts, I have finally successfully run NavMesh on Isaac Sim4.2.0.
The example path is:
Assets/Isaac/4.2/NVIDIA/Assets/AnimGraph/105.0/Samples/Navigation/
As you said, I have modified the script, and here is my modified code:

def _update_path_points(self, start_position, target_position):
# get path points from current location of character to target
inav = nav.acquire_interface()
navmesh = inav.get_navmesh()
if navmesh:
navmesh_path = navmesh.query_shortest_path(start_position, target_position)
if navmesh_path:
self.path_points = navmesh_path.get_points()
self.last_target_position = target_position
else:
carb.log_error(f"NavMesh could not query points between {self.targets[0]} and {self.targets[1]}")

    else:
        carb.log_error("No navmesh ...")

    self.time_passed_since_last_path_calculation = 0.0

On the first run, I also encountered warnings such as NavMesh not available and baking failed.
Clicking on Bake also resulted in NavMesh not available.
I suspect it may be related to the order or timing of enabling the Navigation Extension. You can also help confirm this.
Later, when I tested TestNavMesh. usda, everything was fine.
This is a screenshot of the successful operation. Thank you very much:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.