fatal error: ros/ros.h: No such file or directory——ROS编译过程出现错误
CMakeLists.txt文件添加代码
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
sensor_msgs
geometry_msgs
tf
)
include_directories(include ${catkin_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS})
add_executable(rpy_angles src/rpy_angles.cpp)
target_link_libraries(rpy_angles ${catkin_LIBRARIES})
package.xml文件添加代码
<run_depend>tf</run_depend>
<run_depend>nav_msgs</run_depend>
<build_depend>actionlib</build_depend>
<build_depend>actionlib_msgs</build_depend>
<run_depend>actionlib</run_depend>
<run_depend>actionlib_msgs</run_depend>
编译成功