Cannot include trajectory_planner_ros.h [closed]
Hi, I am working on a simple turtlebot node that uses base_local_planner to generate velocity commands. If put the following in my .cpp source file:
#include <base_local_planner/trajectory_planner_ros.h>
The compilation (using catkin_make
) fails with the following error message:
[100%] Building CXX object turtlebot_example/CMakeFiles/turtlebot_example_node.dir/src/turtlebot_example_node.cpp.o
In file included from /opt/ros/indigo/include/base_local_planner/world_model.h:41:0,
from /opt/ros/indigo/include/base_local_planner/trajectory_planner_ros.h:44,
from <workspace path>/src/turtlebot_example/src/turtlebot_example_node.cpp:22:
/opt/ros/indigo/include/costmap_2d/observation.h:36:29: fatal error: pcl/point_types.h: No such file or directory
#include <pcl/point_types.h>
^
compilation terminated.
make[2]: *** [turtlebot_example/CMakeFiles/turtlebot_example_node.dir/src/turtlebot_example_node.cpp.o] Error 1
make[1]: *** [turtlebot_example/CMakeFiles/turtlebot_example_node.dir/all] Error 2
make: *** [all] Error 2
It seems like the error is in some header in ros/indigo/include, which is frustrating.
After some more investigating, I'm pretty sure the issue here is that I don't understand cmake, or how to update the CMakeLists.txt to include and properly link to the PCL library.
It seems the answer can be found here.