Skip to content
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

Update inputs to use the Unreal Input Mapping Project Settings. #4489

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

niwc-jamelc
Copy link

@niwc-jamelc niwc-jamelc commented Apr 19, 2022

Fixes: #2940

  • Update inputs in cpp and blueprints to use the Unreal Input Mapping Project Settings.
  • Add function to dynamically change the Keyboard Shortcut Help Text when user changes a default hotkey.
  • Add function to allow user to make their own shortcut text for UI text elements. Keyboard Shortcut Text is set during Event Construct in corresponding UMG Widget Blueprints
  • Simplified or changed some of the descriptors for inputs in Help Text.
  • Remapped default input for Toggle Help Text UI from F1 to F9, so users no longer toggle the wireframe view.
  • Updated documentation with change for Help Text UI.
  • Update Manual Camera Controller. Remove old movement functions. Add new movement functions. Fix inconsistent movement speed.
  • Fix mislabeling of front and backup cameras for Car Pawn.

About

Some users want to take advantage of Unreal's built in Input Settings. This branch modifies the appropriate cpp classes in the Unreal AirSim Plugin to allow this functionality.

How Has This Been Tested?

  • Tested default keybindings for default keys.
  • Tested modifying keybindings
  • Tested keyboard and gamepad keybindings
  • Tested for both cpp and blueprints.

Screenshots (if appropriate):

…ovement issue with Manual Camera. Add functions to dynamically change keyboard shortcut help text.
…mentation to reflect change to default Help Text Shortcut.
@niwc-jamelc
Copy link
Author

niwc-jamelc commented Apr 20, 2022

@jonyMarino Can I get some assistance as to why the microsoft.AirSim (AirSimCI Ubuntu_1804) check is failing? I was able to package a Linux build on Windows using the Windows-Linux cross-compilation.

@zimmy87
Copy link
Contributor

zimmy87 commented Apr 26, 2022

Hi @niwc-jamelc, thank you for submitting this PR! The microsoft.AirSim (AirSimCI Ubuntu_1804) check is failing due to a packaging error, see the log below for the specific error it's failing on:

