Thank you so much Gentamo!
I want to get Myo’s pitch, roll and yaw but I couldn’t do it yet.
is what I’ve done so
Sadly, it doesn’t do anything.
Thank you all
Thank you so much Gentamo!
I want to get Myo’s pitch, roll and yaw but I couldn’t do it yet.
is what I’ve done so
Sadly, it doesn’t do anything.
Thank you all
I suspect you’re missing a myo component. In order to use input mapping you need to have a Myo Component attached to something that is placed in the map. Typically the easiest place to add it is to your pawn/character. After you’ve done that your input mapping events will work. You should also attach the interface so that the plugin won’t warn you about lack of interface bind (used for non-IM blueprint events)
Here is a quick video on how to add myo support to the rolling template in under 60 seconds.
Edit:
Thalmic Labs have posted a page outlining the steps in a simple format, highly recommended for concise instructions:
http://developerblog.myo.com/myo-unleashed-gesture-control-in-the-unreal-engine/
Update to 0.7.10
-Updated SDK to Myo 0.9
Update to 0.7.11
-Updated to UE4.8
grab the latest zip at the github repo for the updates.
Thanks for wrapping this!
Unfortunately I’m getting crashes that seem pretty inconsistent.
But more importantly, here is the data I’m getting from EventOnOrientationData: Current value =(Pitch=-90.0, Yaw=-1.#IND00,Roll=1.#QNAN0)
Event OnAccellerometerData seems to be working fine
Any ideas?
Thanks very much for your help!
Hey I installed the plugin as mentioned but the editor crashes every time I want to compile a BP which uses the Myo component. Do you have any suggestions?
Looks like something has broken recently in the plugin, I’ll have a look and see if I can’t reproduce these crashes/erroneous data. Let me know what version of UE and MyoConnect you are using, it will help with the debug.
UE 4.8.0
Myo Connect 0.14.0
Unfortuneally the editor crashes in the most cases without any additional informations. The last crash, which appeared right now, has some crash inforamtions.
It happens always when I try to compile a BP with MyoComponent attached. But after the crash the BP is compiled and can be used by “play in editor”
It happens also in the most cases when I am moving Instances of the BP in editor.
On rare occasions the Editor crashes when opening the MyoComponent containing BP.
I hope will help you to debug. Let me know if I can provide any further information.
Hey there how are you going?
Is there anything I could provide you to help fixing bug?
With UE4.8.1 and myo connect 0.14, I have the same problem ! When i compile my blueprint, editor crash. It also crashes when I try to load a level if a pawn with myo component is present or instanciated.
Thanks for this, I suspect has something to do with how the Myo is being instantiated, which is why it crashes when you hit play or compile (it would re-make the myo component attached to your blueprint in preview). Still trying to find the time to debug issue. Just letting you both know its still on my radar. If you’re good with C++ have a look at https://github.com/getnamo/myo-ue4/blob/master/Plugins/MyoPlugin/Source/MyoPlugin/Private/FMyoPlugin.cpp to see if I’m doing anything funky that would cause bug.
Myo plugin crash fix
The current version of the Myo plugin (0.7.11) is still crashing the UE4 editor when Myo Connect is not running.
I’ve traced crash to an assert in a function being called after plugin startup.
The actual error is:
"Assertion failed: O != NULL [File:C:\Users\<*user*>\Desktop\<*project*>\Plugins\MyoPlugin\Intermediate\Build\Win64\UE4Editor\Inc\MyoPlugin\MyoPlugin.generated."
UE4Editor_Core!FDebug::AssertFailed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:355]
UE4Editor_MyoPlugin!IMyoInterface::Execute_DeviceDisabled() [c:\users\<user>\desktop\<project>\plugins\myoplugin\intermediate\build\win64\ue4editor\inc\myoplugin\myoplugin.generated.cpp:196]
UE4Editor_MyoPlugin!FMyoPlugin::SetDelegate() [c:\users\<user>\desktop\<project>\plugins\myoplugin\source\myoplugin\private\fmyoplugin.cpp:814]
UE4Editor_MyoPlugin!MyoDelegate::MyoStartup() [c:\users\<user>\desktop\<project>\plugins\myoplugin\source\myoplugin\private\myodelegate.cpp:206]
Here’s what’s happening…
In MyoPlugin.generated.cpp:
void IMyoInterface::Execute_DeviceDisabled(UObject* O){
check(O != NULL); // is where the assert is failing.
...
In FMyoPlugin.cpp:809:
void FMyoPlugin::SetDelegate(MyoDelegate* newDelegate){
collector->myoDelegate = newDelegate;
collector->Startup();
//Emit disabled event if we didn't manage to create the hub
if (!collector->Enabled){
collector->myoDelegate->MyoDisabled(); // Here is where IMyoInterface::Execute_DeviceDisabled is ultimately getting called.
...
The reason assert is failing is that the pointer to the interface delegate (_interfaceDelegate) is null after startup/initialization of the plugin when Myo Connect is not running.
In MyoDelegateBlueprint.cpp:211
void MyoDelegateBlueprint::SetInterfaceDelegate(UObject* newDelegate)
{
UE_LOG(LogClass, Log, TEXT("InterfaceDelegate passed: %s"), *newDelegate->GetName());
//Use format to support both blueprint and C++ form
if (newDelegate->GetClass()->ImplementsInterface(UMyoInterface::StaticClass()))
{
_interfaceDelegate = newDelegate;
}
else
{
//Try casting as self
if (ValidSelfPointer->GetClass()->ImplementsInterface(UMyoInterface::StaticClass()))
{
_interfaceDelegate = (UObject*)this;
}
else
{
//If you're crashing its probably because of setting causing an assert failure
_interfaceDelegate = NULL;
}
There is a function which can be used to check for condition called MyoDelegateBlueprint::IsValidDelegate().
**In MyoDelegateBlueprint.cpp:187
**
bool MyoDelegateBlueprint::IsValidDelegate()
{
return (_interfaceDelegate != NULL);
}
So, IsValidDelegate() can be used to detect condition and fix the crash.
I use plugin in 4.8 ,just by blueprint .It runs ok in editor But can not run after package . Crashed !Anyone can help me ?
Fatal error!
myo64.dll {0x000007fecac41ae0} + 0 bytes
myoPluginTest.exe!DataCollector::Startup() {0x0000000141fef41e} + 138 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
myoPluginTest.exe!FMyoPlugin::SetDelegate() {0x0000000141feef9a} + 0 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
myoPluginTest.exe!MyoDelegate::MyoStartup() {0x0000000141ff707d} + 0 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
myoPluginTest.exe!MyoDelegateBlueprint::MyoStartup() {0x0000000141ff8222} + 0 bytes [d:\users\wujiankun\documents\unreal projects\myoplugintest\pl
myoPluginTest.exe!AWorldSettings::NotifyBeginPlay() {0x000000013fd027fd} + 0 bytes
myoPluginTest.exe!AGameMode::HandleMatchHasStarted() {0x000000013fe68032} + 0 bytes
myoPluginTest.exe!AGameMode::SetMatchState() {0x000000013fe83be0} + 0 bytes
myoPluginTest.exe!UWorld::BeginPlay() {0x000000013fcdc0ce} + 0 bytes
myoPluginTest.exe!UEngine::LoadMap() {0x000000013fbe70a8} + 0 bytes
myoPluginTest.exe!UEngine::Browse() {0x000000013fb8cd6e} + 0 bytes
myoPluginTest.exe!UGameInstance::StartGameInstance() {0x000000013fe87683} + 0 bytes
myoPluginTest.exe!UGameEngine::Init() {0x000000013fe69b0b} + 0 bytes
myoPluginTest.exe!FEngineLoop::Init() {0x000000013f280b15} + 0 bytes
myoPluginTest.exe!GuardedMain() {0x000000013f27fed8} + 0 bytes
myoPluginTest.exe!GuardedMainWrapper() {0x000000013f28020a} + 0 bytes
myoPluginTest.exe!WinMain() {0x000000013f2930e9} + 0 bytes
myoPluginTest.exe!__tmainCRTStartup() {0x0000000142300c95} + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]
kernel32.dll {0x00000000774b59cd} + 0 bytes
ntdll.dll {0x00000000775eb981} + 0 bytes
ntdll.dll {0x00000000775eb981} + 0 bytes
You are my hero, it seems there were cases where you could have Null set as the interface delegate and it would emit MyoDisabled all other cases are guarded by valid Myo Id. means your recommended fix only needed to be applied to that one event.
void MyoDelegateBlueprint::MyoDisabled()
{
if (IsValidDelegate())
IMyoInterface::Execute_DeviceDisabled(_interfaceDelegate);
}
Thanks a lot for finding this! Gotta say that I’m also happy I commented my code earlier…
may be the same error see if the latest (0.7.12) didn’t fix that for you and that you’ve followed the packaging instructions found on github. If there is still a problem, post or pm me your logs from the crash found under saved/logs.
Update to 0.7.12
-Should no longer crash in the cases where Myo Disabled is emitted but no
delegate is set.
thanks lot it runs OK now!!!
Hello Getnamo,
Thanks for the awesome work, got a little issue with the plugin though: I am running 4.8.2 and the latest version of Myo Connect and firmware.
I got an that error either when I try to add a MyoComponent to a BP or play while having an interface implemented in one of my Blueprint:
[FONT=Trebuchet MS]Unhandled exception at 0x00007FFC1D551AE0 (myo64.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
About the call statck the error is getting triggered in FMyoPluggin.cpp line 514 : [FONT=Trebuchet MS]hub = new myo::Hub(“com.example.unrealengine4”);
Then : Hub_impl.hpp line 26 : [FONT=Trebuchet MS]switch (libmyo_error_kind(_error)) {
The error is not occurring if I turn off MyoConnect.
Still seeing same issue with a Windows 64-bit packaged build using MyoPlugin 0.7.12, latest MyoConnect (0.15.0) and latest Myo firmware (1.4.1670). Built UE4 executable crashes on startup. The stack trace is identical to the above quoted post. Myo Connect is running and PIE (Play in Editor) works fine.
I followed the steps on Shipping/Packaged Builds. One thing that is unclear is whether to copy the Binaries folder from the root of the plugin distribution files or from <UE4 Project>\Plugins\MyoPlugin\Binaries after doing a build. I assume it is the former rather than the latter. In other words, I assume the point of step is to get the dependencies myo32.dll and myo64.dll into <deployment folder>\WindowsNoEditor<project name>\Binaries\WinXX\ where XX is 32 or 64, respectively.
@Cupit: what did you do to get your packaged build working?
Still getting error with all latest.
Still getting one with all latest. Any ideas or anyone managed to get packaged builds to work?
Hi getnamo,
first I thank you for all these plugins!
I have just downloaded the new version of Unreal, the 4.9.2…and clearly plugin doesn’t work.
Do you think you will fix it?
'cause I’m kind of doing the thesis on it, and I need to know…
otherwise I will just use Unreal 4.8
Thanks so much
LauraF
Update to 0.7.13
-Updated to work with myo connect 1.0. The pitch/roll are now correctly
reversed
-Code fixes for UE4.9 compile
Just pushed a 4.9 update, find it in the usual place. Note that you always have the source and can recompile the plugin yourself at any time.
Haven’t had a to look at these issues, will have a look at them + architecture change and Motion Controller support after mid november.
will it be a compiled version for 4.10