cmake_minimum_required(VERSION 2.8.3) project(ego_planner) set(CMAKE_BUILD_TYPE "Release") ADD_COMPILE_OPTIONS(-std=c++11 ) ADD_COMPILE_OPTIONS(-std=c++14 ) set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g") find_package(Eigen3 REQUIRED) find_package(PCL 1.7 REQUIRED) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs geometry_msgs quadrotor_msgs plan_env path_searching bspline_opt traj_utils message_generation cv_bridge ) # catkin_package(CATKIN_DEPENDS message_runtime) catkin_package( INCLUDE_DIRS include LIBRARIES ego_planner CATKIN_DEPENDS plan_env path_searching bspline_opt traj_utils # DEPENDS system_lib ) include_directories( include SYSTEM ${catkin_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/include ${EIGEN3_INCLUDE_DIR} ${PCL_INCLUDE_DIRS} ) add_executable(ego_planner_node src/ego_planner_node.cpp src/ego_replan_fsm.cpp src/planner_manager.cpp ) target_link_libraries(ego_planner_node ${catkin_LIBRARIES} ) #add_dependencies(ego_planner_node ${${PROJECT_NAME}_EXPORTED_TARGETS}) add_executable(traj_server src/traj_server.cpp) target_link_libraries(traj_server ${catkin_LIBRARIES}) #add_dependencies(traj_server ${${PROJECT_NAME}_EXPORTED_TARGETS})
时间: 2023-09-12 11:10:51 浏览: 194
这段代码是一个 CMakeLists.txt 文件,用于编译一个名为 ego_planner 的工程。该工程依赖于 Eigen3 和 PCL 库,同时也依赖于一些 ROS 的组件,如 roscpp、std_msgs、geometry_msgs、quadrotor_msgs、plan_env、path_searching、bspline_opt、traj_utils 和 message_generation。该工程包含两个可执行文件,一个是 ego_planner_node,另一个是 traj_server。其中 ego_planner_node.cpp 是主程序,它包含了 ego_replan_fsm.cpp 和 planner_manager.cpp 两个文件。traj_server.cpp 是用于生成轨迹的服务器程序。在编译过程中,使用了 C++11 和 C++14 标准,同时开启了 Release 模式。
阅读全文