microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.45k stars 4.58k forks source link

Nav mesh shifts position when `AirSimGameMode` is started #3704

Open blakermchale opened 3 years ago

blakermchale commented 3 years ago

Bug report

What's the issue you encountered?

When AirSimGameMode is started the nav meshes are shifted in the negative x direction and downwards. Initially, I thought the mesh disappeared, however, when the ground is hidden you can see the mesh has just moved from its original position. If I start it without AirSim everything works fine. This is an issue since some AI I am writing cannot navigate without a nav mesh.

AirSimGameMode running: image

AirSimGameMode running ground hidden: image

Default GameMode running: image

Settings

Using default.

How can the issue be reproduced?

  1. Start Blocks environment in UE 4.26.2 or UE 4.25.4
  2. Add Nav Mesh Bounds Volume to world and scale to large size
  3. Run AirSimGameMode
  4. Press F8 to eject and p to view nav meshes

Include full error message in text form

N/A

What's better than filing an issue? Filing a pull request :).

blakermchale commented 3 years ago

I found a temporary fix to the problem. If you go to Project Settings > Navigation Mesh > Runtime > Runtime Generation and set it to Dynamic instead of Static it will properly load the nav mesh.

i-am-nut commented 3 years ago

thank you very much @blakermchale i was having basically the same problem, that bug is blocking my pedestrian system to work.

for learning reasons, how did you figure out that it would solve the problem? how did you spot it?

blakermchale commented 3 years ago

I was looking up problems with the navmesh disappearing in UE4 and stumbled across this stackoverflow. It wasn't a solution to this problem, but it pointed me to that settings area. I knew there was a problem where the mesh had its position corrupted, so I tried changing the setting from Static to Dynamic in hopes that it would reload the mesh correctly and it ended up doing it.

jonyMarino commented 3 years ago

Hi @blakermchale! Thanks for keeping the issue updated. To diagnose what is happening. If you put the player start in position 0,0,0 before starting AirSim. Do you also have this issue?

blakermchale commented 3 years ago

@jonyMarino I put the players start position to 0,0,0 and it fixed the issue!

jonyMarino commented 3 years ago

Well. The center of the unreal world is shifted to the player's starting position at the beginning. Those meshes are seen to be affected by that. @zimmy87, can you think of a way to tell those meshes not to change their position with that of the unreal environment?