ROS problem solving _fatal error: ros/ros.h: No such file or directory #include “ros/ros.h”

created at 12-22-2021 views: 135

reason and solution

The reason is that there is something missing in the CMakelists.text file of the function package, and both find_package and include_directories are indispensable.

find_package(catkin  REQUIRED COMPONENTS

include_directories(include ${catkin_INCLUDE_DIRS} )
created at:12-22-2021
edited at: 12-22-2021: