-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Unity Car/Drone Demo Crashes #1617
Comments
Same problem here. |
1 similar comment
Same problem here. |
Unity requires simModeSelector to set necessary parameters for AirSim. The readme has been updated to remove instructions to open DroneDemo or CarDemo scenes directly. @bugrahanakbulut, if you want to enter a sim mode directly, edit your json file accordingly.
Or:
|
@msb336 {
"SettingsVersion": 1.2,
"SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md",
"SimMode": "Multirotor",
"Vehicles": {
"PX4": {
"VehicleType": "PX4Multirotor"
}
}
} But this currently causes Unity to crash. {
"SettingsVersion": 1.2,
"SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md",
"SimMode": "Multirotor",
"DefaultVehicleConfig": "PX4",
"Vehicles": {
"PX4": {
"VehicleType": "PX4Multirotor"
}
}
} This does not effect the Unreal, so you can use the same settings for Unreal and Unity. public static VehicleCompanion GetVehicleCompanion(IVehicleInterface vehicleInterface) {
var companion = new VehicleCompanion(vehicleInterface);
if (AirSimSettings.GetSettings().SimMode == "Car")
companion.vehicleName = "PhysXCar";
else if (AirSimSettings.GetSettings().SimMode == "Multirotor")
companion.vehicleName = AirSimSettings.GetSettings().DefaultVehicleConfig;
//Above line replaces // companion.vehicleName = "SimpleFlight";
Vehicles.Add(companion);
return companion;
} companion.vehicleName = "SimpleFlight"; is replaced by: companion.vehicleName = AirSimSettings.GetSettings().DefaultVehicleConfig; And now I can use Unity AirSim with PX4 Software in the Loop and fly the drone using QGroundControl!!! But this IS just a band-aid until the AirSimSettings.cs is updated to read the newer structs instead of trying to read DefaultVehicleConfig element which appears to have been removed back on May 17th with the following merge: |
Works perfectly fine, thanks! |
Glad to hear it @MelSoS ! |
I have builded AirSim and builded sample Unity projects. But when I try to run CarDemo or DroneDemo directly, it crashes Unity. But running SimModeSelector, then selecting Car or Drone, does not crash Unity. I need to run CarDemo or DroneDemo directly without SimModeSelector, how can i do that? What can be the reason of crash?
specs: Windows 10, Unity 2018.2.15f1, VS2017 15.8.9, SDK 8.1
The text was updated successfully, but these errors were encountered: