Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get it to work #7

Open
dpashkevich opened this issue Jan 8, 2014 · 11 comments
Open

Can't get it to work #7

dpashkevich opened this issue Jan 8, 2014 · 11 comments

Comments

@dpashkevich
Copy link

Hi, thanks for making leapmouse! I'm trying to use it on Ubuntu 13.10 but it doesn't seem to work.

I downloaded the latest SDK for linux, installed xtest as instructed and launched the app but no matter how I try, the cursor won't move on the screen.

The only output in the terminal is:

$ ./LeapMouse 
width: 1680
height: 1950
Initialized
Press Enter to quit...
Connected
Focus Gained
@JeffBobbo
Copy link
Contributor

If you're using the latest SDK the header might need updating in the include directory (don't ask me why they're there).

Also, check your Leap is actually working properly by using the diagnostic visualizer. XD

@dpashkevich
Copy link
Author

The visualizer does work properly. Any suggestions on how to make your app work? I'm open to experiments :)

@JeffBobbo
Copy link
Contributor

Line 7 in the Makefile says:

INCLUDES:=-Iinclude

Replace 'include' with the path to your SDK's include directory, like:
/home/bob/leap/LeapSDK/include

That might work, I dunno, I stopped working on it to work on other things. ;)

@GCorbel
Copy link
Contributor

GCorbel commented Jan 8, 2014

I think it can be usefull to do debugging. Can you try to clone the projet on your local machine and add a trace after this line.

Just do something like this std::cout << "entered in the loop" << std::endl; to see if leap motion try to recognize something.

Rebuild the project and try it.

@dpashkevich
Copy link
Author

@JeffBobbo it's like 6 in my file and I changed it to:

INCLUDES:= -I /home/dpashk/src/LeapDeveloperKit/LeapSDK/include

Now the build fails as gcc tries to locate @mousemanager.h@ that doesn't exist:

rm -rf LeapMouse LeapMouse.dSYM
g++ -o LeapMouse -I /home/dpashk/src/LeapDeveloperKit/LeapSDK/include  mousemanager.cpp Leapmouse.cpp  -lXtst -Wl,-rpath,../../lib/x64  -L../../lib/x64 -lLeap -L /usr/X11R6/lib -lX11
mousemanager.cpp:7:26: fatal error: mousemanager.h: No such file or directory
 #include "mousemanager.h"
                          ^
compilation terminated.
Leapmouse.cpp:6:26: fatal error: mousemanager.h: No such file or directory
 #include "mousemanager.h"
                          ^
compilation terminated.
make: *** [LeapMouse] Error 1

Sorry I'm not really experienced in C++...

@dpashkevich
Copy link
Author

Oh ok, that's cause I need to specify both include paths when compiling. I recompiled the source manually with:

g++ -o LeapMouse -I include -I /home/dpashk/src/LeapDeveloperKit/LeapSDK/include  mousemanager.cpp Leapmouse.cpp  -lXtst -Wl,-rpath,../../lib/x64  -L../../lib/x64 -lLeap -L /usr/X11R6/lib -lX11

This time it recompiled successfully but nothing changed, I still can't control the cursor with my finger. Going to try @GCorbel's suggestion for debugging now.

@JeffBobbo
Copy link
Contributor

Bleh, to be honest, there are people of similar things like this on the internet which'll probably be more usable for you. Not to mention less buggy and more feature full. XD

Archetipo never gave me push access to this repo and I got kinda fed up and done small fork, but I'm not sure if that'll help.

We were all kinda learning at the time.

Also, you need to include the file from the LeapSDK before the include directory.

@dpashkevich
Copy link
Author

@GCorbel I added the debug line, the file now looks like this:

 71 void SampleListener::onFrame(const Controller& controller)
 72 {
 73   std::cout << "entered in the loop" << std::endl;
 74   // This function needs to be broken up, it's way too long
 75   const Frame frame = controller.frame();
 76   //int currid = 1;

Now the program prints a bunch of "entered in the loop" messages even if I'm not moving my hands in front of the device.

@dpashkevich
Copy link
Author

@JeffBobbo I know there are other projects, I'm thinking of trying http://airinput.com/ but they don't have a demo you can try before you buy.

I was just interested in checking out the existing open source projects made with LeapSDK.

Including the LeapSDK @includes@ directory before the local one in g++ cmdline didn't change anyting. Also tried your fork with no luck. Thanks for trying to help anyway!

@GCorbel
Copy link
Contributor

GCorbel commented Jan 8, 2014

I suggest you to try PyLeapMouse. (I contributed to this project too)

@dpashkevich
Copy link
Author

Thanks, I'll try that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants