Greetings,

UPDATE: ok an earlier version of MRL works. I installed version 1695 and it worked. 

 

I was getting a problem not being able to install the different services, kept getting errors when trying to download. 

 

Alessandruino

10 years 8 months ago

Hi kommi...in order to install services you have to be online... You did? Another thing... Type java -version in the command line to see if java jdk is installed..

GroG

10 years 8 months ago

Welcome kommi10 !

Ale is right !  You have to be online to install service - thanks for the noworky.. 
Good Luck !
Change Avatar - don't be scared hamster !

I know it's lame,
but try to move MRL to a directory without spaces....

Currently it looks like you have it here

Users/max/Documents/Eclipse%20Workspace/Java%20Libraries/myrobotlab.1987.20140310.1057

kommi10

10 years 8 months ago

Humm, for a minute there I thought it was gonna work. I just spent half a day trying to build and install openCV by itslef on my Mac and failing because of that. Fixing the space in the dir fixed that prob.

But unfortunately it did not fix this one :( here is the log after trying to install openCV with a new MRL. Also sent a "no worky". Thanks for all the help! 


UPDATE: ok an earlier version of MRL works. I installed version 1695 and it worked. 

Where do the services install exactly?

 

Thanks for the replies guys!

Can I submit a bug report?

Hi Kommi10,

A couple things :

1. If you build OpenCV you need to build 2.4.6 or 2.4.6.1
2. The changing of directories actually helped .. ya it didn't work but your a step closer...
3. AHAHAHAH   1695 that's funny :)  ... I'm glad it worked for you ... sortof :P ... heh we've been trying to get rid of 1695 for a while...

4. Services install in the same folder as your MRL .. yep .. no contaminating registries, or system folders...  all in one directory Yay - primarily they are libraries in the "libraries" sub folder.

5. Bug Report = No-Worky - and yes, at anytime you think somethings not right - send a no-worky

 

I see in your no-worky this "'x86.64.mac os x'" which is your machine trying to tell the repo it needs a particular flavor of libraries.... kind of like going to the ice cream shoppe and asking for pralines and cream.. the repo says "We don't have pralines and cream.. good bye" ... rude isn't ?

well you're computer shouldn't be asking for "pralines and cream" .. rather it should be asking for carmel swirl... apparently it forgot it likes carmel swirl

carmel swirl = "x86.64.mac" not "x86.64.mac os x" ... I'll fix it for the next release .. thanks for the info.

kommi10

10 years 8 months ago

GroG thanks for the reply!

 

I think I got it, but lemme review:

So when ever I install a new service it just downloads the .jar file into the libraries\jar folder

I see openCV-2.4.6.1.jar in there, so that is the version that MRL is currently using

I have the latest version of openCV built (2.4.8) in a seperate location, but not exaclty sure if that is ok. I dont see how that build would affect MRL. 

 

After using build 1695 and installing openCV, I run the GUI and try to play with openCV but it does not work with the Mac's webcam. I have a seperate post about this going, but just wanted to bring that up thinking the cause of the webcam not working could be related. Upon pressing capture the camera's light quickly goes on and off, the output reads "Cleaned up Camera" 

GroG

10 years 8 months ago

So when ever I install a new service it just downloads the .jar file into the libraries\jar folder

Yes... that is correct.

I see openCV-2.4.6.1.jar in there, so that is the version that MRL is currently using

Yes.. that is correct .

I have the latest version of openCV built (2.4.8) in a seperate location, but not exaclty sure if that is ok. I dont see how that build would affect MRL. 

It "might" not.  It depends on the details of where it was installled, and several other factors.  Usually the "make install" will install it under a usr/local/lib on Linux machines.  Of all the platforms I am the least familiar with the details of mac.  On Linux machines - libraries can not be loaded unless they have their path on the LD_LIBRARY_PATH environment variable.  I believe this is the same as DYLD_LIBRARY_PATH on a mac.  If you look at the myrobotlab.sh - you'll see it attempt to set these variables.  It puts it's local paths first - the libraries which it downloaded opencv then whatever was on the DYLD_LIBRARY_PATH variable last.  This is an attempt to prevent unkown stuff (like 2.4.8) from contaminating what mrl needs.

After using build 1695 and installing openCV, I run the GUI and try to play with openCV but it does not work with the Mac's webcam. I have a seperate post about this going, but just wanted to bring that up thinking the cause of the webcam not working could be related. Upon pressing capture the camera's light quickly goes on and off, the output reads "Cleaned up Camera" 

OpenCV has its own limitations.  It does not support all cameras. It's more likely that newer version of OpenCV would support newer versions of hardware.  MRL 1695 runs OpenCV 2.4.3.  MRL 1987+ runs OpenCV 2.4.6  

I understand you got "farther" with MRL 1695 - but my suggestion would be to delete it.  I believe I've fixed the os / asking for ice cream problem.  I just need to package it all up and deploy it ....  (Which leads to another issue I've been trying to deal with) ..  Recently code.google.com (where MRL is currently hosted) - has shut its doors - so I can't deploy releases there anymore .. I"m moving everything to github, but of course that takes time.

