decentropy / SentryTurret

A robot to visually track and target an object. (RaspberryPi2 + RaspiCam + OpenCV + Dlib + servos/driver)
54 stars 40 forks source link

Request Install Guide #4

Open rlefever opened 8 years ago

rlefever commented 8 years ago

I have had some trouble finding some of the software to install. apt-get and pip seem to not recognize them. Could you post an Install guide?

decentropy commented 8 years ago

which ones?

rlefever commented 8 years ago

Rasbian Jessie apt-get is unable to find open-cv mainly.

had to pip install configobj, webcolors and pyttsx

There needs to be some guidance with install boost. Their website talks about so many options and ways it is very confusing. I chose the basic of running ./bootstrap.sh with nothing else.

The sudo python setup.py install of dlib failed. could be because open-cv is not yet installed?

Some guidance needs to be given if any order of installation is important, please.

which ones?


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/steve-vincent/SentryTurret/issues/4#issuecomment-226981453

rlefever commented 8 years ago

sudo python setup.py install errors with:

Build using cmake ... Scanning dependencies of target dlib [ 1%] Building CXX object dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.o c++: error: unrecognized command line option âÂÂ-msse4â dlib_build/CMakeFiles/dlib.dir/build.make:54: recipe for target 'dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.o' failed make[2]: * [dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.o] Error 1 CMakeFiles/Makefile2:110: recipe for target 'dlib_build/CMakeFiles/dlib.dir/all' failed make[1]: * [dlib_build/CMakeFiles/dlib.dir/all] Error 2 Makefile:117: recipe for target 'all' failed make: *\ [all] Error 2 error: cmake build failed!

T0T3NK0PF commented 6 years ago

I have struggled with this too for about a week and it turns out that OpenCV needs to be compiled from source. I did it with OpenCV3.3 BUT, the code available here hasn't been updated for years.. and its NOT compatible with OpenCV3. So I recommend trying to compile OpenCV2 instead.

I followed this guide but again its OpenCV3 not OpenCV2 https://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/

OpenCV needs to be compiled and installed then Dlib or at least that's how I could get it compiled

I managed to get it working with OpenCV.3.3 updating some of the code however its buggy. The facial tracking (Option 1) doesn't work very well and Dlib and is extremely slow to process the video feed. The motors looses functionality after initial detection and moving and don't update new positions. The detection on object also doesn't reset or update and looses the target. Same for Color tracking. So a lot more work is needed.

Further note is that some of the listed software are installed via PIP and some apt. The included readme isn't very specific on how to install the different packages.

PIP Install these and not with apt: configobj pyttsx webcolors

For audio you need to install espeak sudo apt install espeak

If you dont have a speaker actively plugged in then set Quiet=1 in the config file else script crashed with jack error and alsa errors.

You also need to add the raspberry Pi cam to modprobe else the software crashes with OpenCV errors 0 frame because it cant activate the Rapsberry Pi Cam since the script relies on /dev/video0 being present. To do this.

sudo modprobe bcm2835-v4l2

or add bcm2835-v4l2 to /etc/modprobe using nano. to have it initialized on startup.

I am currently hoping the author steve-vincent would kindly update the code base to use OpenCV3 and the latest libs.