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

Flightmare-Unity time out. #58

Open
Song-z-h opened this issue Apr 24, 2022 · 5 comments
Open

Flightmare-Unity time out. #58

Song-z-h opened this issue Apr 24, 2022 · 5 comments

Comments

@Song-z-h
Copy link

Hi,
I would like to ask that every time we do connectUnity() with an environment, Flightmare is connected with Unity and that's fine. However, during the training phase with PPO when we stop calling render() for a few seconds, Unity disconnects from Flightmare.
One way to avoid being disconnected is spamming render() continuously though is a bad solution.
So is there a way to tell Unity to stay connected with Flightmare? (any parameters that I can pass to RPG_Flightmare.x86_64)

Thanks in advance,
Greetings.

@Song-z-h
Copy link
Author

Song-z-h commented Apr 24, 2022

Such as if I add a time.sleep(10) inside run_vision_demo.py after step(), Unity will soon disconnect. the log file:

Begin MonoManager ReloadAssembly
- Completed reload, in  0.069 seconds
Default vsync count 1
requesting resize 1024 x 768
resizing window to 1024 x 768
Desktop is 1920 x 1080 @ 60 Hz
The referenced script on this Behaviour (Game Object '!ftraceLightmaps') is missing!
UnloadTime: 1.674557 ms
Configuring sockets.
Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
Trying to connect to: 127.0.0.1
Terminated ZMQ sockets.
Configuring sockets.
tcp://127.0.0.1:10253
Sockets bound.
requesting resize 1024 x 768
resizing window to 1024 x 768
Desktop is 1920 x 1080 @ 60 Hz
UnloadTime: 0.152963 ms
Unloading 4 unused Assets to reduce memory usage. Loaded Objects now: 2437.
Total: 0.960231 ms (FindLiveObjects: 0.092302 ms CreateObjectMapping: 0.020429 ms MarkObjects: 0.839767 ms  DeleteObjects: 0.007437 ms)

Destory Time Line
Unloading 4 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 0.588309 ms
Unloading 22 unused Assets to reduce memory usage. Loaded Objects now: 1954.
Total: 0.836167 ms (FindLiveObjects: 0.079781 ms CreateObjectMapping: 0.019425 ms MarkObjects: 0.703432 ms  DeleteObjects: 0.033221 ms)

resize screen
requesting resize 84 x 84
resizing window to 84 x 84
Desktop is 1920 x 1080 @ 60 Hz
instantiate object
Load CSV Files
vehicle id : quadrotor0
Disable extra camera!
quadrotor0_0
0.00000	0.00000	1.00000	0.00000
0.00000	1.00000	0.00000	0.30000
-1.00000	0.00000	0.00000	0.00000
0.00000	0.00000	0.00000	1.00000
set camera view ports
set camera post process settings
Unloading 3 Unused Serialized files (Serialized files now loaded: 0)
Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 2425.
Total: 7.951463 ms (FindLiveObjects: 0.133652 ms CreateObjectMapping: 0.028125 ms MarkObjects: 7.783705 ms  DeleteObjects: 0.005340 ms)

The referenced script on this Behaviour (Game Object '!ftraceLightmaps') is missing!
Unloading 3 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 3.638100 ms
Unloading 91 unused Assets to reduce memory usage. Loaded Objects now: 1211.
Total: 1.422194 ms (FindLiveObjects: 0.065649 ms CreateObjectMapping: 0.018372 ms MarkObjects: 1.058607 ms  DeleteObjects: 0.279282 ms)

Configuring sockets.
Trying to connect to: 127.0.0.1
Terminated ZMQ sockets.
Configuring sockets.
tcp://127.0.0.1:10253
Sockets bound.
Unloading 4 Unused Serialized files (Serialized files now loaded: 0)
requesting resize 1024 x 768
resizing window to 1024 x 768
Desktop is 1920 x 1080 @ 60 Hz
UnloadTime: 0.129247 ms
Unloading 2 unused Assets to reduce memory usage. Loaded Objects now: 2468.
Total: 1.085503 ms (FindLiveObjects: 0.109685 ms CreateObjectMapping: 0.025276 ms MarkObjects: 0.929530 ms  DeleteObjects: 0.020492 ms)

@Song-z-h
Copy link
Author

image
Is there a way to change this default time-out?

@gorghino
Copy link

Hi Song,
apparently the disconnection is due to this strange 10s timeout introduced in FlightGoogles and kept in Flightmare by the developers.
Unfortunately connection_timeout_seconds_default cannot be edited since it's defined in the standalone build.

This is even affecting my group and the disconnection is very annoying during the training phase.
Please @yun-long @tongtybj @lbfd add it as customizable parameter instead of leave it hardcoded.

@yun-long
Copy link
Contributor

yun-long commented May 2, 2022

I will update the standalone soon.

@Song-z-h Song-z-h closed this as completed May 2, 2022
@gorghino
Copy link

gorghino commented May 7, 2022

Up @yun-long @antonilo

@Song-z-h Song-z-h reopened this Jun 6, 2022
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

No branches or pull requests

3 participants