Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blur Scenario when starting simulation from .exe file #1839

Open
MartinaB85 opened this issue Oct 27, 2021 · 18 comments
Open

Blur Scenario when starting simulation from .exe file #1839

MartinaB85 opened this issue Oct 27, 2021 · 18 comments
Labels
answered Waiting for response

Comments

@MartinaB85
Copy link

MartinaB85 commented Oct 27, 2021

Good morning,

I'm currently using the 2021.1 SVL version on Ubuntu 20.04.
When building a new binary of my scenario and starting the simulation through the Python script and the .exe file at the beginning everything is working fine but if I run it again the scenario becomes blur (see attached image).
This is also happened to my colleague.
Any idea why is it happening? Is it something related to the build process? Or because of the scenario we are using?

Please note: When building the binary I do not build the scenario asset bundle, it uploads the scenario directly from the cloud.

Thanks,

Martina

Blur_Scenario_when_loading

@EricBoiseLGSVL
Copy link
Contributor

Are you calling reset in the api before running again? Can you please elaborate on how you are doing this? We do have some bugs in 2021.1 with api and I recommend using the latest release because we may have already fixed this issue.

@EricBoiseLGSVL EricBoiseLGSVL added the question Further information is requested label Oct 28, 2021
@MartinaB85
Copy link
Author

MartinaB85 commented Nov 4, 2021

Yes, I was calling the reset in the code, but even if commenting that line and leaving the sim.load only (as you see in the picture in attached) same things happens. I really would need to stay on this version right now, as changing SVL version implies doing again the scenario and adjusting all the code in the controllers since some functions are not the same.

When opening the .exe if I choose go Online it also does not work. So maybe the issue is related to this? That somehow it can not go online and load the scenario?

Any ideas on which could be the issue?

Thanks,

Martina

Screenshot from 2021-11-04 15-56-09

@EricBoiseLGSVL
Copy link
Contributor

Thanks for posting the code, that helps.

You aren't checking to see if the map is already loaded. Please look at all the quick script examples we provide to see the check for environment load. If the map is already loaded, it needs to call reset, not load again.

@EricBoiseLGSVL EricBoiseLGSVL added answered Waiting for response and removed question Further information is requested labels Nov 4, 2021
@MartinaB85
Copy link
Author

Actually I am using the same code as you provided in the quick script examples..in the picture I have attached last time, I commented line 16-18 to see if the reset was causing this. Either commenting or uncommenting those lines the issue is still happening.
I mean lines 15-19 are the same as those you use in any other examples. The problem is not in the Python code I guess.

@EricBoiseLGSVL
Copy link
Contributor

Oh, so the issue is happening with the lines un-commented out? Sorry, I was confused on the example posted.
You said you are building the binary. What changes are you making to it? Does this happen with the release binary we provide?

@MartinaB85
Copy link
Author

The issue is happening regardless. The same issue happens building the binary from your original simulator, without changes in the code. After building the binary it works fine for a while then it gets blur..so maybe is it something in the build process? Or any settings which might be wrong?

Here in attached the warnings I get while building the binary of my project. Not sure if it can help you detecting the issue, hopefully yes.

Build_Console

@EricBoiseLGSVL
Copy link
Contributor

EricBoiseLGSVL commented Nov 9, 2021

Thanks for the log, it always helps, but those warnings are fine.
I'm confused, do you have this issue with the binary we provide?
Or is it only when you make a binary yourself?
I ask because we haven't been able to reproduce so it might be a hardware or driver issue.

Let's look into the playerlog next, please post here.
Also, what hardware(GPU), drivers are you using? Nvidia smi will help

@MartinaB85
Copy link
Author

Yes, I do have the same issue with your binary as well.
In attached the Player.log file.
Regarding my pc, I have attached a pic with the properties along with the output of the nvidia-smi.

Player.log
PCSettings
Nvidia_smi_Output

@EricBoiseLGSVL
Copy link
Contributor

Thanks for the info this helps. I see a couple of things:

  • Looks like the sim is loading ASUS as the gpu. Please make sure simulator is using that 3080 beast you have :)
  • Looks like you have mesa drivers installed. Please uninstall. Unity will have all kinds of graphical issues with those.
  • I see some new methods in VehicleController.cs and many null errors. Please make sure no null errors are happening, check the console panel in unity while developing and in the info panel in simulator.
  • Once these are cleared up, let us know if you are still having issues.

@MartinaB85
Copy link
Author

MartinaB85 commented Nov 11, 2021

Thank you very much for helping me.
I will try to fix these issues..just few questions:

  • on the first point, how can I make sure the simulator is using my graphic card? Are there any settings I need to adjust in Unity in order to "force" it to use the NVIDIA 3080?
  • on the second point, should I unistall all of these drivers shown in the attached pic? Those related to Vulkan as well?

