Heh…thought that was a sarcastic remark at first…but that seems to be a legit software/hardware that I really might be able to make work for this application. Great job on the code work and I’ll be able to push further as this comes along. Also thanks as the collision now works after sockets with some cubes attached.
This plugin is not supported for 4.6th version
And
In 4.5th version Plugin is supporting well, but while exporting to .EXE for windows 64 and 32 bit it rises error, its not working…
I’m using windows 8 64 bit
Works fine on my 4.6 install with 's latest + leap 2.2…I’ve never tried to export yet so I cant comment there.
This is pretty cool! I noticed you made a pull request, I will take a look and see how to best integrate this. What is it that you are tracking in this example?
I may need more information, describe in more detail what you are trying to do. When you say exporting to .exe, do you mean packaging for shipping/development? Please make sure you follow the shipping instructions found at the repo if that is the case. If you are still having problems, PM me your logs found in {Project Root}/Saved/Logs
Well, I was tracking just some blobs in the image. If you mean in real-life, as I couldn’t find what zalo suggested (motion tracking spheres) I covered some polystyrene balls (3.5cm) with 3M reflecting tape to get sort of equivalent.
I tried with small pathes initially (1.5cm squares) on my mobile phone but if I went over 30-40cm away from the leap I got very inconsistent results. The resolution is very low on the leap, well, actually the resolution coupled with the huge angle gives a too greater solid angle for each pixel so you need BIG things to track.
Here is how I used it at the time:
As I said in the note, I find the CPU use exaggerated, so I’m trying to export 3 vectors for each blob instead of one, the other 2 being coordinates on the image, in order to be able to use some condition so that when I satisfy a list of conditions of relative distances from each other. (like a triange, or a sqare with diagonals) I “lock” only on the blobs and only search in the vicinity of where they were the last frame. It’s looking great, it’s a lot better CPU wise, but now I’m trying to change the recursive flood with just a regular pass on a square surrounding the last position.
Also, if anyone knows some algorithms to eliminate a high-frequency shake from my measurements (but not averaging as not to introduce latency) I’m very interested. I remember reading something of the sort on an Oculus blob post, quite a while back.
edit: I initially worked on a version in LeapImageList so as to do directly the 2 images and return directly the 3d blobs, to avoid the 2 separate branches in blueprint, but while it worked I got often crashes (sometimes around the 60sec mark, sometimes later) relating to setLeapImage. Maybe I was doing something wrong but I basically kept the 2 pointers that you used and re-defined them at each call. If you want I can send the related files, but I eventually thought that maybe, someone would like the separate results by image…
i have a problem with rotation of the hands of my custom character. its rigged with ART.
Anyone known where are the problem? in the video i try clapping and show my palm in front of my head.
Here the video:test leap motion rotation problems - YouTube
The code its copy the necessary nodes from plugin content, but not all, perhaps i missed something?
… duplicate …
It looks like your hands are rotating around YAW whenever they cross some midpoint line. I encountered something similar with the fingers in the rigged model and didn’t have the time to correct it, but the wrist rotation doesn’t have this problem. It important to remember that you need to combine rotations when you change orientation in blueprint and to avoid using break rotation/make rotation unless you know what you’re doing. If you do not heed that, you may get gimbal locks.
The general format of the rigging looks like this: Leap Positions and Orientations in UE space (X forward), Leap basis (Leap Debug Hand location) subtracted from component (converts leap position to component space) -> Rotated by 90 degrees to have Y forward for animation space. Use these rotations/positions in your rigging.
WTF, after hours and hours, and near do a harakiri ritual… i found what was failing.
My anigraph was something like this…: (i not remember exact)
LeftElbowTransform->RightHandTransform->RightElbowTransform->LeftHandTransform
i change to the order to your template order and fix the issue… dammit!
thanks for the plugin work. Still looking step by step how works i not understand few thinks of that blueprints. Ins’t basic your example! :lol:
I supposed that its the finger problem:https://youtube.com/watch?v=Ya_s3WLLAJII found too a problem when move the HMD (last minute in video i think) the arms move. Your example proyect have same problem.
OSX support
In OSX, I was able to get the plugin to show up in the list of plugins, but nothing works. Maybe telling is that, even after building, Plugins\LeapMotion\Binaries\Mac is empty.
First, to get it to build for OSX:
+Binaries\Mac\libLeap.dylib (copied from SDK)
+Plugins\LeapMotion\ThirdParty\LeapSDK\Lib\Mac\libLeap.dylib (copied from SDK)
modify Plugins\LeapMotion\Source\LeapMotion\LeapMotion.build.cs to load Mac\libLeap.dylib
The project will then build, and in the editor Window->Plugins, under Installed>Input>Controller, there is Leap Motion Plugin v 0.8.2 and it is checked as enbaled.
However, I can’t seem to access it …
(1) … using the provided content.
Change the game mode to RenderToTexture.
Change the Default Pawn Class to LeapRiggedCharacter.
Try to launch in viewport, then get a warning:
Clicking on yes gives me “BLUEPRINT COMPILER ERROR” in text within the viewport.
If I try to edit the LeapRiggedCharacter by double clicking on the blueprint in the content browser, then the editor crashes. This is the message I get in XCode:
[2014.12.17-17.56.00:057][475]LogRHI:Warning: OpenGL debug output extension not supported!
[2014.12.17-17.56.05:856][672]LogRHI:Warning: OpenGL debug output extension not supported!
[2014.12.17-17.56.06:059][672]LogRHI:Warning: OpenGL debug output extension not supported!
Assertion failed: InSCSNode->ComponentTemplate != NULL
(2) … within a Character blueprint.
I reverted back to the default Game Mode. Made a new Character Class blueprint. Click on Blueprint Props, scroll down to Interfaces, click on the Implemented Interfaces>Add drop down box and Leap is not there.
(3) … within the Engine Input settings. No Leap inputs can be found in any gamepad, keyboard, mouse, etc.
Any ideas?
By the way, I once somewhere that you can modify PluginName.build.cs so that it copies the library into MyProject\Binaries\Platform. That way you don’t need to provide the Binaries directory in your repository, then you’d be able to refactor your repository so it could simply be copied into the Plugins directory and maybe even be a submodule of another project. (Except for the optional content directory, but I think plugins can/will support content inclusion).
Nice video, it does seems like the same problem, let me know if you find a fix. Unsure of the exact cause, but maybe it has to do with how yaw is set by the leap or the finger FK order; to be determined…
You’re welcome and yeah the rigged character is a little bit complicated because I’m preparing for the transition to input hardware agnostic rigging. For this reason there is a intermediate data structure (anim body) which holds and translates all the data into component space. This allows you to use the same anim body, but set by another hardware (e.g. hydra) and the rigging would remain valid.
Note that thanks to the UE animation retargeting system you can copy animation blueprints (e.g. the basic one) to your own skeletal mesh if you’ve set up the skeleton bone remapping using the retarget manager.
Good investigation! Haven’t had the opportunity to bind anything except windows so far, but I will be traveling with my old mac in the coming weeks so should have an opportunity to see how OSX integration would look like. Will take what you’ve found and poke at things to see what works and doesn’t, I imagine the devil is in the details. We should try something much simpler for a start to see if a basic bind can be achieved and then move from there.
Let me know if you can find a link to the PluginName.build.cs copy modification, this would be quite useful for all plugins with dependencies.
I have a student working on writing a plugin for some of our scientific hardware and we are using your plugins as examples (in addition to actually using the Leap too). We’re still learning programming for UE4, but I think a minimal plugin example that actually did something would be tremendously helpful, and much better than what’s currently in the Wiki. For maximum community benefit this minimal plugin should probably not require hardware, but then it won’t help us debug the OS X problem . I’m not at my office with my toys/research equipment every day but I’ll take another look at getting a minimal Leap plugin working sometime next week.
It was a while ago. I guess I didn’t remember it correctly. I had assumed it would be possible to code in some file-copy operations into PluginName.build.cs, but upon searching I realized the poster was running a custom script. See response to the accepted answer here.
now i checking things about collision and taking objects (my head its overloading after try understand how works all this, rotations, etc and make it work ) but later next week i will try fix that. If i got something i write something.
Hi,
I have dragged and dropped the binaries, plugins and content to my project root, then restarted UE4. When I launch the project I get this error message below. At this point I did not change any project/game settings, and have tried tested it just with the stater content but I get the same error. Disabling the plugin stops the error and the project runs fine.
I would be greatfull for any help.
Thanks, Lewis
There are two fully barebone plugin code examples that are included in each engine release. If you wan’t to see a pretty barebone input bind plugin use the https://.com/Ikarus76/UEJoystickPlugin as it only binds the windows direct input api to input mapping. The leap plugin is unfortunately to big in my opinion to properly encapsulate in the (FModulePlugin.cpp) module and I chose to set the classes directly to their UObject analogs instead, which works great because the leap SDK offloads that to another thread underneath.
This is what the plugins currently already use to link to libs and dlls, it doesn’t copy anything in the packaging process unfortunately. If you link to a lib it expects the .dll to be in the project or engine binaries folder not the plugin one, the only way around it so far is to do a direct dll bind which is not recommended.
Launch is currently not supported, use Play In Editor and Play Standalone for testing. You can also package and ship following the shipping instructions on the repo.
The reason for this is that currently there is no way to hook into the packaging process to move the required files to the right directory for the project to see the dependencies automatically. Waiting on epic to add necessary fixes before launch will work properly.
First off, great work on the plug in, this very well done :). Unfortunately, I’m running into some problems. My end goal is to use a tool (e.g. pencil) to move a crosshair around. Step 1 is to get a non-tick event to work (like detect hands, etc.), and the images below are my attempt to use the raw image event. The “Hello” statement fires, but “It works?” does not.
Also, I tried to get a tool detected using tick and then used tool->count->print string(count) and it always says the count is zero. I’ve also tried getting the direction of the tool, but it always at 0,0,0. Image below is one of my many attempts to find a working solution (tick is not connected in the image below). Any suggestions?
i the latest leap motion sdk have API changes. beware at update. I not update.
Knack, good call I did not notice that there was a big change from 2.2.0 to 2.2.1. So, LEAP SDK 2.2.1 is not supported? Uh oh, well I don’t have 2.2.0 or lower. I just tried google trying to find the previous version but no luck. I doubt I could edit my version of the leap plugin for the new bindings without messing up somewhere, is there somewhere that I can find leap sdk 2.2.0?
Version 2.2.1
Added APIs for all language bindings (except JavaScript):
Controller.images()
Listener.onImages()
Image.sequenceID()
Added LeapFrame serialize and deserialize functions for Objective-C language binding.
today my leap upgrade without have checked automatic upgrades. :mad:
but works. I something about API changes on images only (i fast), check the changelog.