eschnou / webflight-copterface

A port of the nodecopter copterface as a plugin to the ardrone-webflight environment.
MIT License
16 stars 10 forks source link

Copterface Error #3

Open jcold007 opened 10 years ago

jcold007 commented 10 years ago

any clue what this error means?

/home/jcold007/Desktop/office-drone/plugins/copterface/index.js:16 var face_cascade = new cv.CascadeClassifier(path.join(__dirname,'node_modules' ^ TypeError: Error loading file at Object. (/home/jcold007/Desktop/office-drone/plugins/copterface/index.js:16:20) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at /home/jcold007/Desktop/office-drone/app.js:136:5 at Array.forEach (native) at Object. (/home/jcold007/Desktop/office-drone/app.js:132:16)

It seems to not like that line of code under the index.js in the Copterface file. (var face_cascade). I am unable to find this variable in any other place in the file or in the web flight application. I have attempted to install this as a node module through the npm (node package manager), but the installation failed or perhaps it was not a module issue.

eschnou commented 10 years ago

This is weird, because the file is well part of opencv: https://github.com/peterbraden/node-opencv/tree/master/data

Once you have checked out the module, did you run npm install within the module ? This should create the path node_modules/opencv/data/ and within you should find the xml.

jcold007 commented 10 years ago

I have cloned the files from Peter Braden’s page (node-opencv). Now, should I drag the entire folder to the node_modules file in the web flight application or just use the xml file that it is using? Then run the npm install?

I am still getting the error when I do, so perhaps there should be other adjustments..? Perhaps with the config, I am not sure.

So I should still be running “npm install install” correct? I have and same error once I have placed the file in the node_modules

eschnou commented 10 years ago

You should not have to do any of that, the process should be:

git clone https://github.com/eschnou/ardrone-webflight.git
cd ardrone-webflight/
npm install
cd plugins/
git clone https://github.com/eschnou/webflight-copterface.git
cd webflight-copterface/
npm install

You should check you don't get any errors during the install, then you should see the files where they are supposed to be.

Next step is to add the plugin to config.js and you are good to go !

-> Are you sure the opencv modules install correctly ? It may fail if you don't have the opencv-devel package installed on your system as it requires it.

jcold007 commented 10 years ago

Ok let me play around with this.

I did get a lot of g++ warnings during the npm install of web-flight. Does that constitute as errors during install?

-I believe that I installed opencv properly.. How can I tell if I have? (or what can I tell you to help answer that question?)

I will keep you updated, Thank you

Ivan Coronel 4007 Huston Ave. Norwood, OH 45212 Xavier University Computer Science (513)382-8763 coronelj@xavier.edumailto:coronelj@xavier.edu

On Aug 22, 2014, at 3:05 PM, Laurent Eschenauer notifications@github.com<mailto:notifications@github.com> wrote:

You should not have to do any of that, the process should be:

git clone https://github.com/eschnou/ardrone-webflight.git cd ardrone-webflight/ npm install cd plugins/ git clone https://github.com/eschnou/webflight-copterface.git cd webflight-copterface/ npm install

You should check you don't get any errors during the install, then you should see the files where they are supposed to be.

Next step is to add the plugin to config.js and you are good to go !

-> Are you sure the opencv modules install correctly ? It may fail if you don't have the opencv-devel package installed on your system as it requires it.

— Reply to this email directly or view it on GitHubhttps://github.com/eschnou/webflight-copterface/issues/3#issuecomment-53106889.

RPEK001 commented 8 years ago

Hello @eschnou

I got a lot of errors during the install after: cd webflight-copterface/ nam install

Is there any way around?

Hope to hear from you soon, thank you!

icor8982 commented 8 years ago

It has been a while since I have worked on this for I cannot provide you with exact links or steps.. but make sure you have all the packages and dependencies installed. Not sure what your errors are but if they say something like "missing" or package missing, do "npm install package". Keep doing that for those are dependencies you need. Make sure everything is up to date as well.

vermamilan1 commented 8 years ago

I managed to run it I must say that its tricky and buggy to run this ill upload the fully working module for anyone who wants to use it . I have an issue after i press F key it doesnt track although face tracking is working fine with trollface plug-in maybe the reason is that F key is assigned for flip also in this code key 102 seems to be the trigger which according to keyboard mapping code in pilot.js is 6 am confused any help would be great