-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
multiple airsim simulations at the same time #563
Comments
Ideally, I want to be able to not render the environment (I just need the physics) and have multiple instances of the simulation so that I can parallelize the RL algorithm or maybe run different models on different instances for comparison of models. |
I think you don't want render but you still want all objects in environment and collision detection. Unfortunately Unreal doesn't allow turning off rendering. It might be possible (its open source engine) but I don't know... But in any case, if you turn off rendering then you won't have ability to get screenshots or depth view etc. If you just want physics without collisions and any other objects in environment then its doable. Here is some sample code: https://github.com/Microsoft/AirSim/blob/master/Examples/StandAlonePhysics.hpp |
@sytelus, @cangokalp : could you elaborate on this? I want to run A3C and I do not follow how to go from this thread to being able to parallelize the RL algorithm. Let's say I want to train an A3C Algorithm to train a car how to drive in the neighborhood environment (so physics and collision info is relevant). How would I go about doing this? I have looked at the following:
|
I want to do something similar to what @maximilianchang suggests. I need the physics and collision information. Is there a way to have multiple instances of the same UE project running on different ports and control the respective clients by referencing them uniquely in the PythonClient? This will also be useful in training different models in parallel. |
I've been trying to do the same but I wasn't successful. |
Training a drone on a RDL algo where you run one thread in real time takes forever. It can take several million time steps to properly train an agent depending on the task. At a couple time steps per second (real time) and 4 million time steps needed, as an example, that's 23 days to train it. What are people doing to speed things up? Many Unity ML agent environments provide for multi-threads and, in games of course each time steps happens much faster. |
@PHRABAL you are absolutely right. It takes ages to train RL with a single env and the current approach does not scale. @sytelus we appreciate any update you may have on supporting multi-envs. |
@PHRABAL ,did the multi-threading work for you in Unity for AirSim? |
No. As far as I know, there is no multi-threading with AirSim, so I am training one drone in the environment. |
If you want to train multiple agents in parallel or run multiple simulations at a time, you can use different local host IPs to do it.
If you want to train another agent, simply change the |
Yea, multithreading is possible via changing thr LocalhostIp. Just tried it with Unreal Engine. |
Yes, it functions, but it slows down the simulation a lot, too much. I'm running on a decent g3 aws instance and when I run two sims at the same time it goes from ~ 60 milliseconds per cycle to sometimes over 200 milliseconds. I need to have the drone's reaction time be quick and also consistent from one time step to the next, so this solution doesn't work. The only thing I have come up with is simply to run multiple separate aws instances, one for each sim I want to run. |
Will running multiple simulations at the same time speed up the generation of the trained data? Do we need to improve the training algorithm? |
Is there a way to run more than one simulation at a time? that way I can test different models running in different simulations
The text was updated successfully, but these errors were encountered: