GithubHelp home page GithubHelp logo

Comments (17)

vrabaud avatar vrabaud commented on July 28, 2024

I guess you have 1.10.4 right ? Can you check you have a cv_bridge_boost.so file in your buidl tree ? Is that target even built ?

from image_pipeline.

Lenskiy avatar Lenskiy commented on July 28, 2024

Thank you for a quick reply! package.xml in src/cv_bridge says it's version 1.10.6. The whole repository is a few days old. Regarding cv_bridge_boost there is a dynamic library here /opt/ros/groovy/lib/python2.7/site-packages/cv_bridge/boost/cv_bridge_boost.dylib

Could it be that cv_bridge_boost.dylib is not found? On the other hand it is located in the right place.I will check env variables.

from image_pipeline.

Lenskiy avatar Lenskiy commented on July 28, 2024

I've checked (a) path env variables, (b) just in case copied cv_bridge_boost.dylib to /opt/ros/groovy/lib/, (c) tried to install homebrew python. Nothing works. Could it be that the problem is in version of Python? Which is 2.7.2. However, it is doubtful, because other packages work. How can I check cv_bridge version, besides looking at package.xml?
Versions of boost and opencv libraries are 1.49 and 2.4.5.
Any ides what else I can try?

from image_pipeline.

Lenskiy avatar Lenskiy commented on July 28, 2024

It is weird, when I run calibration for a stereo pair, I don't get any error messages.

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 right:=/stereo/right/image_raw left:=/stereo/left/image_raw left_camera:=/stereo/left right_camera:=/stereo/right
Waiting for service /stereo/left/set_camera_info ...
OK
Waiting for service /stereo/right/set_camera_info ...
OK

However the calibration windows is still incorrectly visualised. The picture is attached.
screen shot 2013-06-19 at 5 43 51 pm

from image_pipeline.

vrabaud avatar vrabaud commented on July 28, 2024

On Ubuntu, the lib is definitely there:
/opt/ros/hydro/lib/python2.7/dist-packages/cv_bridge/boost/cv_bridge_boost.so
What is this dylib file on OSX ? What is wrong in that CMake file then ?
https://github.com/ros-perception/vision_opencv/blob/groovy-devel/cv_bridge/src/CMakeLists.txt

from image_pipeline.

Lenskiy avatar Lenskiy commented on July 28, 2024

The CMake file is identical. dylib stands for dynamic library, it's the same as *.so on Linux.
I wonder why when I execute stereo calibration there are no errors. I tend to believe the problem is in visualisation. In the both cases the windows shows up, but incorrectly.

from image_pipeline.

Lenskiy avatar Lenskiy commented on July 28, 2024

I also tried compiling cv_bridge and the whole groovy with boost 1.49 and 1.53, but it did not help.
I checked what symbols cv_bridge_boost exports, and I could found there is
__ZN9cv_bridge9getCvTypeERKSs

from image_pipeline.

vrabaud avatar vrabaud commented on July 28, 2024

Since dbca650 , stereo cam uses the same code to convert to grayscale and the crash will most likely happen (it just has not been released yet). So the problem really is that you cannot load your *dylib file.
If you go in the folder where it is installed, start ipython and do "import cv_bridge_boost", what do you get ?

from image_pipeline.

Lenskiy avatar Lenskiy commented on July 28, 2024

If I rename cv_bridge_boost.dylib to cv_bridge_boost.so and imports now. I don't have cameras with me, I am going to check if calibration works and get back to you. Also I found there could be some issue with python. I had python installed from brew, but I did not link it. I was expecting the default pre-installed python is used, not the brew one. It looks like they got mixed up. Have to resolve it too.

from image_pipeline.

Lenskiy avatar Lenskiy commented on July 28, 2024

Vincent, there is progress! I connected the camera and after renaming the dylib to so it starts loading the library.
I am not sure why it cannot find dylib but looks for so. Any ideas what should be corrected for future releases for Mac users?