Hope this makes things more clear.

kommi10

10 years 8 months ago

It does. GorG, thank you sincerely. I have a munch better understanding of how it all works now, and where to start troubleshooting. 

Im new to open source development and really appreciate all the responses and feedback. 

I haven't coded anything in years but do have past exp with Java (making 2D game demos), and am very excited in working with MRL and contributing to the project in any way that I can. 

 

Cheers 

New release - 

https://github.com/MyRobotLab/myrobotlab/releases/tag/be4

Sorry it took so long..  I'm in the process of moving  everything from code.google.com to github.com
Still have logistics and infrastructure to work on (not nearly as fun a development, but necessary)
 

It's transitory - hopefully soon I'll have an auto-build system as I did before...
because the issue is about platform identification - you'll need to "re-install opencv service"
This can be done by :

1. putting the jar in the install directory/libraries/jar
2. deleting the .ivy directory (this will purge all installed services)
3. start mrl
4. install all services - System->update->install latest  (go grab favorite beverage)
5. come back - hopefully you'll have the appropraite opencv in the (install dir)/libraries/jar

Let me know if this makes sense

kommi10

10 years 8 months ago

Wow thats great!

ok so Downloaded MRL version 1987

Downloaded the new myrobotlab.jar
 
Ran the install for openCV and got this error:
 
