This is a modified version of the project called Skybolt. It is used as MARL environment for realistic simulations and human-agent interactions.
TODO:
- Make it run on Linux
- Init location directly as instance creation of FlightSim(loc) for JSBSim, otherwise performance decrease!
- Read out state of JSBSim aircraft for Human-Agent Interaction --> partially done, see
test_flightsim.pyin HHMARL3D - Better to set init position, then orientation and velocity to let C++ enginge simulate future states instead of setting the attitude by Python-JSBSim.
- install VS Build Tools and use c++ build tools. Make sure to have selected:
- C++ build tools workload
- MSVC v143
- Windows 10 or 11 SDK
- C++ CMake tools for Windows
-
Open "Developer Command Prompt for VS 2022" and type
clandcmake --versionto check if both return something. -
pip install conan==2.22.0and create a default profile:conan profile detect --force. For JSBSim, need to setcompiler.cppstd=17(instead of 14) in conan profile, located under "user\.conan2" -
go to the directory of the local clone of this repository, e.g., "\user\FlightSim" and run
conan build . --output-folder=\user\FlightSimBuild --build=missing -o openscenegraph-mr/*:shared=True -o enable_jsbsim=True -o enable_python=True -o enable_qt=False. -
install JSBSSim, go to Skybolt settings, located under "user\AppData\Local\Skybolt\settings.json" and provide the root directory of JSBSim as:
"jsb": {
"rootDir": "C:/Users/thisuser/JSBSim"
}
-
for realistic rendering, download the map tiles of Switzerland: Terrain and Satellite. Of course, you can download any other Map tiles from Mapbox or any other source. Unzip and store the folders into
Assets. The entity underAssets\Globe\Entities\PlanetEarth.jsonwill look for these map tiles for rendering. -
run python script
Test_MultiAgent.py. For more Python Bindings, need to extendFlightSim\src\Skybolt\SkyboltPythonBindings\PythonBindings.cppappropriately.
NOTE: when pushing with git, set git config --global core.autocrlf false to use LF accross all platforms.
NOTE: Currently, installation on Linux works. But, at time of development, running caused problems (buffer overflow).
- in Linux terminal, run:
sudo apt update
sudo apt install -y build-essential cmake python3 python3-pip python3-venv pkg-config
Check to install Python 3.10 or 3.11. Check if all required components are installed:
g++ --version
cmake --version
python3 --version
- create venv and install conan:
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install conan==2.22.0
and create a conan profile:
conan profile detect --force
which is usually stored under ~/.conan2/profiles/default. Check that compiler.cppstd=17 is set.
- go to FlightSim directory and build the project:
conan build . \
--output-folder=$HOME/FlightSimBuild \
--build=missing \
-o openscenegraph-mr/*:shared=True \
-o enable_jsbsim=True \
-o enable_python=True \
- enable_qt = False
- create a
settings.jsonfile in~/Skybolt/Settings.jsonwith the most basic information:
{
"clouds": {
"enableTemporalUpscaling": true
},
"display": {
"multiSampleCount": 4,
"texturePoolSizeMB": 512,
"vsync": true
},
"mouse": {
"sensitivity": 1.0
},
"shadows": {
"cascadeBoundingDistances": [
0.02,
20.0,
70.0,
250.0,
7000
],
"enabled": true,
"textureSize": 2048
},
"tileApiKeys": {
"bing": "",
"mapbox": "pk.eyJ1IjoiYXJkaWFuLXNlbG1vbmFqIiwiYSI6ImNtbDVmYjlyMDAwYXkzZXMybGV6bWh2enAifQ.kYwMo1PfJVT2bmSzMK9n8g"
},
"jsb": {
"rootDir": "None"
}
}
- Install JSBSim and provide the installation directory in
settings.json.