Mesa_Drivers

@EricBoiseLGSVL
Copy link
Contributor

yes, in windows you can use nivida control panel to assign gpu to an application. I'm sure there is a way on Linux. @lemketron ?

@MartinaB85
Copy link
Author

Good morning, I have checked all the things you suggested me, but I'm still experiencing the same issue.
I share the player.log for the case when the scene is clearly visible and for the case when the scene is blurred.
I do not detect particular issues..but maybe you can double check.
Are there any other things I should check to understand why this is happening?

Thanks,

Martina

Player_Visible_Scene.log
Player_NOT_Visible_Scene.log

@EricBoiseLGSVL
Copy link
Contributor

EricBoiseLGSVL commented Dec 2, 2021

It seems from the player log, thanks for posting, that you are getting many errors when trying to run again. Since this is an older version, I recommend you move to the latest that fixes many issues.

You can try to fix the listed issues below if you can't update.

I see you are using a terrain, that is not supported in 2021.1

TerrainCollider: MeshCollider is not supported on terrain at the moment. 

You are missing a nav mesh at the spawn location

Brennero missing NavMesh at (321.5, 0.0, 221.8) please create navmesh at this point. Pedestrian manager disabled

Not sure what is going on here but it seems a texture problem

Compute dispatch: missing UAV ID %d 
(Filename:  Line: 0)

Compute dispatch: missing texture ID %d 
(Filename:  Line: 0)

Compute dispatch: missing texture ID %d 
(Filename:  Line: 0)

Compute dispatch: missing texture ID %d 
(Filename:  Line: 0)

Compute dispatch: missing UAV ID %d 
(Filename:  Line: 0)

Compute dispatch: missing texture ID %d 
(Filename:  Line: 0)

Compute dispatch: missing texture ID %d 
(Filename:  Line: 0)

Seems like a custom visualizer or a reference is broken? Is this a custom sensor with a camera base?

NullReferenceException: Object reference not set to an instance of an object.
  at Simulator.Sensors.CameraSensorBase.OnVisualize (Simulator.Sensors.UI.Visualizer visualizer) [0x00007] in <42c6685c778249ae9ddfa377e3b129aa>:0 
  at Simulator.Sensors.UI.Visualizer.LateUpdate () [0x00006] in <42c6685c778249ae9ddfa377e3b129aa>:0 

@MartinaB85
Copy link
Author

These errors regarding the texture are happening if:

  1. I do the build of the simulator (the first time everything's loading fine and everything works).
  2. I change whatever small things in the code and I run the simulation in the Unity Editor.
  3. I reopen the build made before the changes and I get the blur scenario and missing textures.

I tried to delete the library folder, open Unity again and do the build again, including in Resources all the textures I am using but the issue still persists.

Is it something normal that you do the build and then you run the project again in the editor changing a variable and then you want to reopen the previous build but it doesn't load? I mean, in my mind it shouldn't happen because if you do a build then it should work whenever you open it, no matter if you changed something in the source code of the project which is being run in the editor, right?

Is it something that ever happened to you?

Many thanks,

Martina

@EricBoiseLGSVL
Copy link
Contributor

What do you mean for 2? What are you changing? If you are altering cached assets with changes in the Editor, you will break those assets in the binary without those changes. Understanding what you are exactly doing in Editor will help solve this. Why are you making changes to source code in editor and then running a binary without those changes?

@MartinaB85
Copy link
Author

MartinaB85 commented Feb 16, 2022

I have a string variable in the NPCBehaviour script as well as in the vehicleController script. This string needs to be changed to simulate 4 different cases. So I change the string to value1 and build with Name1, then change it to value2 and build with Name2 and so on for four times. If I run all the four builds everything's fine. But if I see something wrong in the behaviour of one of these builds I need to go back to the editor and fix things. And if for some reason I want to check out the previous build (not in the editor) it doesn't load if I made changes to the code. If I do a new build of one of them then all four (even the previous ones) are again working fine.
So just for my understanding, this is something normal right?

@EricBoiseLGSVL
Copy link
Contributor

Yes this is as intended. If you make changes in source and don't build a new binary, you will have errors or other issues that will prevent loading. That is why we provided development debug so you can test local changes before you bring it to a binary.

Why not make an api command to swap logic. I am confused on why you need 4 separate builds. I understand changing logic needs new builds but what is the significance of the name and string. This seems like a good place to add functionality on addagent with strings provided as parameters.

@MartinaB85
Copy link
Author

I see, thanks for your clarification.! Now I know that is "normal".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Waiting for response
Projects
None yet
Development

No branches or pull requests

2 participants