fatal error: pointgrey_camera_driver/PointGreyCamera.h: No such file or directory
I am trying to set some camera parameters in code instead of at launch, and compilation cannot use the driver header file. I assume it is in my cmake configuration, but I'm not sure where the error is, here is a stripped down version of my project:
#include <ros/ros.h>
#include <pointgrey_camera_driver/PointGreyCamera.h> \\ this line causes the compile error
class mweBlackfly
{
private:
ros::NodeHandle n;
public:
mweBlackfly()
{ros::Duration(5).sleep(); // sleep for 'x' second(s).}
};
int main(int argc, char **argv)
{
ros::init(argc, argv, "mweBlackfly");
return 0;
}
CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(mwe)
find_package(catkin REQUIRED COMPONENTS
pointgrey_camera_driver
)
catkin_package(
)
include_directories(${catkin_INCLUDE_DIRS})
add_executable( mweBlackfly src/mweBlackfly.cpp)
add_dependencies( mweBlackfly mwe_gencpp)
target_link_libraries(mweBlackfly ${catkin_LIBRARIES})
package.xml
<?xml version="1.0"?>
<package>
<name>mwe</name>
<version>0.0.0</version>
<description>The mwe package</description>
<maintainer email="turtlebot@todo.todo">turtlebot</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>pointgrey_camera_driver</build_depend>
<run_depend>pointgrey_camera_driver</run_depend>
<export>
<!-- Other tools can request additional information be placed here -->
</export>
</package>
compile error: /home/turtle
bot/ros/src/mwe/src/mweBlackfly.cpp:5:55: fatal error: pointgrey_camera_driver/PointGreyCamera.h: No such file or directory
compilation terminated.
mwe/CMakeFiles/mweBlackfly.dir/build.make:62: recipe for target 'mwe/CMakeFiles/mweBlackfly.dir/src/mweBlackfly.cpp.o' failed
make[2]: *** [mwe/CMakeFiles/mweBlackfly.dir/src/mweBlackfly.cpp.o] Error 1
CMakeFiles/Makefile2:442: recipe for target 'mwe/CMakeFiles/mweBlackfly.dir/all' failed
make[1]: *** [mwe/CMakeFiles/mweBlackfly.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
edit: I added a comment to the second #include line to highlight the code that causes the error to throw.
Asked by benabruzzo on 2017-06-21 01:47:48 UTC
Comments
Can you perhaps describe what it is that you actually want to do? "getting some parameters in code instead of at launch" is a bit vague, and I'm wondering whether there might be an easier / more appropriate approach to do what you want.
Asked by gvdhoorn on 2017-06-21 02:26:37 UTC
I think I figured out a workaround: I believe the driver binds values to the parameters at launch, and they need dynamic reconfigure to edit. I used the command line option found here to load a yaml: http://library.isr.ist.utl.pt/docs/roswiki/dynamic_reconfigure.html
Asked by benabruzzo on 2017-06-27 23:41:13 UTC