microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.04k stars 4.48k forks source link

Launch Airsim simulation running in Unity from Python/bash script #4919

Open sandilyasg opened 5 months ago

sandilyasg commented 5 months ago

Question

How to launch Airsim simulation running in Unity from Python/bash script without manually clicking the "Play" button in Unity each time?

Include context on what you are trying to achieve

I have a custom Airsim simulation environment set up in Unity. I am using my ROS wrapper with this Airsim-Unity setup and I would like to sequentially run multiple experiments without having to click play in the Unity editor manually and shut it down once the experiment is over. How do I do this with a bash/python script?

Context details

OS: Linux Ubuntu 18.04, latest Airsim commit 6688d27, Python 3.6.9, Unity version 2022.3.13f1

Include details of what you already did to find answers

I found Unity Standalone Player command line arguments and Command-line arguments but I am unsure how to use this with my Airsim setup.