ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

pointgrey_camera_driver fails to compile

asked 2016-05-02 18:38:27 -0600

M@t gravatar image

updated 2016-05-02 21:13:56 -0600

I'm trying to follow the navigation tutorials for the Clearpath Jackal here:

http://www.clearpathrobotics.com/asse...

However after installing everything from github in the jackal_navigation/src/ directory, it fails at the 'catkin make' stage and gives me this error:

-- +++ processing catkin package: 'pointgrey_camera_driver'
-- ==> add_subdirectory(pointgrey_camera_driver/pointgrey_camera_driver)
-- libflycapture not found in system library path
INFO:root:Logging into ptgrey.com.
INFO:root:Downloading SDK archive.
INFO:root:Unpacking tarball.
Traceback (most recent call last):
  File "/home/user/autosys_repo1/jackal_navigation/src/pointgrey_camera_driver/pointgrey_camera_driver/cmake/download_flycap", line 81, in <module>
    with tarfile.open(mode="r:gz", fileobj=cStringIO.StringIO(resp.read())) as tar:
  File "/usr/lib/python2.7/tarfile.py", line 1678, in open
    return func(name, filemode, fileobj, **kwargs)
  File "/usr/lib/python2.7/tarfile.py", line 1730, in gzopen
    raise ReadError("not a gzip file")
tarfile.ReadError: not a gzip file
-- libflycapture library: /home/user/autosys_repo1/jackal_navigation/devel/lib/libflycapture.so.2
-- libflycapture include: /home/user/autosys_repo1/jackal_navigation/build/pointgrey_camera_driver/pointgrey_camera_driver/usr/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/autosys_repo1/jackal_navigation/build

which is later followed by:

Scanning dependencies of target PointGreyCamera
make[2]: *** No rule to make target `/home/user/autosys_repo1/jackal_navigation/devel/lib/libflycapture.so.2', needed by `/home/user/autosys_repo1/jackal_navigation/devel/lib/libPointGreyCamera.so'.  Stop.
make[2]: *** Waiting for unfinished jobs....
[ 73%] Building CXX object pointgrey_camera_driver/pointgrey_camera_driver/CMakeFiles/PointGreyCamera.dir/src/PointGreyCamera.cpp.o
In file included from /home/user/autosys_repo1/jackal_navigation/src/pointgrey_camera_driver/pointgrey_camera_driver/src/PointGreyCamera.cpp:32:0:
/home/user/autosys_repo1/jackal_navigation/src/pointgrey_camera_driver/pointgrey_camera_driver/include/pointgrey_camera_driver/PointGreyCamera.h:46:36: fatal error: flycapture/FlyCapture2.h: No such file or directory
#include "flycapture/FlyCapture2.h"
                                ^
compilation terminated.

and:

Scanning dependencies of target image_exposure_msgs_generate_messages
[ 89%] Built target image_exposure_msgs_generate_messages
make[2]: *** [pointgrey_camera_driver/pointgrey_camera_driver/CMakeFiles/PointGreyCamera.dir/src/PointGreyCamera.cpp.o] Error 1
make[1]: *** [pointgrey_camera_driver/pointgrey_camera_driver/CMakeFiles/PointGreyCamera.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j2 -l2" failed

At this point the compilation fails completely and kicks me back to the command prompt "user@system:"

I'm currently using a VM running Ubuntu 14.04 LTS with ROS Indigo. This worked perfectly fine a few week ago, and I get the exact same error on a fresh VM install of Ubuntu/ROS so I assume this indicates a problem with the flycapture libraries, downloading them from the website or otherwise the library isn't present in the main ROS library (which it isn't but that didn't appear to be an issue previously). But I'm not sure if its a bug or something I've done wrong.

Does anyone else experience the same problem working through the same tutorial? And does anyone know how this might be solved?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-05-02 21:12:13 -0600

M@t gravatar image

Problem: When installing and compiling the pointgrey_camera_driver (as part of a tutorial or otherwise) cmake fails to build the package, giving an error similar to the one above.

Cause: pointgrey_camera_driver requires the Point Grey SDK, which cmake will automatically try to download it if cannot detect the SDK already on your system. However (and I may be wrong in this, so please correct me if I am), if the SDK version has changed and the pointgrey_camera_driver cmake file has not been updated to reflect this, the SDK will not install properly and the header files will not be present. This will cause cmake to crash during compilation, producing the error seen above.

Solution: Manually install the SDK version you need. In the pointgrey_camera_driver source files, open pointgrey_camera_driver/cmake/download_flycap and look for a section of code similar to this:

'x86_64': (
    'https://www.ptgrey.com/support/downloads/10594', (
        'flycapture2-2.9.3.13-amd64/libflycapture-2.9.3.13_amd64.deb',
        'flycapture2-2.9.3.13-amd64/libflycapture-2.9.3.13_amd64-dev.deb'),
    'usr/lib/libflycapture.so.2.9.3.13'),

This will tell you what version of the SDK cmake is expecting and where to get it. Then:

  1. Follow the url
  2. Log in (there will likely be a email and password just above this segment of code that you can use)
  3. Download the SDK and unpack it
  4. Open the readme file and it will guide you through the installation process
  5. Re-download the pointgrey-camera_driver files and compile them.

Cmake should now recognize the SDK version you've just installed and skip trying to download it from the Point Grey website. This should fix the problem.

edit flag offensive delete link more

Comments

It seems that pointgrey_camera_driver has been updated so this should no longer be a problem. However, it will still be useful for anyone who tries to install the driver after the next SDK change and before the driver is updated again.

M@t gravatar image M@t  ( 2016-05-31 18:14:49 -0600 )edit
2

answered 2016-05-02 19:00:01 -0600

William gravatar image

The package that's failing to build is pointgrey_camera_driver and it looks to be failing because you don't have the "Flycap" SDK installed completely. Glancing at the CMake code for that package:

https://github.com/ros-drivers/pointg...

It looks as if it will download the SDK for you if it doesn't find the flycap library. It is possible, since they are not also looking for the headers, e.g. flycapture/FlyCapture2.h, that they find the library on your system but you're missing the headers. That would prevent it from downloading a version of the SDK while building, but would fail later because your system doesn't have the headers required. I'd recommend looking at the CMake output just above the error you posted (generally you should include more information than you think you need for situations like these) to see if it downloaded the SDK itself or not. If you can't figure it out based on my answer, I'd recommend you open an issue against the pointgrey_camera_driver package:

https://github.com/ros-drivers/pointg...

You should double check that similar issue doesn't already exist too before opening a new one.

edit flag offensive delete link more

Comments

I've added more of the compilation output to the question (apologies if its too cluttered). Based on that output, it looks like the SDK drivers are being downloaded correctly, but fails to install because of the incorrect file type:

tarfile.ReadError: not a gzip file
M@t gravatar image M@t  ( 2016-05-02 19:52:38 -0600 )edit

And I've already checked for similar issues but couldn't find anything. I have noticed though, that the cmake file is looking for SDK version 2.9.3.13, and the latest version available on the PTG website is 2.9.3.43 which was updated on 27/05/2016 - less than a week ago.

M@t gravatar image M@t  ( 2016-05-02 19:53:42 -0600 )edit

So would I be correct in assuming that the problem is related to the updated version of the SDK? I tried updating the cmake file with the correct SDK version and download address, but that didn't change anything. (also the date the version changed is 27/04/2016, not 05)

M@t gravatar image M@t  ( 2016-05-02 20:08:51 -0600 )edit
1

I manually installed SDK version 2.9.3.13, deleted the files, started the tutorial over from scratch and...everything works, compilation was successful and the tutorial programs work. Thanks for the help William!

M@t gravatar image M@t  ( 2016-05-02 20:43:54 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-05-02 18:38:27 -0600

Seen: 3,433 times

Last updated: May 02 '16