oftheo / ofxleapmotion Goto Github PK
View Code? Open in Web Editor NEWA wrapper for the Leap SDK ( 0.8.1 and up ) - compatible with Leap 1.0 Release
A wrapper for the Leap SDK ( 0.8.1 and up ) - compatible with Leap 1.0 Release
can you package this as an addon (ie, not a project) :)
SDK version in this project is 2.0.3.
Current SDK version is 2.2.4.
I can probably update it to 2.2.2 (at least for linux64) and make a pull request in a bit.
Also the copyright date for Leap on the readme needs to change, as it is 2015.
Hello,
Thank you for your thorough work on ofxLeapMotion addon.
Not sure what is wrong on linux under your config,
we needed this beautiful controller working under unix,
this works:
LeapMotion Linux SDK version 2.3.1+31549
s373@20ff1b1
Fix ofxStrip
s373@9f1f3a0
example0 linux64
s373@518a195
32bits still not tested, but it holds same x86 lib from Leap SDK x64 version 2.3.1+31549, x86 version.
Best regards,
AS
--
andré sier
https://andre-sier.com
s373.net/x art codex studios
hey,
issue solved
:)
Upon app exit, I occasionally receive this error. Going to send off to Leap support. Looks like an issue with the lib.
App crash:
Thread 6 Crashed:
0 libsystem_kernel.dylib 0x93d949c6 __pthread_kill + 10
1 libsystem_c.dylib 0x9ade8f78 pthread_kill + 106
2 libsystem_c.dylib 0x9add9bdd abort + 167
3 libc++abi.dylib 0x9707b921 abort_message + 94
4 libc++abi.dylib 0x970791bc default_terminate() + 36
5 libc++abi.dylib 0x970791fe safe_handler_caller(void (*)()) + 15
6 libc++abi.dylib 0x97079268 std::terminate() + 23
7 libc++abi.dylib 0x9707a2a0 __cxa_throw + 112
8 libLeap.dylib 0x00815351 0x806000 + 62289
9 libLeap.dylib 0x00817c7d 0x806000 + 72829
10 libLeap.dylib 0x00817b66 0x806000 + 72550
11 libLeap.dylib 0x00825e16 0x806000 + 130582
12 libLeap.dylib 0x0081b519 0x806000 + 87321
13 libLeap.dylib 0x0081d361 0x806000 + 95073
14 libLeap.dylib 0x00827aff 0x806000 + 137983
15 libLeap.dylib 0x0082e22a 0x806000 + 164394
16 libLeap.dylib 0x008866e5 0x806000 + 526053
17 libsystem_c.dylib 0x9ade6ed9 _pthread_start + 335
18 libsystem_c.dylib 0x9adea6de thread_start + 34
Xcode:
libsystem_kernel.dylib`__pthread_kill:
0x97795a60: movl $524616, %eax
0x97795a65: calll 0x977974c2 ; _sysenter_trap
0x97795a6a: jae 0x97795a7a ; __pthread_kill + 26
0x97795a6c: calll 0x97795a71 ; __pthread_kill + 17
0x97795a71: popl %edx
0x97795a72: movl 26027(%edx), %edx
0x97795a78: jmpl *%edx
0x97795a7a: ret
0x97795a7b: nop
Hi theo, i do not get any data with the ofxLeapMotion example. I just see the black grid and thats it. Leapmotion is runnig, my Javascript Leapmotion example is running and even restarting the Leapmotion service does not help. Any advice is greatly appreciated. thanks.
I am struggling on adding ofxLeapMotion on my project.
Already changed the .qbs file.
of.addons: [
'ofxOsc','ofxLeapMotion'
]
The folder is on the addons.
I try to build and it tries to load but it says .
👎 error: error: ../../../addons/ofxLeapMotion/libs/lib/linux64/libLeap.so: No such file or directory
The file is there I am not sure if I should add anything else to the project qbs file
It seems that there is an issue with the library not loading:
dyld: Library not loaded: @loader_path/libLeap.dylib
** replace main.cpp codes with the following content;
#include "ofMain.h"
#include "testApp.h"
int main( ){
ofGLFWWindowSettings s;
s.setSize(1024, 768);
//s.setGLVersion(2, 1);
ofCreateWindow(s);
ofRunApp( new testApp());
}
** replace ofxStrip.h codes with the following content;
//Written by Theo Watson - http://theowatson.com
//Work in progress class for doing opengl strips / ribbons
#pragma once
#include "ofMesh.h"
class ofxStrip{
public:
ofxStrip(){
bTexCoords = true;
bNormals = true;
tex_u = 1.0;
tex_v = 1.0;
}
void clear(){
mesh.clear();
}
void setTexCoordScale( float tex_u_scale, float tex_v_scale ){
tex_u = tex_u_scale;
tex_v = tex_v_scale;
}
void generate( std::vector<glm::vec3> _pts, float fixedWidth, glm::vec3 upVec){
std::vector<float> _width;
_width.push_back(fixedWidth);
generate( _pts, _width, upVec);
}
void generate( std::vector<glm::vec3> pts, std::vector<float> width, glm::vec3 upVec){
bool bFixedWidth = false;
float curWidth;
float maxWidth = 0;
if( width.size() == 1 || ( width.size() && width.size() != pts.size() ) ){
bFixedWidth = true;
curWidth = width[0];
maxWidth = curWidth;
}
if( !bFixedWidth ){
for(int i = 0; i < width.size(); i++){
if( maxWidth > width[i] ){
maxWidth = width[i];
}
}
}
mesh.clear();
mesh.setMode(OF_PRIMITIVE_TRIANGLE_STRIP);
float numPts = pts.size()-1;
for(int i = 1; i < pts.size(); i++){
if( !bFixedWidth ){
curWidth = width[i];
}
//find this point and the next point
glm::vec3 & thisPoint = pts[i-1];
glm::vec3 & nextPoint = pts[i];
glm::vec3 delta = nextPoint - thisPoint;
glm::vec3 deltaNorm = glm::normalize(delta);
glm::vec3 toTheLeft = glm::perp(deltaNorm, upVec);
glm::vec3 L = thisPoint + toTheLeft * curWidth;
glm::vec3 R = thisPoint - toTheLeft * curWidth;
mesh.addVertex(L);
mesh.addVertex(R);
if( bNormals ){
glm::vec3 normal = glm::perp(deltaNorm, -toTheLeft);
mesh.addNormal(normal);
mesh.addNormal(normal);
}
if( bTexCoords ){
float texUPct = curWidth / maxWidth;
float texVPct = (float)(i-1) / numPts;
mesh.addTexCoord(ofVec2f((1.0-texUPct) * tex_u, texVPct * tex_v));
mesh.addTexCoord(ofVec2f(texUPct * tex_u, texVPct * tex_v));
}
}
mesh.setupIndicesAuto();
}
void enableTexCoords(){
bTexCoords = true;
}
void disableTexCoords(){
bTexCoords = false;
}
void enableNormals(){
bNormals = true;
}
void disableNormals(){
bNormals = false;
}
ofMesh getMesh(){
return mesh;
}
float tex_u, tex_v;
bool bTexCoords;
bool bNormals;
ofMesh mesh;
};
Any chance someone has already done this and can share? I'd be happy to do it if someone could provide some guidance.
Thank you.
It appears that gestures are now in place, but how do you use them? a small example or notes in the text would be really helpfull
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.