Unfortunately there are still problems.. I am not sure if have to create a new ticket.
Problem (1) When I calibrate stereo camera, the result is the same as before, no errors printed out, only broken window appears the same one I posted above. Is there any code difference in GUI initialisation between single and stereo camera calibration.

Problem (2) Even in a single camera case, the calibration process starts. It detects the pattern, however when it is ready to calibrate I cannot click calibrate, the window does not respond to any mouse actions.

from image_pipeline.

vrabaud avatar vrabaud commented on July 28, 2024

For 1, can you please try trunk and let me know if it is fixed.
For 2, I know it works on Linux, I don't know on OSX.
For the original dylib issues, @wjwwood , can you please let me know if it is normal or whether there should be a .so file on Linux ? Can you import a boost python module compiled as a .dylib ? Thx.

from image_pipeline.

Lenskiy avatar Lenskiy commented on July 28, 2024

I tried, nothing has changed. Still in the case of stereo calibration image don't show up. Single camera calibration does not allow me to click calibrate. Maybe @wjwwood has got some ideas? I will try to compare the code so single and stereo calibration, although don't have much experience coding in python. Regarding GUI in the calibration window, is it implemented by means of opencv GUI?

from image_pipeline.

wjwwood avatar wjwwood commented on July 28, 2024

On OS X, shared libraries should be postfixed with .dylib, and on Linux the same libraries should be .so. CMake automagically does the proper postfixing for shared libraries.

If you code is explicitly using .so somewhere it needs to specifically look for .dylib when on OS X.

from image_pipeline.

wjwwood avatar wjwwood commented on July 28, 2024

I would note though, that .so works on OS X too, but isn't the proper fix usually.

from image_pipeline.

Lenskiy avatar Lenskiy commented on July 28, 2024

There is no my code involved. There are only pure groovy packages, specifically image_pipeline and cv_bridge. I would like to know if someone can replicate this issue.
Anyways the whole problem now boiled down to visualisation. Unless there are some other libraries which extensions should be renamed.
I will try to rebuild groovy one more time :( I reinstalled python, who knows it might have some effect.

from image_pipeline.

wjwwood avatar wjwwood commented on July 28, 2024

Yeah I was meaning that some of the groovy packages might be doing this incorrectly. I haven't had time to try and reproduce this. I'll look into it today if I get the new bloom released on time.

from image_pipeline.

Lenskiy avatar Lenskiy commented on July 28, 2024

Here is the answers for the above stated problems
Problem 1: To calibrate stereo camera without hardware synchronisation, the approximate=0.01 flag should be used. If it's set up then problem 1 becomes problem 2.
Problem 2: On Mac OS X there is some problem with the visualisation. OpenCV cannot be built with OpenGL support if Cocoa is used as backend. I believe that was the problem. I also tried QT with OpenGL but QT window does not respond. I could not compile Carbon due to compilation problems. So the only option was to build OpenCV with GTK backend. To to so, I had to modify CMakeLists.txt in opencv folder as follows

Line 129:
OCV_OPTION(WITH_GTK            "Include GTK support"                         OFF  )

LINE 135:
OCV_OPTION(WITH_OPENGL         "Include OpenGL support"                      ON  IF (NOT ANDROID) )

LINE 617:
        status("    Carbon:" NO)
LINE 616:
        status("    Carbon:" NO)

LINE 140:
OCV_OPTION(WITH_QT             "Build with Qt Backend support"               OFF  IF (NOT ANDROID AND NOT IOS) )

Then gtk should be installed

brew install gtk+
brew install gtkglext

and /opt/X11/lib/pkgconfig should be added to ~/.profile

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig:$PKG_CONFIG_PATH

after building opencv, I could run calibration without a problem.

As mentioned before cv_bridge_boost.dylib should be renamed to cv_bridge_boost.so.

PS: I hope I did not forget to mention any steps.

from image_pipeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.