beta-robots / ptgrey_bfly_camera

ROS / C++ driver of Point Grey's Black Fly camera
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

fatal error: sensor_msgs/SnapshotImage.h: No such file or directory compilation terminated. #14

Closed aihanb closed 4 years ago

aihanb commented 5 years ago

I run $ catkin_make --only-pkg-with-deps ptgrey_bfly_camera in my rosworkspace.

But the problem occurred:

[ 50%] Built target bfly_capture [ 60%] Building CXX object ptgrey_bfly_camera/src/examples/CMakeFiles/bfly_camera_client_main.dir/bfly_camera_client_main.cpp.o [ 70%] Building CXX object ptgrey_bfly_camera/CMakeFiles/ptgrey_bfly_camera.dir/src/bfly_camera_node_main.cpp.o [ 80%] Building CXX object ptgrey_bfly_camera/CMakeFiles/ptgrey_bfly_camera.dir/src/bfly_camera_node.cpp.o In file included from /home/drl/rosworkspace/src/ptgrey_bfly_camera/src/bfly_camera_node_main.cpp:3:0: /home/drl/rosworkspace/src/ptgrey_bfly_camera/src/bfly_camera_node.h:20:82: fatal error: sensor_msgs/SnapshotImage.h: No such file or directory compilation terminated. ptgrey_bfly_camera/CMakeFiles/ptgrey_bfly_camera.dir/build.make:86: recipe for target 'ptgrey_bfly_camera/CMakeFiles/ptgrey_bfly_camera.dir/src/bfly_camera_node_main.cpp.o' failed make[2]: [ptgrey_bfly_camera/CMakeFiles/ptgrey_bfly_camera.dir/src/bfly_camera_node_main.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... In file included from /home/drl/rosworkspace/src/ptgrey_bfly_camera/src/bfly_camera_node.cpp:1:0: /home/drl/rosworkspace/src/ptgrey_bfly_camera/src/bfly_camera_node.h:20:82: fatal error: sensor_msgs/SnapshotImage.h: No such file or directory compilation terminated. ptgrey_bfly_camera/CMakeFiles/ptgrey_bfly_camera.dir/build.make:62: recipe for target 'ptgrey_bfly_camera/CMakeFiles/ptgrey_bfly_camera.dir/src/bfly_camera_node.cpp.o' failed make[2]: [ptgrey_bfly_camera/CMakeFiles/ptgrey_bfly_camera.dir/src/bfly_camera_node.cpp.o] Error 1 CMakeFiles/Makefile2:480: recipe for target 'ptgrey_bfly_camera/CMakeFiles/ptgrey_bfly_camera.dir/all' failed make[1]: [ptgrey_bfly_camera/CMakeFiles/ptgrey_bfly_camera.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... /home/drl/rosworkspace/src/ptgrey_bfly_camera/src/examples/bfly_camera_client_main.cpp:6:82: fatal error: sensor_msgs/SnapshotImage.h: No such file or directory compilation terminated. ptgrey_bfly_camera/src/examples/CMakeFiles/bfly_camera_client_main.dir/build.make:62: recipe for target 'ptgrey_bfly_camera/src/examples/CMakeFiles/bfly_camera_client_main.dir/bfly_camera_client_main.cpp.o' failed make[2]: [ptgrey_bfly_camera/src/examples/CMakeFiles/bfly_camera_client_main.dir/bfly_camera_client_main.cpp.o] Error 1 CMakeFiles/Makefile2:1670: recipe for target 'ptgrey_bfly_camera/src/examples/CMakeFiles/bfly_camera_client_main.dir/all' failed make[1]: [ptgrey_bfly_camera/src/examples/CMakeFiles/bfly_camera_client_main.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: [all] Error 2 Invoking "make -j4 -l4" failed

Could you give me some suggestions?

carlosjoserg commented 5 years ago

Hi @aihanb

In several applications we have found that there is no need to keep streaming an image when a snaphot has been already taken. This way, the network, PC, and everything is nor overloaded, specially with 3D cameras.

So we added a service call SnapshotImage to do exactly that, take a snapshot. Thus, you'd need our fork version of the common_msgs package.

If you find that change useful for your use-case and you would like to have it mainstream, we already suggested the change in https://github.com/ros/common_msgs/pull/105 that you can support.

See if that solves your build problems.

aihanb commented 5 years ago

Hello @carlosjoserg

Thanks for your reply, it does work. But another problem occurred, after running $ roslaunch ptgrey_bfly_camera ptgrey_bfly_camera.launch

process[rviz-2]: started with pid [32437] BflyCamera::Device::Device()` ERROR: GigE camera not found Error Trace: Source: GigECameraInternal.cpp(216) Built: Mar 30 2017 01:42:38 - Specified camera is not a GigE Vision camera! [ERROR] [1543374521.652651189]: Error when opening the camera

I found that this driver was connected to the GigE camera, actually, my camera is Black Fly U3. orz...

carlosjoserg commented 5 years ago

Hi @aihanb

ERROR: GigE camera not found

It looks like an error due to bad install / config of the PointGrey SDK, or connection.

I found that this driver was connected to the GigE camera, actually, my camera is Black Fly U3. orz...

Can you describe the steps, models and version you have?

Best,