Hi,
what is the current status of leap motion support for Pd? I saw Chikashi Miyama's external at https://github.com/chikashimiyama/Pd_leapmotion and a specific windows version apparently for leap motion V.2 https://github.com/chikashimiyama/Pd_Leapmotion_win
Am I correct to assume that the latter uses some leapmotion SDK that the former doesn't use? What would furthermore be the best way to use the controller under linux in Pd?
Thanks for all hints! P
Hi,
some time ago I commissioned Chikashi to update the external to the newest
leapmotion sdk, as there were lots of advantages compared to the 1st
version. The sdk chosen was v2, because the 3rd one is more oriented for
virtual reality, which seems to be the main focus of the leap these days,
but doesn't interest me.
Since I use windows, I only commisioned a windows external. But the code
is there, anyone is encouraged to compile it for other plattforms. I guess
Chikashi should be able to give more advice on that, in case the code
isn't clear.
Best,
Joao
Hi,
what is the current status of leap motion support for Pd? I saw Chikashi Miyama's external at https://github.com/chikashimiyama/Pd_leapmotion and a specific windows version apparently for leap motion V.2 https://github.com/chikashimiyama/Pd_Leapmotion_win
Am I correct to assume that the latter uses some leapmotion SDK that the former doesn't use? What would furthermore be the best way to use the controller under linux in Pd?
Thanks for all hints! P
So it seems that there is an OS X binary of [leapmotion] at http://puredatajapan.info/?page_id=1514 of which I assume it was compiled with the v1 SDK
as well as a 64bit linux binary at https://philtgun.me/2017/02/04/leap-synthesizer-in-pure-data/ which I assume to be v1 SDK as well.
Can anyone confirm?
Thanks so much! Peter
Hi,
some time ago I commissioned Chikashi to update the external to the newest leapmotion sdk, as there were lots of advantages compared to the 1st version. The sdk chosen was v2, because the 3rd one is more oriented for virtual reality, which seems to be the main focus of the leap these days, but doesn't interest me.
Since I use windows, I only commisioned a windows external. But the code is there, anyone is encouraged to compile it for other plattforms. I guess Chikashi should be able to give more advice on that, in case the code isn't clear.
Best,
Joao
Hi,
what is the current status of leap motion support for Pd? I saw Chikashi Miyama's external at https://github.com/chikashimiyama/Pd_leapmotion and a specific windows version apparently for leap motion V.2 https://github.com/chikashimiyama/Pd_Leapmotion_win
Am I correct to assume that the latter uses some leapmotion SDK that the former doesn't use? What would furthermore be the best way to use the controller under linux in Pd?
Thanks for all hints! P
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
So it seems that there is an OS X binary of [leapmotion] at http://puredatajapan.info/?page_id=1514 of which I assume it was compiled with the v1 SDK
as well as a 64bit linux binary at https://philtgun.me/2017/02/04/leap-synthesizer-in-pure-data/ which I assume to be v1 SDK as well.
I tried this linux binary external today with an actual leap motion controller and the leapd starts fine, LeapControlPanel works as well, but Pd crashes once I ask the successfully loaded [leapmotion] external for data with a single or continuous bangs.
Here is the backtrace of it. I hope anyone can give me a hint about what I could try next? thanks! P
(gdb) run Starting program: /usr/bin/pd -path linux64bit Pd_leapmotion_0.1_mac/leap_motion_help.pd [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Detaching after fork from child process 14993] [Detaching after fork from child process 14996] [New Thread 0x7ffff6d7c700 (LWP 15011)] [New Thread 0x7ffff657b700 (LWP 15012)] [New Thread 0x7ffff5d7a700 (LWP 15013)] [New Thread 0x7fffeffff700 (LWP 15014)] [New Thread 0x7ffff5579700 (LWP 15015)] [New Thread 0x7ffff4d78700 (LWP 15016)] [New Thread 0x7fffef7fe700 (LWP 15017)] [New Thread 0x7fffee7fc700 (LWP 15022)] [New Thread 0x7fffeeffd700 (LWP 15021)] [New Thread 0x7fffed7fa700 (LWP 15026)] [New Thread 0x7fffedffb700 (LWP 15023)]
Thread 1 "pd" received signal SIGILL, Illegal instruction. 0x00007ffff6d8cca4 in ?? () from linux64bit/leapmotion.pd_linux (gdb) watchdog: signaling pd... (gdb) btwatchdog: signaling pd... watchdog: signaling pd...
#0 0x00007ffff6d8cca4 in ?? () from linux64bit/leapmotion.pd_linux #1 0x00007ffff6d8d139 in ?? () from linux64bit/leapmotion.pd_linux #2 0x00007ffff6d964c6 in flext_base_single::TryMethTag(flext_base_single::Item*, _symbol const*, int, _atom const*) () from linux64bit/leapmotion.pd_linux #3 0x00007ffff6d966b8 in flext_base_single::FindMeth(int, _symbol const*, int, _atom const*) () from linux64bit/leapmotion.pd_linux #4 0x00007ffff6d9688c in flext_base_single::CbMethodHandler(int, _symbol const*, int, _atom const*) () from linux64bit/leapmotion.pd_linux #5 0x000055555560e611 in outlet_bang () #6 0x00005555555a543e in ?? () #7 0x00005555555beb81 in ?? () #8 0x000055555560bc99 in pd_typedmess () #9 0x0000555555608637 in binbuf_eval () #10 0x00005555556199d6 in socketreceiver_read () #11 0x0000555555618aec in ?? () #12 0x0000555555611cf2 in m_mainloop () #13 0x00007ffff733509b in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #14 0x000055555556b22a in _start () (gdb) watchdog: signaling pd... Quit (gdb) watchdog: signaling pd... Quit (gdb) quiwatchdog: signaling pd... t A debugging session is active.
Inferior 1 [process 14989] will be killed.
Quit anyway? (y or n) y
I think you need to start pd with the leap library preloaded:
LD_PRELOAD=~/path/to/LeapDeveloperKit/LeapSDK/lib/x64/libLeap.so ~/path/to/pd/bin/pd ~/path/to/patch.pd
On 12.03.19 14:30, Peter P. wrote:
- Peter P. peterparker@fastmail.com [2019-03-11 23:03]:
So it seems that there is an OS X binary of [leapmotion] at http://puredatajapan.info/?page_id=1514 of which I assume it was compiled with the v1 SDK
as well as a 64bit linux binary at https://philtgun.me/2017/02/04/leap-synthesizer-in-pure-data/ which I assume to be v1 SDK as well.
I tried this linux binary external today with an actual leap motion controller and the leapd starts fine, LeapControlPanel works as well, but Pd crashes once I ask the successfully loaded [leapmotion] external for data with a single or continuous bangs.
Here is the backtrace of it. I hope anyone can give me a hint about what I could try next? thanks! P
(gdb) run Starting program: /usr/bin/pd -path linux64bit Pd_leapmotion_0.1_mac/leap_motion_help.pd [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Detaching after fork from child process 14993] [Detaching after fork from child process 14996] [New Thread 0x7ffff6d7c700 (LWP 15011)] [New Thread 0x7ffff657b700 (LWP 15012)] [New Thread 0x7ffff5d7a700 (LWP 15013)] [New Thread 0x7fffeffff700 (LWP 15014)] [New Thread 0x7ffff5579700 (LWP 15015)] [New Thread 0x7ffff4d78700 (LWP 15016)] [New Thread 0x7fffef7fe700 (LWP 15017)] [New Thread 0x7fffee7fc700 (LWP 15022)] [New Thread 0x7fffeeffd700 (LWP 15021)] [New Thread 0x7fffed7fa700 (LWP 15026)] [New Thread 0x7fffedffb700 (LWP 15023)]
Thread 1 "pd" received signal SIGILL, Illegal instruction. 0x00007ffff6d8cca4 in ?? () from linux64bit/leapmotion.pd_linux (gdb) watchdog: signaling pd... (gdb) btwatchdog: signaling pd... watchdog: signaling pd...
#0 0x00007ffff6d8cca4 in ?? () from linux64bit/leapmotion.pd_linux #1 0x00007ffff6d8d139 in ?? () from linux64bit/leapmotion.pd_linux #2 0x00007ffff6d964c6 in flext_base_single::TryMethTag(flext_base_single::Item*, _symbol const*, int, _atom const*) () from linux64bit/leapmotion.pd_linux #3 0x00007ffff6d966b8 in flext_base_single::FindMeth(int, _symbol const*, int, _atom const*) () from linux64bit/leapmotion.pd_linux #4 0x00007ffff6d9688c in flext_base_single::CbMethodHandler(int, _symbol const*, int, _atom const*) () from linux64bit/leapmotion.pd_linux #5 0x000055555560e611 in outlet_bang () #6 0x00005555555a543e in ?? () #7 0x00005555555beb81 in ?? () #8 0x000055555560bc99 in pd_typedmess () #9 0x0000555555608637 in binbuf_eval () #10 0x00005555556199d6 in socketreceiver_read () #11 0x0000555555618aec in ?? () #12 0x0000555555611cf2 in m_mainloop () #13 0x00007ffff733509b in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #14 0x000055555556b22a in _start () (gdb) watchdog: signaling pd... Quit (gdb) watchdog: signaling pd... Quit (gdb) quiwatchdog: signaling pd... t A debugging session is active.
Inferior 1 [process 14989] will be killed.
Quit anyway? (y or n) y
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
I think you need to start pd with the leap library preloaded:
LD_PRELOAD=~/path/to/LeapDeveloperKit/LeapSDK/lib/x64/libLeap.so ~/path/to/pd/bin/pd ~/path/to/patch.pd
Thanks Max, that's what I already did in the call to the debugger:
$ gdb --args LD_PRELOAD=LeapDeveloperKit_2.3.1+31549_linux/LeapSDK/lib/x64/libLeap.so /usr/bin/pd -path linux64bit Pd_leapmotion_0.1_mac/leap_motion_help.pd
Without debugger the external fails indeed without that line.
Hi all -
I didn't have much trouble ust compiling the "Sample.cpp" example in the 2.3 development kit; this prints lots of stuff on standard output. I then changed the print statements in the code to only print out the numbers I cared about with a trailingsemicolon, then piped to "pdsend", giving it a UDP port in my patch.
Because the sample program sometimes just quits I make an auto-restarting script:
while true; do
/home/msp/work/poolbox-leap/leap2pool |
/home/msp/pd/bin/pdsend 3000 localhost udp
echo restart...
sleep 1
done
(where "leap2pool" is my version of Sample.cpp). I think this is pretty robust - if a leap extern in Pd decided to crash it would takePd down but the way I do it I only lose a second of connection.
cheers Miller
On Tue, Mar 12, 2019 at 03:32:59PM +0100, Peter P. wrote:
- Max abonnements@revolwear.com [2019-03-12 15:18]:
I think you need to start pd with the leap library preloaded:
LD_PRELOAD=~/path/to/LeapDeveloperKit/LeapSDK/lib/x64/libLeap.so ~/path/to/pd/bin/pd ~/path/to/patch.pd
Thanks Max, that's what I already did in the call to the debugger:
$ gdb --args LD_PRELOAD=LeapDeveloperKit_2.3.1+31549_linux/LeapSDK/lib/x64/libLeap.so /usr/bin/pd -path linux64bit Pd_leapmotion_0.1_mac/leap_motion_help.pd
Without debugger the external fails indeed without that line.
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Thanks Miller, I now found the time to try your approach and it is indeed a nice one! Three quick questions arise:
If I don't terminate the output of the Sample.cpp program with a semicolon it also works. Is there a difference?
What would be the best formatting to save as much network traffic as possible? I discover that Pd (wish, for that matter) consumes quite a lot of cpu when receiving tracking data. Do newlines make a difference?
Did you manage to get rid of commas or parentheses in Sample.cpp's output? I can't seem to find a way to do it but it would help tremendously to parse the data in Pd with [route] and [unpack].
Curious and excited, with thanks! Peter
Hi all -
I didn't have much trouble ust compiling the "Sample.cpp" example in the 2.3 development kit; this prints lots of stuff on standard output. I then changed the print statements in the code to only print out the numbers I cared about with a trailingsemicolon, then piped to "pdsend", giving it a UDP port in my patch.
Because the sample program sometimes just quits I make an auto-restarting script:
while true; do /home/msp/work/poolbox-leap/leap2pool |
/home/msp/pd/bin/pdsend 3000 localhost udp echo restart... sleep 1 done(where "leap2pool" is my version of Sample.cpp). I think this is pretty robust - if a leap extern in Pd decided to crash it would takePd down but the way I do it I only lose a second of connection.
cheers Miller
On Tue, Mar 12, 2019 at 03:32:59PM +0100, Peter P. wrote:
- Max abonnements@revolwear.com [2019-03-12 15:18]:
I think you need to start pd with the leap library preloaded:
LD_PRELOAD=~/path/to/LeapDeveloperKit/LeapSDK/lib/x64/libLeap.so ~/path/to/pd/bin/pd ~/path/to/patch.pd
Thanks Max, that's what I already did in the call to the debugger:
$ gdb --args LD_PRELOAD=LeapDeveloperKit_2.3.1+31549_linux/LeapSDK/lib/x64/libLeap.so /usr/bin/pd -path linux64bit Pd_leapmotion_0.1_mac/leap_motion_help.pd
Without debugger the external fails indeed without that line.
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Here's what I did:
http://msp.ucsd.edu/tmp/misc/leap2pool.cpp
I just used a single "printf" instead of all the lines of "cout<<" crap.
cheers Miller
On Sat, Jun 08, 2019 at 03:03:54PM +0200, Peter P. wrote:
Thanks Miller, I now found the time to try your approach and it is indeed a nice one! Three quick questions arise:
If I don't terminate the output of the Sample.cpp program with a semicolon it also works. Is there a difference?
What would be the best formatting to save as much network traffic as possible? I discover that Pd (wish, for that matter) consumes quite a lot of cpu when receiving tracking data. Do newlines make a difference?
Did you manage to get rid of commas or parentheses in Sample.cpp's output? I can't seem to find a way to do it but it would help tremendously to parse the data in Pd with [route] and [unpack].
Curious and excited, with thanks! Peter
- Miller Puckette msp@ucsd.edu [2019-03-12 17:22]:
Hi all -
I didn't have much trouble ust compiling the "Sample.cpp" example in the 2.3 development kit; this prints lots of stuff on standard output. I then changed the print statements in the code to only print out the numbers I cared about with a trailingsemicolon, then piped to "pdsend", giving it a UDP port in my patch.
Because the sample program sometimes just quits I make an auto-restarting script:
while true; do /home/msp/work/poolbox-leap/leap2pool |
/home/msp/pd/bin/pdsend 3000 localhost udp echo restart... sleep 1 done(where "leap2pool" is my version of Sample.cpp). I think this is pretty robust - if a leap extern in Pd decided to crash it would takePd down but the way I do it I only lose a second of connection.
cheers Miller
On Tue, Mar 12, 2019 at 03:32:59PM +0100, Peter P. wrote:
- Max abonnements@revolwear.com [2019-03-12 15:18]:
I think you need to start pd with the leap library preloaded:
LD_PRELOAD=~/path/to/LeapDeveloperKit/LeapSDK/lib/x64/libLeap.so ~/path/to/pd/bin/pd ~/path/to/patch.pd
Thanks Max, that's what I already did in the call to the debugger:
$ gdb --args LD_PRELOAD=LeapDeveloperKit_2.3.1+31549_linux/LeapSDK/lib/x64/libLeap.so /usr/bin/pd -path linux64bit Pd_leapmotion_0.1_mac/leap_motion_help.pd
Without debugger the external fails indeed without that line.
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list