2022-04-19T23:29:53.7744707Z ##[section]Starting: Package Blocks - Development
2022-04-19T23:29:53.7753599Z ==============================================================================
2022-04-19T23:29:53.7754202Z Task         : Command line
2022-04-19T23:29:53.7754675Z Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2022-04-19T23:29:53.7755125Z Version      : 2.201.1
2022-04-19T23:29:53.7755472Z Author       : Microsoft Corporation
2022-04-19T23:29:53.7755941Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2022-04-19T23:29:53.7756483Z ==============================================================================
2022-04-19T23:29:54.1140751Z Generating script.
2022-04-19T23:29:54.1150384Z ========================== Starting Command Output ===========================
2022-04-19T23:29:54.1175360Z [command]/bin/bash --noprofile --norc /__w/_temp/8f299c77-699e-4596-9bb9-ff205dc116a8.sh
2022-04-19T23:29:54.1258275Z 
2022-04-19T23:29:54.1259154Z Running AutomationTool...
2022-04-19T23:29:54.1260831Z 
2022-04-19T23:29:54.3272798Z Fixing inconsistent case in filenames.
2022-04-19T23:29:54.3280912Z Setting up Mono
2022-04-19T23:29:54.3290361Z Start UAT: mono AutomationTool.exe BuildCookRun -project=/__w/13/s/Unreal/Environments/Blocks/Blocks.uproject -nop4 -nocompile -build -cook -compressed -pak -allmaps -stage -archive -archivedirectory=/__w/13/s/Unreal/Environments/Blocks/Packaged/Development -clientconfig=Development -clean -utf8output
2022-04-19T23:29:54.6160436Z Parsing command line: BuildCookRun -project=/__w/13/s/Unreal/Environments/Blocks/Blocks.uproject -nop4 -nocompile -build -cook -compressed -pak -allmaps -stage -archive -archivedirectory=/__w/13/s/Unreal/Environments/Blocks/Packaged/Development -clientconfig=Development -clean -utf8output
2022-04-19T23:29:55.2185096Z Setting up ProjectParams for /__w/13/s/Unreal/Environments/Blocks/Blocks.uproject
2022-04-19T23:29:56.8298113Z ********** BUILD COMMAND STARTED **********
2022-04-19T23:29:56.8419541Z Running: mono "/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Binaries/DotNET/UnrealBuildTool.exe" BlocksEditor Linux Development -Project=/__w/13/s/Unreal/Environments/Blocks/Blocks.uproject -Clean -NoHotReload /__w/13/s/Unreal/Environments/Blocks/Blocks.uproject -NoUBTMakefiles  -nobuilduht -log="/home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-BlocksEditor-Linux-Development.txt"
2022-04-19T23:29:58.2804795Z   Cleaning BlocksEditor binaries...
2022-04-19T23:29:59.0437293Z Took 2.201278s to run mono, ExitCode=0
2022-04-19T23:29:59.0445292Z Running: mono "/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Binaries/DotNET/UnrealBuildTool.exe" Blocks Linux Development -Project=/__w/13/s/Unreal/Environments/Blocks/Blocks.uproject -Clean -NoHotReload /__w/13/s/Unreal/Environments/Blocks/Blocks.uproject -NoUBTMakefiles  -remoteini="/__w/13/s/Unreal/Environments/Blocks" -nobuilduht -log="/home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-Blocks-Linux-Development.txt"
2022-04-19T23:30:00.5083785Z   Cleaning Blocks binaries...
2022-04-19T23:30:01.2695360Z Took 2.224898s to run mono, ExitCode=0
2022-04-19T23:30:01.2707850Z Running: mono "/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Binaries/DotNET/UnrealBuildTool.exe" BlocksEditor Linux Development -Project=/__w/13/s/Unreal/Environments/Blocks/Blocks.uproject  /__w/13/s/Unreal/Environments/Blocks/Blocks.uproject -NoUBTMakefiles  -Manifest=/__w/13/s/Unreal/Environments/Blocks/Intermediate/Build/Manifest.xml -NoHotReload -log="/home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-BlocksEditor-Linux-Development_2.txt"
2022-04-19T23:30:03.9378413Z   WARNING: Library 'stdc++' was not resolvable to a file when used in Module 'AirSim', assuming it is a filename and will search library paths for it. This is slow and dependency checking will not work for it. Please update reference to be fully qualified alternatively use PublicSystemLibraryPaths if you do intended to use this slow path to suppress this warning.
2022-04-19T23:30:03.9381073Z   WARNING: Library 'supc++' was not resolvable to a file when used in Module 'AirSim', assuming it is a filename and will search library paths for it. This is slow and dependency checking will not work for it. Please update reference to be fully qualified alternatively use PublicSystemLibraryPaths if you do intended to use this slow path to suppress this warning.
2022-04-19T23:30:07.9852520Z   ------- Build details --------
2022-04-19T23:30:07.9854747Z   Using toolchain located at '/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v16_clang-9.0.1-centos7/x86_64-unknown-linux-gnu'.
2022-04-19T23:30:07.9856517Z   Using clang (/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v16_clang-9.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version '9.0.1' (string), 9 (major), 0 (minor), 1 (patch)
2022-04-19T23:30:07.9857630Z   Using bundled libc++ standard C++ library.
2022-04-19T23:30:07.9858183Z   Using lld linker
2022-04-19T23:30:07.9859279Z   Using llvm-ar : /home/ue4/ue-4.25.1-linux-debugeditor/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v16_clang-9.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar
2022-04-19T23:30:07.9860204Z   Using fast way to relink  circularly dependent libraries (no FixDeps).
2022-04-19T23:30:07.9861008Z   ------------------------------
2022-04-19T23:30:08.1659314Z   Writing manifest to /__w/13/s/Unreal/Environments/Blocks/Intermediate/Build/Manifest.xml
2022-04-19T23:30:08.4894165Z   Building BlocksEditor...
2022-04-19T23:30:08.4934319Z   Performing 7 actions (6 in parallel)
2022-04-19T23:30:08.4970205Z   [1/7] Compile SharedPCH.Engine.ShadowErrors.h
2022-04-19T23:30:26.1125143Z   [2/7] Compile Module.AirSim.cpp
2022-04-19T23:30:26.1125993Z   [3/7] Compile Module.AirSim.gen.cpp
2022-04-19T23:30:26.1198570Z   [4/7] Compile Blocks.cpp
2022-04-19T23:31:45.6940663Z   [5/7] Link (lld) libUE4Editor-AirSim.so
2022-04-19T23:31:47.8961887Z   [6/7] Link (lld) libUE4Editor-Blocks.so
2022-04-19T23:31:48.9972515Z   [7/7] UnrealBuildTool.exe BlocksEditor.target
2022-04-19T23:31:50.4024818Z   Total time in Local executor: 101.91 seconds
2022-04-19T23:31:50.4478591Z   Total execution time: 108.21 seconds
2022-04-19T23:31:50.5631144Z Took 109.292216s to run mono, ExitCode=0
2022-04-19T23:31:51.8467042Z Running: mono "/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Binaries/DotNET/UnrealBuildTool.exe" Blocks Linux Development -Project=/__w/13/s/Unreal/Environments/Blocks/Blocks.uproject  /__w/13/s/Unreal/Environments/Blocks/Blocks.uproject -NoUBTMakefiles  -remoteini="/__w/13/s/Unreal/Environments/Blocks" -Manifest=/__w/13/s/Unreal/Environments/Blocks/Intermediate/Build/Manifest.xml -NoHotReload -log="/home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-Blocks-Linux-Development_2.txt"
2022-04-19T23:31:54.5680076Z   WARNING: Library 'stdc++' was not resolvable to a file when used in Module 'AirSim', assuming it is a filename and will search library paths for it. This is slow and dependency checking will not work for it. Please update reference to be fully qualified alternatively use PublicSystemLibraryPaths if you do intended to use this slow path to suppress this warning.
2022-04-19T23:31:54.5682712Z   WARNING: Library 'supc++' was not resolvable to a file when used in Module 'AirSim', assuming it is a filename and will search library paths for it. This is slow and dependency checking will not work for it. Please update reference to be fully qualified alternatively use PublicSystemLibraryPaths if you do intended to use this slow path to suppress this warning.
2022-04-19T23:31:56.8423357Z   ------- Build details --------
2022-04-19T23:31:56.8424928Z   Using toolchain located at '/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v16_clang-9.0.1-centos7/x86_64-unknown-linux-gnu'.
2022-04-19T23:31:56.8426582Z   Using clang (/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v16_clang-9.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version '9.0.1' (string), 9 (major), 0 (minor), 1 (patch)
2022-04-19T23:31:56.8428033Z   Using bundled libc++ standard C++ library.
2022-04-19T23:31:56.8428634Z   Using lld linker
2022-04-19T23:31:56.8429769Z   Using llvm-ar : /home/ue4/ue-4.25.1-linux-debugeditor/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v16_clang-9.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar
2022-04-19T23:31:56.8430676Z   Using fast way to relink  circularly dependent libraries (no FixDeps).
2022-04-19T23:31:56.8431463Z   ------------------------------
2022-04-19T23:31:57.0520178Z   Writing manifest to /__w/13/s/Unreal/Environments/Blocks/Intermediate/Build/Manifest.xml
2022-04-19T23:31:57.3063845Z   Building Blocks...
2022-04-19T23:31:57.3068611Z   [Upgrade]
2022-04-19T23:31:57.3070234Z   [Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
2022-04-19T23:31:57.3071297Z   [Upgrade]     bLegacyPublicIncludePaths = false                 => Omits subfolders from public include paths to reduce compiler command line length. (Previously: true).
2022-04-19T23:31:57.3072229Z   [Upgrade]     ShadowVariableWarningLevel = WarningLevel.Error   => Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning).
2022-04-19T23:31:57.3073913Z   [Upgrade]     PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs   => Set in build.cs files to enables IWYU-style PCH model. See https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/IWYU/index.html. (Previously: PCHUsageMode.UseSharedPCHs).
2022-04-19T23:31:57.3075563Z   [Upgrade] Suppress this message by setting 'DefaultBuildSettings = BuildSettingsVersion.V2;' in Blocks.Target.cs, and explicitly overriding settings that differ from the new defaults.
2022-04-19T23:31:57.3076380Z   [Upgrade]
2022-04-19T23:31:57.3105484Z   Performing 6 actions (6 in parallel)
2022-04-19T23:31:57.3140617Z   [4/6] Compile Blocks.cpp
2022-04-19T23:31:57.3141399Z   [2/6] Compile Module.AirSim.2_of_2.cpp
2022-04-19T23:31:57.3141941Z   [3/6] Compile Module.AirSim.gen.cpp
2022-04-19T23:31:57.3146418Z   [1/6] Compile Module.AirSim.1_of_2.cpp
2022-04-19T23:32:05.3304960Z   In file included from /__w/13/s/Unreal/Environments/Blocks/Plugins/AirSim/Intermediate/Build/Linux/B4D820EA/UE4/Development/AirSim/Module.AirSim.2_of_2.cpp:2:
2022-04-19T23:32:05.3319937Z   �[1m/__w/13/s/Unreal/Environments/Blocks/Plugins/AirSim/Source/TextureShuffleActor.cpp:12:72: �[0m�[0;1;31merror: �[0m�[1mmember access into incomplete type 'UStaticMeshComponent'�[0m
2022-04-19T23:32:05.3321361Z           DynamicMaterialInstances.Init(nullptr, components[component_id]->GetNumMaterials());
2022-04-19T23:32:05.3322576Z   �[0;1;32m                                                                       ^
2022-04-19T23:32:05.3323973Z   �[0m�[1m/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Source/Runtime/CoreUObject/Public/Templates/Casts.h:22:7: �[0m�[0;1;30mnote: �[0mforward declaration of 'UStaticMeshComponent'�[0m
2022-04-19T23:32:05.3324994Z   class UStaticMeshComponent;
2022-04-19T23:32:05.3329926Z   �[0;1;32m      ^
2022-04-19T23:32:05.3331071Z   �[0mIn file included from /__w/13/s/Unreal/Environments/Blocks/Plugins/AirSim/Intermediate/Build/Linux/B4D820EA/UE4/Development/AirSim/Module.AirSim.2_of_2.cpp:2:
2022-04-19T23:32:05.3332538Z   �[1m/__w/13/s/Unreal/Environments/Blocks/Plugins/AirSim/Source/TextureShuffleActor.cpp:24:49: �[0m�[0;1;31merror: �[0m�[1mincomplete type 'UMaterialInstanceDynamic' named in nested name specifier�[0m
2022-04-19T23:32:05.3335595Z           DynamicMaterialInstances[material_id] = UMaterialInstanceDynamic::Create(DynamicMaterial, this);
2022-04-19T23:32:05.3336618Z   �[0;1;32m                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
2022-04-19T23:32:05.3337840Z   �[0m�[1m/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Source/Runtime/Engine/Classes/Engine/BlendableInterface.h:10:7: �[0m�[0;1;30mnote: �[0mforward declaration of 'UMaterialInstanceDynamic'�[0m
2022-04-19T23:32:05.3338686Z   class UMaterialInstanceDynamic;
2022-04-19T23:32:05.3339542Z   �[0;1;32m      ^
2022-04-19T23:32:05.3340602Z   �[0mIn file included from /__w/13/s/Unreal/Environments/Blocks/Plugins/AirSim/Intermediate/Build/Linux/B4D820EA/UE4/Development/AirSim/Module.AirSim.2_of_2.cpp:2:
2022-04-19T23:32:05.3341982Z   �[1m/__w/13/s/Unreal/Environments/Blocks/Plugins/AirSim/Source/TextureShuffleActor.cpp:27:33: �[0m�[0;1;31merror: �[0m�[1mmember access into incomplete type 'UStaticMeshComponent'�[0m
2022-04-19T23:32:05.3343170Z           components[component_id]->SetMaterial(material_id, DynamicMaterialInstances[material_id]);
2022-04-19T23:32:05.3344016Z   �[0;1;32m                                ^
2022-04-19T23:32:05.3345124Z   �[0m�[1m/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Source/Runtime/CoreUObject/Public/Templates/Casts.h:22:7: �[0m�[0;1;30mnote: �[0mforward declaration of 'UStaticMeshComponent'�[0m
2022-04-19T23:32:05.3345923Z   class UStaticMeshComponent;
2022-04-19T23:32:05.3346544Z   �[0;1;32m      ^
2022-04-19T23:32:05.3347587Z   �[0mIn file included from /__w/13/s/Unreal/Environments/Blocks/Plugins/AirSim/Intermediate/Build/Linux/B4D820EA/UE4/Development/AirSim/Module.AirSim.2_of_2.cpp:2:
2022-04-19T23:32:05.3348986Z   �[1m/__w/13/s/Unreal/Environments/Blocks/Plugins/AirSim/Source/TextureShuffleActor.cpp:30:42: �[0m�[0;1;31merror: �[0m�[1mmember access into incomplete type 'UMaterialInstanceDynamic'�[0m
2022-04-19T23:32:05.3350235Z       DynamicMaterialInstances[material_id]->SetTextureParameterValue("TextureParameter", SwappableTextures[tex_id]);
2022-04-19T23:32:05.3351204Z   �[0;1;32m                                         ^
2022-04-19T23:32:05.3352371Z   �[0m�[1m/home/ue4/ue-4.25.1-linux-debugeditor/Engine/Source/Runtime/Engine/Classes/Engine/BlendableInterface.h:10:7: �[0m�[0;1;30mnote: �[0mforward declaration of 'UMaterialInstanceDynamic'�[0m
2022-04-19T23:32:05.3353202Z   class UMaterialInstanceDynamic;
2022-04-19T23:32:05.3353827Z   �[0;1;32m      ^
2022-04-19T23:32:20.9193704Z   �[0m4 errors generated.
2022-04-19T23:32:54.8141322Z Took 62.967595s to run mono, ExitCode=6
2022-04-19T23:32:54.8146565Z UnrealBuildTool failed. See log for more details. (/home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-Blocks-Linux-Development_2.txt)
2022-04-19T23:32:54.8235626Z AutomationTool exiting with ExitCode=6 (6)
2022-04-19T23:32:54.8531232Z RunUAT ERROR: AutomationTool was unable to run successfully.
2022-04-19T23:32:54.8613349Z ##[error]Bash exited with code '6'.
2022-04-19T23:32:54.8985792Z ##[section]Finishing: Package Blocks - Development

If you'd like to duplicate the packaging step of this check locally, you can see the command being run here: https://github.com/microsoft/AirSim/blob/master/pipelines/ci.yml#L49-L55

@niwc-jamelc
Copy link
Author

niwc-jamelc commented Apr 26, 2022

@zimmy87 Thank you for providing the build logs. In the meantime I installed ue 4.25.4 on linux and attempted to compile and package my airsim fork on linux. It was able to package successfully without errors.

I will take a look at the build errors, but from a glance, it looks like it's throwing errors about source files that were not changed in my fork.

@niwc-jamelc
Copy link
Author

@zimmy87 It appears I fixed the build errors in my pull request. There were some #includes missing for some Unreal classes used in the AirSim TextureShuffleActor class.

@jonyMarino jonyMarino changed the base branch from master to main July 17, 2022 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to map AirSim actions to steering wheel buttons?
3 participants