checking for latest version of log4j
attempting to retrieve log4j info
ERROR - [unresolved dependency: org.apache.log4j#log4j;latest.integration: configuration not found in org.apache.log4j#log4j;1.2.14: 'x86.64.mac'. It was required from org.apache.log4j#log4j-caller;working default]
 
OpenCV Does install but I do not get any feed from the Mac's Isight camera. When I hit capture the green LED next to the camera goes on and off for a sec and that’s it. All I see is the MRL logo. 
 
So then I blow away the .ivy folder and install openCV again. This time MRL has to download all the other dependencies first, and it does so successfully without throwing any errors.
 
So the new jar fixed the earlier issue, Thanks for that GorG!!
 
But still cannot get the camera to work. 
 
I then tried to run the simple code (#file : OpenCV.LKOpticalTrack.py) off the openCV service page. http://myrobotlab.org/service/OpenCV
 
And it runs and the green iSIght LED lights on and stays on (unitl I quit MRL). BUt then no video. And I get the following error:
 
-----------------------
21378 [opencv_videoProcessor] ERROR class org.myrobotlab.logging.Logging  - ------
com.googlecode.javacv.FrameGrabber$Exception: cvGrabFrame() Error: Could not grab frame. (Has start() been called?)
at com.googlecode.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:211)
at org.myrobotlab.opencv.VideoProcessor.run(VideoProcessor.java:237)
at java.lang.Thread.run(Thread.java:744)
------
 
So it looks like the issue is with FrameGrabber. At one point I thought I read somewhere that FameGrabber needs to be replaced with something else to work on Mac, but I could not find any info again. (so maybe I read wrong)
 
 
I am not sure if the problem is with openCV or JavaCV, but I am thinknig its JavaCV…

grrr...  oh .. is ffmpeg in your jar directory ?

If not (its a shot in the dark) - download this and drop it in the libraries/jar folder .. if its not already there..

http://myrobotlab.googlecode.com/svn/trunk/myrobotlab/thirdParty/repo/net.sourceforge.opencv/opencv/2.4.6/ffmpeg-2.0.1-macosx-x86_64.jar

these jar bundles were compiled by Samuel @ JavaCV.. he compiles OpenCV with FFMPEG dependencies .. which I would leave out .. but to each his own (and it's his binaries) :)

kommi10

10 years 8 months ago

Hmm, getting closer. Now I get the camera's LED light on and I get this:

Yekaterinas-MacBook-Air:myrobotlab.1987.20140310.1057 max$ ./myrobotlab.sh

temp

createAndStartServices service count 2

Wed Apr  2 20:44:53 2014 CMIO_Unit_Output_Base.cpp:197:RenderBus something has gone wrong!

Wed Apr  2 20:44:53 2014 CMIO_Unit_Output_Base.cpp:199:RenderBus idx = 0, mNumInputs = 1, mNumInputsAllocatedFor = 0

Wed Apr  2 20:44:53 2014 CMIO_Unit_Output_Base.cpp:201:RenderBus theInput = 0x7fd4f87ae200, mPullInputOnNextRound = 0x0, mInputHasSeenEndOfData = 0x0

If I run the script I mentioned then it does not error out and alla I get in the Terminal is:

Cleaned up camera.

Cleaned up camera.

But in either case there is still no video feed displaying.

 

kommi10

10 years 7 months ago

Got it. OK well thanks to you I got MRL and OpenCV and everything to DL and install and startup no problem. 

I think the issue with me not seeing the webcam has something to do with javaCV. I tested by downloading javaCV seperately and then managed to get some simple code to run and show the webcam.

So then I tried to run the Python sample code called OpenCV.LKOpticalTrack.py from the MRL\OpenCV page, and I get the following error:
 

207335 [opencv_videoProcessor] ERROR class org.myrobotlab.logging.Logging  - ------
com.googlecode.javacv.FrameGrabber$Exception: cvGrabFrame() Error: Could not grab frame. (Has start() been called?)
at com.googlecode.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:211)
at org.myrobotlab.opencv.VideoProcessor.run(VideoProcessor.java:237)
at java.lang.Thread.run(Thread.java:744)
------
 
207336 [opencv_videoProcessor] INFO  class org.myrobotlab.opencv.VideoProcessor  - beginning capture
 
I then copied the latest javaCV (0.7) jar's  (javacpp.jar, javacv-macosx-x86_64.jar, javacv.jar) into the MRL libraries/jar dir. I though that would maybe change something but it didn't.
 
In my libraries/jar folder I see opencv-2.4.6.1-macosx-x86_64.jar. Is there a way I can put opencv-2.4.8-macosx-x86_64.jar into the /jar folder and have MRL use that one instead?
 
 
In the other thread KMC mentioned that he also could not get 2.4.6.1 to run on his Mac. I believe I am at the same point myself. Maybe replacing the openCV with the latest version would fix?

 

Ya .. sorry and welcome to the PITA of OpenCV

MRL current interface is to JavaCV & OpenCV 2.4.6  .. so I wouldn't expect the latest from opencv to work.

As a summary where are you?
OpenCV2.4.6.1 works for you? What exe did you use verify this?   Are you experimenting with both internal and webcam ?  Does the webcam work ?  It seems to me that the internal cam is especially a "nut" for macs.  When I build OpenCV I usually always include an exe for testing since there are 3 levels of software which need to work.  The lowest always being OpenCV.   I don't have a mac, so rely on JavaCV to for the binaries.   If you run an exe - you might get a meaningful message - and usually if there is an error or problem it is lost through the JNI level making it harder to diagnose the issue.

kommi10

10 years 7 months ago

Currently:

1. I  can get access to the webcam frames using Java and openCV 2.4.8

2. I can get access to the webcam frames using JavaCV 0.7 (latest) and openCV 2.4.8 

3. I can get openCV running in MRL but when I try to capture I get either no webcam feed (green LED turns on/off for a sec), but no errors as well.

or The webcam LED stays on but I get the following error:

Mon Apr 14 11:52:40 2014 CMIO_Unit_Output_Base.cpp:197:RenderBus something has gone wrong!

Mon Apr 14 11:52:40 2014 CMIO_Unit_Output_Base.cpp:199:RenderBus idx = 0, mNumInputs = 1, mNumInputsAllocatedFor = 0

Mon Apr 14 11:52:40 2014 CMIO_Unit_Output_Base.cpp:201:RenderBus theInput = 0x7ffec3a1ecf0, mPullInputOnNextRound = 0x0, mInputHasSeenEndOfData = 0x0

 

4. I try running the simple Python example from MRL\openCV page in MRL, and get the following error:

207335 [opencv_videoProcessor] ERROR class org.myrobotlab.logging.Logging  - ------
com.googlecode.javacv.FrameGrabber$Exception: cvGrabFrame() Error: Could not grab frame. (Has start() been called?)
at com.googlecode.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:211)
at org.myrobotlab.opencv.VideoProcessor.run(VideoProcessor.java:237)
at java.lang.Thread.run(Thread.java:744)
------
207336 [opencv_videoProcessor] INFO  class org.myrobotlab.opencv.VideoProcessor  - beginning capture
 

So I was going to try to step through the OpenCVFrameGrabber.java file and see if I can figure out whats throwing the error.

 

cheers!