声明:本文写于2020年6月,只对当时的代码版本有效
1. 安装时在make launch遇到的问题:
问题已解决,原因是carla文档中已经标明,0.9.9以上版本carla只支持18.04版ubuntu,因此转到0.9.8 branch,根据需求安装clang-7,根据文档对unreal 4.24打补丁,再根据UE4.22 to UE4.24 upgrade. · carla-simulator/carla@6ba4d68 · GitHub 这个commit修改相关程序文件,最终make launch成功,CarlaUE4 Editor打开,并能够运行(存在若干Blueprint相关报错,未细查)
2. libpng16-dev与ros兼容问题:
潜在可能的回答:
Python API for Carla 0.9.3 requires libpng16 incompatible with ROS · Issue #1270 · carla-simulator/carla · GitHub :写了可以通过只安装libpng16-16解决
Error with `make PythonAPI` · Issue #901 · carla-simulator/carla · GitHub :写了可以关闭png support
3. windows build:
安装cmake:Windows 10+Visual Studio 2017+PCL1.8.1+CMake3.16.0安装与环境配置_Say No.的博客-CSDN博客
暂缓在windows下build,因为carla暂时只支持使用visual studio 2017,但可能与计算机中现存其他版本visual studio冲突。暂时不花费时间去尝试windows build了。
4. 在ubuntu 16.04下编译make PythonAPI时报错:
/usr/include/pngconf.h:383:12: error: unknown type name '__pngconf'
pngconf.h in libpng already includes setjmp.h;
^
/usr/include/pngconf.h:383:21: error: cannot use dot operator on a type
pngconf.h in libpng already includes setjmp.h;
^
/usr/include/pngconf.h:384:12: error: unknown type name 'dont'
dont include it again.;
^
/usr/include/pngconf.h:384:28: error: expected ';' after top level declarator
dont include it again.;
^
4 errors generated.
原因是为了不与ros冲突,在前置安装中没有安装libpng16-dev。
解决办法:
Error with `make PythonAPI` · Issue #901 · carla-simulator/carla · GitHub
即:将PythonAPI/setup.py中的所有-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT写为false。