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

How to disable rendering in CARLA server? #286

Closed
GokulNC opened this issue Mar 20, 2018 · 21 comments
Closed

How to disable rendering in CARLA server? #286

GokulNC opened this issue Mar 20, 2018 · 21 comments
Assignees
Labels
feature request good first issue Good issue for first-time contributors stale Issue has not had recent activity

Comments

@GokulNC
Copy link

GokulNC commented Mar 20, 2018

So when the CARLA server is run by using the script CarlaUE4.sh to launch it, is there any way to disable the rendering of the game window?

I use a camera in the simulator to get the current FoV from that camera. So just reading the image by CarlaClient.read_data() is enough for me to process things. I feel that I can increase my FPS by reducing the processing overhead to render the game using Unreal Engine.

I tried using the flag -carla-no-hud as suggested in the docs, but still the rendering is taking place.

So is there anyway to do this? Or it's not just possible or it doesn't matter not to render?
Thanks :)

@marcgpuig marcgpuig self-assigned this Mar 20, 2018
@marcgpuig
Copy link
Contributor

marcgpuig commented Mar 20, 2018

Hi @GokulNC,

First of all -carla-no-hud disables the left-bottom text output from the server:

cbb50b6e874c0e3a3ec15cc9a5cc4c36

Currently is no possible to disable the render and I have the feeling that it will doesn't matter anyways, because regardless you see the render or not, it must be done anyway.

@GokulNC
Copy link
Author

GokulNC commented Mar 20, 2018

Thanks @marcgpuig .

Eventhough the computations need to occur, I feel rendering it at a certain FPS (say 15) is quite resource-intensive.

Though there is no way to disable rendering as of now, can this issue be considered as a feature-request?

I will close this issue if this feature is implemented, or if there's an strong assertion that disabling rendering doesn't matter much.

Regards :)

@marcgpuig
Copy link
Contributor

marcgpuig commented Mar 20, 2018

Please try adding these commands:

-windowed -ResX=8 -ResY=8

So it will run on a 8x8 pixels window. It's a workaround but I hope you can win some extra fps. 😉

Another solution is work without an actual screen, see our documentation.

For sure I'm going to add the feature-request tag because it is something that can improve the performance.
But we are currently working on other more critical optimizations, so do not expect big focus on this one.

Since it's more an Unreal Engine issue, I'm adding the Good issue for first-time contributors too, so the community can make a good-and-easy contribution 😄

Regards!

@marcgpuig marcgpuig added feature request good first issue Good issue for first-time contributors labels Mar 20, 2018
@simmates
Copy link

Is it also possible to disable the HUD in the Editor?

@simmates
Copy link

Ok it is possible in the console with showHUD 0

@juaxix
Copy link
Contributor

juaxix commented Apr 13, 2018

You can also set

r.ScreenPercentage 0

using the unreal console

@marcgpuig
Copy link
Contributor

Is this topic solved?

@juaxix
Copy link
Contributor

juaxix commented May 31, 2018

@marcpuig I think we should add a command for this, to disable the rendering in the viewport like this

ULocalPlayer* player = GEngine->GetGamePlayer(GetWorld(), 0);
player->ViewportClient->bDisableWorldRendering = true;

@marcgpuig
Copy link
Contributor

@juaxix
Yeah looks good to me!

@GokulNC
Copy link
Author

GokulNC commented May 31, 2018

@juaxix Yeah, that might help IDK :)

But as an end user like me, it would be better if there's a command-line flag or an option in CarlaSetting.ini or something like that to disable it easily, without needing to recompile from scratch.
We're more comfortable with using the release ones.

Thanks :)

@marcgpuig marcgpuig assigned juaxix and unassigned marcgpuig Jun 1, 2018
@ghost ghost added in progress and removed backlog labels Jun 1, 2018
@juaxix
Copy link
Contributor

juaxix commented Jun 1, 2018

Ok, the feature has been implemented in the branch issue-286, you can wait for it to be merged into main and it will be added in CARLA 0.8.3.
Screenshot showing the result, no rendering but you can get info from the game

In CarlaSettings.ini, the new flag is inside the [Server] section, and it's called: DisableRendering, by default is false, Ah, it will hide the hud too if set to true. And the new command for the executable is called "-disable-rendering".

Cheers.

@juaxix juaxix mentioned this issue Jun 4, 2018
3 tasks
@juaxix juaxix added review and removed in progress labels Jun 4, 2018
@stale
Copy link

stale bot commented Aug 3, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had recent activity label Aug 3, 2018
@stale stale bot closed this as completed Aug 10, 2018
@ghost ghost removed the review label Aug 10, 2018
@JunningHuang
Copy link

JunningHuang commented Dec 9, 2018

I have added the "-disable-rendering" to arguments when I running the Carla.sh script, but it didn't worked. However changing the "DisableRendering" to true in the Carla.ini file worked.

@aayushARM
Copy link

aayushARM commented Mar 14, 2019

I have added the "-disable-rendering" to arguments when I running the Carla.sh script, but it didn't worked. However changing the "DisableRendering" to true in the Carla.ini file worked.

None of them are working now. :/
Also, the Carla Settings section has been removed in newer documentation(0.9.4) and it seems CarlaSettings.ini file is simply ignored now.

@geekhut
Copy link

geekhut commented Jun 4, 2019

Is it also possible to disable the HUD in the Editor?

Hi have you solved this? I would like to know how.. thanks

@DongChen06
Copy link

Hi, @aayushARM , have you solved this problem and how to run the code without rendering?

@tojimahammatov
Copy link

tojimahammatov commented Nov 8, 2019

Hi all. I am using Carla 0.9.6 now, and the following are working without any problem:

./CarlaUE4.sh --no-rendering

And in order to check, you can run no_rendering_mode.py inside PythonAPI/examples folder

@pirate-lofy
Copy link

In linux, just write this command...
SDL_VIDEODRIVER=offscreen ./CarlaUE4.sh

@siposcsaba89
Copy link

Hello,

I am trying to disable rendering in carla, version 0.9.9.4 on windows 10. I have already tried with the config script:

./config.py --no-rendering

After that carla window turns to black, but the gpu usage still very high and if I start

./no_rendering_mode.py

Carla windows start to display the rendered view again. Does anyone have similar issues? Or solutions? Should it work on windows? Thanks in adavance.

@mkhansenbot
Copy link

I see the same problem in version 0.9.12. There isn't a CarlaSettings.ini file anywhere and the -disable-rendering flag does nothing. If anyone knows how to disable rendering at startup, please update.

@TzabarDolev
Copy link

Hi, I wrote a blog post about this issue on the CarlaSimBlog, including a code tutorial for off screen rendering.
https://carlasimblog.wordpress.com/2023/10/04/rendering-images-off-screen-in-the-carla-simulator/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request good first issue Good issue for first-time contributors stale Issue has not had recent activity
Development

No branches or pull requests