How to find a header path in a cpp file ROS
Solution 1:
The command gcc -H odometry.cpp
will list all the paths that gcc is searching for header files. Since as the previous command gave an error saying it couldn't find this header this list will not include the location, otherwise the previous command would have found ros/ros.h
and not produced that error.
The location of these header files in a standard ROS install will be:
/opt/ros/<distribution_name>/include
The path to these header files will be setup for you automatically if you've run the setup script source /opt/ros/<distribution_name>/setup.bash
or included it in your .bashrc
script.
Hope this helps.