Skip to content

Commit

Permalink
Linux crash on startup workaround, docs update for settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Jul 22, 2017
1 parent 4d862af commit 558463a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
1 change: 0 additions & 1 deletion Unreal/Environments/Blocks/Blocks.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FileVersion": 3,
"EngineAssociation": "{1E0B7D38-2007-110B-0029-02294AE308CD}",
"Category": "",
"Description": "",
"Modules": [
Expand Down
9 changes: 8 additions & 1 deletion Unreal/Plugins/AirSim/Source/AirSimGameMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ void AAirSimGameMode::initializeSettings()
settings.setString("see_docs_at", "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md");

if (!file_found) {
json_fstring = FString(settings.saveJSonString().c_str());
std::string json_content;
//TODO: there is a crash in Linux due to settings.saveJSonString(). Remove this workaround after we know the reason.
#ifdef _WIN32
json_content = settings.saveJSonString();
#else
json_content = "{ \"see_docs_at\": \"https://github.com/Microsoft/AirSim/blob/master/docs/settings.md\"}";
#endif
json_fstring = FString(json_content.c_str());
FFileHelper::SaveStringToFile(json_fstring, * settings_filename);
UAirBlueprintLib::LogMessageString("Created settings file at ", TCHAR_TO_UTF8(*settings_filename), LogDebugLevel::Informational);
}
Expand Down
27 changes: 23 additions & 4 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,48 @@ Below are complete list of settings available along with their default values. I
"FpvVehicleName": "Pixhawk",
"UsageScenario": "",
"RpcEnabled": true,
"PhysicsEngineName": "FastPhysicsEngine",
"EnableCollisionPassthrogh": false,
"LogMessagesVisible": true,
"RosFlight": {
"RemoteControlID": 0
},
"Recording": {
"RecordOnMove": false,
"RecordInterval": 0.05f
},
"SceneCaptureSettings" : {
"Width": 256,
"Height": 144,
"FOV_Degrees": 90,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
"AutoExposureBias": 0,
"AutoExposureMaxBrightness": 0.64f,
"AutoExposureMinBrightness": 0.03f,
"MotionBlurAmount": 0,
"TargetGamma": 1.0f
},
"DepthCaptureSettings" : {
"Width": 256,
"Height": 144,
"FOV_Degrees": 90,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
"AutoExposureBias": 0,
"AutoExposureMaxBrightness": 0.64f,
"AutoExposureMinBrightness": 0.03f,
"MotionBlurAmount": 0,
"TargetGamma": 1.0f
},
"SegCaptureSettings" : {
"Width": 256,
"Height": 144,
"FOV_Degrees": 90,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
"AutoExposureBias": 0,
"AutoExposureMaxBrightness": 0.64f,
"AutoExposureMinBrightness": 0.03f,
"MotionBlurAmount": 0,
"TargetGamma": 1.0f
},
"SimpleFlight": {
"RemoteControlID": 0
Expand Down Expand Up @@ -67,7 +86,7 @@ Below are complete list of settings available along with their default values. I
````

## Image Capture Settings
The `SceneCaptureSettings`, `DepthCaptureSettings` and `SegCaptureSettings` determines how scene view, depth view and segmentation views are captures. The Width, Height and FOV settings should be self explanatory. The AutoExposureSpeed decides how fast eye adaptation works. We set to generally high value such as 100 to avoid artifacts in image capture. Simplarly we set MotionBlurAmount to 0 by default to avoid artifacts in groung truth images.
The `SceneCaptureSettings`, `DepthCaptureSettings` and `SegCaptureSettings` determines how scene view, depth view and segmentation views are captures. The Width, Height and FOV settings should be self explanatory. The AutoExposureSpeed decides how fast eye adaptation works. We set to generally high value such as 100 to avoid artifacts in image capture. Simplarly we set MotionBlurAmount to 0 by default to avoid artifacts in groung truth images. For explanation of other settings, please see [this article](https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/AutomaticExposure/).

## Changing Flight Controller
The `FpvVehicleName` decides which vehicle will be your primary vehicle with FPV view. By default its Pixhawk and we have RosFlight and SimpleFlight in development, both of which are designed so you don't have to do separate HITL or SITL setups. For ["Computer Vision" mode](image_apis.md), use SimpleFlight as described in doc.
Expand Down

0 comments on commit 558463a

Please sign in to comment.