声明:本文写于2020年4月,只对当时的代码版本有效
1. rviz看不到unreal的图片:
https://github.com/microsoft/AirSim/issues/2099
2. 修改Unreal文件夹的所属、权限:
Linux 给用户 赋某个文件夹操作的权限 - 重庆_杨静的个人空间 - OSCHINA - 中文开源技术交流社区
Ubuntu 更改文件夹及子文件夹权限_mzy202的专栏-CSDN博客_ubuntu更改文件夹及子文件夹权限
3. 修改Unreal文件夹所在“新加卷”磁盘名称:
Linux下修改(NTFS)磁盘(卷标)显示名称 - 窅山 - 博客园
4. unreal和airsim使用:知乎:
仿真器--airsim - 知乎
5. ubuntu查看硬件配置(准备升级内存)
Ubuntu查看硬件配置 - 简书
6. 按照此链接安装unreal的时候:
https://github.com/Microsoft/AirSim/blob/master/docs/build_linux.md#install-and-build
如果在make的时候遇到权限问题,退到Unreal所在文件夹下,运行:
sudo chown -R junchuan:junchuan UnrealEngine/
即可
7. 升级到unreal 4.24,make通过之后,打开UE4Editor时,在mt920主机上出现错误:
Failed to load the Vulcan Driver which is required to run the engine. The engine no longer fallbacks to OpenGL4 which has been deprecated.
推测是没有vulcan驱动,相关链接:
Falied to Load Vulcan Driver error in linux Ubuntu 16.04 LTS - Engine Source & GitHub - Unreal Engine Forums 未解决
https://github.com/carla-simulator/carla/issues/1977
安装vulcan驱动链接:
https://linuxconfig.org/install-and-test-vulkan-on-linux
在没有独立显卡的mt920主机上执行:
$ sudo add-apt-repository ppa:oibaf/graphics-drivers
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install libvulkan1 mesa-vulkan-drivers vulkan-utils
之后UE4Editor可以正常打开,但是打不开Airsim的Blocks环境,出现错误:
The project could not be compiled. Would you like to open it in Null Source Code Access?
Running /data/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Linux -Project="/data/AirSim/Unreal/Environments/Blocks/Blocks.uproject" -TargetType=Editor -Progress -NoHotReloadFromIDE
Scale at X=0.000000, Y=0.000000: 1.000000 (monitor=#0, HDPI=96.000000 (horz scale: 1.000000), VDPI=96.000000 (vert scale: 1.000000))
Scale at X=960.000000, Y=540.000000: 1.000000 (monitor=#0, HDPI=96.000000 (horz scale: 1.000000), VDPI=96.000000 (vert scale: 1.000000))
Running Mono...
Fixing inconsistent case in filenames.
Setting up Mono
/data/UnrealEngine/Engine /data/UnrealEngine/Engine/Binaries/Linux
Using 'git status' to determine working set for adaptive non-unity build (/data/UnrealEngine).
Creating makefile for BlocksEditor (no existing makefile)
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.
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.
@progress push 5%
Creating makefile for UnrealHeaderTool (no existing makefile)
@progress push 5%
@progress pop
------- Build details --------
Using toolchain located at '/data/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v15_clang-8.0.1-centos7/x86_64-unknown-linux-gnu'.
Using clang (/data/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v15_clang-8.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version '8.0.1' (string), 8 (major), 0 (minor), 1 (patch)
Using bundled libc++ standard C++ library.
Using lld linker
Using llvm-ar : /data/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v15_clang-8.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar
Using fast way to relink circularly dependent libraries (no FixDeps).
------------------------------
Parsing headers for BlocksEditor
Running UnrealHeaderTool "/data/AirSim/Unreal/Environments/Blocks/Blocks.uproject" "/data/AirSim/Unreal/Environments/Blocks/Intermediate/Build/Linux/B4D820EA/BlocksEditor/Development/BlocksEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors
/data/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/CameraDirector.h(24) : LogCompile: Error: 'ECameraDirectorMode' does not have a 0 entry! (This is a problem when the enum is initalized by default)
后将原有AirSim文件夹删除,并重新git clone下载最新的AirSim,在AirSim下执行setup和build。
能够正常打开AirSim的Blocks环境。
但此时在AirSim/ros下执行catkin_make会报错,似乎与使用clang有关。
8. 网络不好,下载失败
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
先输入:
git config --global http.postBuffer 2000000000
又出现了:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
最后按照链接:
git clone时RPC failed; curl 18 transfer closed with outstanding read data remaining - 雪山上的蒲公英 - 博客园
如果依旧clone失败,则首先浅层clone,然后更新远程库到本地
git clone --depth=1 http://gitlab.xxx.cn/yyy/zzz.git
git fetch --unshallow找到了解决办法。
9. /AirSim/ros下catkin_make仍不成功,参见issue:
https://github.com/microsoft/AirSim/issues/2551
后续:
AirSim issue 2551已经解决,方法是升级gcc到8
操作:
1. 在AirSim文件夹下
git fetch origin
git merge origin
再重新执行:
./setup.sh
./build.sh
2. 升级gcc:
sudo apt-get install gcc-8 g++-8
再将默认gcc改为高版本8:
更改gcc默认版本(gcc版本降级/升级)_帝江VII的博客-CSDN博客_降低gcc版本
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 180
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 180
然后通过gcc --version可以检查版本
3. 在AirSim/ros下执行catkin_make可以编译通过,airsim_ros_node可成功启动。
在使用安装carla的计算机上:
需注意:
1. 之前安装carla时安装的libpng16会导致ros-kinetic-cv-bridge不可用,需安装回libpng12。
2. 打开unreal后,不要忘记执行:
After Unreal Editor loads, press Play button. Tip: go to 'Edit->Editor Preferences', in the 'Search' box type 'CPU' and ensure that the 'Use Less CPU when in Background' is unchecked.文章来源:https://www.toymoban.com/news/detail-463702.html
否则在使用ros文件夹下的settings打开block仿真环境时,会卡死然后崩溃报错,退出程序。文章来源地址https://www.toymoban.com/news/detail-463702.html
到了这里,关于微软AirSim安装与使用的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!