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

MARL disconnection from Unreal Engine after a while #25

Closed
oshirokn opened this issue Nov 7, 2022 · 4 comments
Closed

MARL disconnection from Unreal Engine after a while #25

oshirokn opened this issue Nov 7, 2022 · 4 comments

Comments

@oshirokn
Copy link

oshirokn commented Nov 7, 2022

Hi!

I setup the MARL as described in the github. However, after a while (10 seconds) the second agent training stops working with the print "Disconnected from Unreal Engine. Exiting Mindmaker". The first agent trains fine.
ScreenshotObs

Do you have any idea why this might happen?

I did the following steps:

  • Second agent mindmaker blueprint with the new address & port "http://localhost:3001"
    screen2
    Screen1
  • Second agent SocketIO address & port changed to "http://localhost:3001"
    screen34
  • In the python source code, changed the "3000" to "3001".
    screen5
  • Launched the second duplicate python source code (with 3001), then Unreal. The mindmaker.exe window also appears. Both agents start to train.
  • After around 10-15 seconds the second agent python training stops due to a disconnection from Unreal Engine.
@oshirokn oshirokn changed the title MARL disconnection from Unreals after a while MARL disconnection from Unreal Engine after a while Nov 7, 2022
@krumiaa
Copy link
Owner

krumiaa commented Nov 12, 2022

Thanks for reaching out about this, not sure why the second agent would be auto disconnecting, perhaps a firewall issue. The only thing I could think to try is standard debugging procedure, remove all the superfluous RL code and bring it back to a basic client server setup, see if it sustains the connection, and then start adding things back in. Another place to look would be the SocketIO plugin settings in blueprints, there maybe some auto-disconnect feature that got enabled. Wish I had more idea about this, until I can replicate could be difficult to solve. FYI – planning to launch an upgrade to Stablebaslines 3 shortly(next week or two), that might eliminate your problem altogether.

@oshirokn
Copy link
Author

Thanks for your answer. I tried with a very basic setup using the original mindmaker BP and got the same problem. For now I'll stick with a single agent. Maybe a firewall issue? Let's see if Stablebaselines 3 upgrade fixes it.

@oshirokn
Copy link
Author

oshirokn commented Feb 14, 2023

I still have the same problem with a very basic project.
A sphere moves forward/backward if action 0 or 1.
image

Maybe I am doing something wrong with the setup?

  • Duplicated the same Mindmaker blueprint and changed the Socket address. Also changed the address in the socket component. I have now two actors with exactly the same blueprint except the address.
    image

  • Duplicated mindmaker.py, changed the port address to 3001

  • Launched the duplicated mindmaker.py, says "wsgi starting up on http://0.0.0.0:3001"

  • Launched the Unreal Editor simulation. Mindmaker.exe is launched.

  • After a while, the duplicated agent is disconnected from Unreal

image

Are these steps correct?

I can send you the project if needed @krumiaa .

@oshirokn
Copy link
Author

oshirokn commented Mar 9, 2023

Fixed by using a more recent example project from 5.1

@oshirokn oshirokn closed this as completed Mar 9, 2023
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

2 participants