移植autoware源码时出现编译问题汇总

1.

当 terminal 报 autoware_build_flags 错误
解决办法:
在CMakeLists.txt中注释掉:autoware_build_flags

2.

出现 #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
解决办法:
在CMakeLists.txt中添加:set(CMAKE_CXX_FLAGS “-std=c++0x”)

3.

ERROR: Cannot load message class for [autoware_msgs/LaneArray]. Are your messages built?
解决办法:
凡是自己自定义的插件或消息类型,进入相应的工作空间,然后 source devel/setup.bash

4.

自定义文件加载时fatal error: libwaypoint/libwaypoint_follower.h: 没有那个文件或目录
解决办法:
需要引用的头文件在另一个包libwaypoint 的include中,所以需要将 libwaypoint 中的CMakeList.txt做一些修改:将 include文件夹的头文件发布出去
,如取消注释:
catkin_package(
INCLUDE_DIRS include
LIBRARIES libwaypoint

)
并在相关调用包中的CMakeList 和 package 中添加包 libwaypoint

5.

/home/mahao/autoware_ws/src/astar_avoid/src/astar_avoid.cpp:414:对‘getClosestWaypoint(autoware_msgs::Lane_ const&, geometry_msgs::Pose_)’未定义的引用
解决办法:
在astar_avoid的 CMakeList 中, 添加 libwaypoint
如:target_link_libraries(astar_avoid libwaypoint
${catkin_LIBRARIES}
)

你可能感兴趣的:(autoware)