Robotics StackExchange | Archived questions

Cannot include trajectory_planner_ros.h

Hi, I am working on a simple turtlebot node that uses baselocalplanner 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.

Asked by mwerezak on 2015-09-30 21:30:26 UTC

Comments

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.

Asked by mwerezak on 2015-10-01 15:16:14 UTC

It seems the answer can be found here.

Asked by mwerezak on 2015-10-01 15:20:20 UTC

Answers

The missing file is * pcl/point_types.h* . Have you installed pcl?

Asked by clynamen on 2015-10-01 01:52:21 UTC

Comments

Ah, I wasn't aware pcl was separate from ROS. That's probably it.

Asked by mwerezak on 2015-10-01 11:03:54 UTC

I installed pcl using the instructions here, yet it still fails on that file :(

If that's not good enough, I also have what appear to be several dozen libpcl packages installed, plus ros-indigo-pcl-ros.

Asked by mwerezak on 2015-10-01 11:07:35 UTC