[Plugin] Myo

The plugin is overdue for a light overhaul, but I might be able to squeeze in a simple recompile during the week.

Update to 0.7.14
-Synced binaries with UE4.10

Re-architecture pushed til later, Enjoy the update!

Hello Community and thank you getnamo for plugin!

Currently i’m studing Interactiondesign and working on an invention project. We want to use Unreal for a little prototype and want to use a Myo to interact with. But we have some problems with the ā€œMyo Orientation Rollā€. We want to use it to change the angle of an UMG image to navigate through a radial Interface. But the input value jumps random to another value. We can’t fix it yet so we decided to ask you guys if there is same hope. (We’ve tested it with the Mouse input and it works fine).

Thank you all!

Your roll may be defined by the space you’re sampling it from (Myo space) and may have the -180->180 flip at the wrong point. Consider using the Calibrate Myo function which will calibrate all your input based on where you specify your forward direction. Optionally just use difference values.

Hi there !
The plugin is working really well, I’m having tons of fun with this, thanks for that ! However I can’t compile Blueprints that have a Myo Component attached. I tried to compile the same Blueprint after quitting MyoConnect and it seems to work. Any idea what could cause this ?

Hello again !

I’ve spotted another problem : once packaged, my game crashed on startup. So I tried debugging the exe through VisualStudio (in DebugGame configuration), and there’s an unhandled exception thrown here :

File : Hub_impl.hpp


Hub::Hub(const std::string& applicationIdentifier)
: _hub(0)
, _myos()
, _listeners()
{
	libmyo_error_details_t _error;
	libmyo_init_hub(&_hub, applicationIdentifier.c_str(), &_error);

	switch (**libmyo_error_kind(_error)**) {
		case libmyo_error:
		case libmyo_error_runtime:
		case libmyo_error_invalid_argument:
		{
			lastInitCausedError = true;
			break;
		}
		case libmyo_success:
		{
			lastInitCausedError = false;
			break;
		}
	}
}

It turns out libmyo_init_hub, even through returning libmyo_success, was leaving _error uninitialized, quite strange…From there I added a check to know if the function executed successfully and now the packaged game works like a charm !



	libmyo_result_t res = libmyo_init_hub(&_hub, applicationIdentifier.c_str(), &_error);
	
	if (res == libmyo_success) {
		lastInitCausedError = false;
	}
	else {
		switch (libmyo_error_kind(_error)) {
                        /* ... */
		}
	}

When searching about the issue I stumbled upon topic where you discussed part of the code. I suppose we should notify Thalmic devs about as they seem unaware of it.

About my previous issue (compiling a blueprint with a MyoComponent causes UE Editor to crash), I managed to compile after quitting MyoConnect. I can then restart MyoConnect and it works as intended. But if I try to recompile or even move the blueprint instance in the level, the crash comes back. My log file ends abruplty after quite a struggle it seems :

I don’t know if it’s possible to debug a crash in the Editor, so I’m a little stuck. I’ll see want I can do !

Interesting issues, GJ on debugging things. To debug editor, just press F5 on your C++ project solution and it will compile and run the editor in debug mode. Then it will catch the stack when you hit an error.

Will be looking into the myo plugin again around the time 4.11 comes out in the meantime if you find solutions post pull requests on github and I’ll merge them.

Ok, I don’t have a solution, but I think I’ve located the problem, sort of. It seems come from ~Hub(). The crash occurs while executing libmyo_shutdown_hub(_hub, 0), however I checked the _hub variable and it’s not NULL…I’m a little lost here.

Sadly I don’t have the time to investigate more but if anyone else gets problem, just open MyoConnect and disconnect your Myo. No need to remove it from your arm so you won’t have to do the calibration/synchronisation each time you modify your project.

Cheers !

Hello getnamo

I thank you for these plugins

I make a application with Window 10 tablet

However, I heard that if it works on windows10, it occurs an error when compiling phase or it doesn’t recognize myo

Do you have any solution??

Post logs/errors here and give a bit more information like what version you were trying to compile, was it blueprint or c++ project?, otherwise it’s a bit hard to debug :slight_smile:

Hey, I just picked one of these up off of eBay and I’m going to start messing around with it. Are you thinking of updating the plugin to 4.12/4.13?

plugin is overdue for an update, I’ll take a look into it week. Otherwise you can try to just recompile the plugin for 4.13 in a C++ ue project, there shouldn’t be any glaring issues stopping you from doing that that I can think of.

Ok, I’ll probably just do that then. I had held off just in case, but if there’s no complications it shouldn’t be an issue

Is there any update to 4.13? I tried loading the others but no luck and says it’s not compatible… :frowning:

Please let me know as soon as possible and thanks in advance! :slight_smile:

Scheduling an complete rewrite of the plugin in about 2 weeks time now, I will release a 4.13 compatible binary version then.

Awesome! Please keep us updated! :slight_smile:

Hello Community

I’m using the latest plugin, Myo 1.5, and UE4 4.14
Does plugin work on a OS X El capitan?
I’m facing a problem where I can see the plugin appear under the Plugin menu and it is enabled, however, in Blueprints when I try to add a component, it doesn’t appear.

Does anyone know what the problem might be and how I can fix this?

Thanks all

Current plugin only works on windows (you can see in the whitelist as well: https://github.com/getnamo/myo-ue4/blob/master/Plugins/MyoPlugin/MyoPlugin.uplugin) but it is due for a modern rewrite, which is currently under way (GitHub - getnamo/myo-ue4 at alternative), I’ll make sure to see if I can’t add mac os support then.

Finally decided to finish the implementation and now the Myo plugin has been fully rewritten for modern multi-threading and workflow. Documentation is scarce but if you looking into the MyoControllerComponent it should be pretty clear how to get the basics working.

Changes

  • modern rewrite for 4.18 that runs on a separate thread in a input module scoped architecture.
  • Mainly accessed through a MyoControllerComponent, but bare basics can be implemented using only input mapping.
  • supports latest Myo SDK v0.9.0 including raw emg
  • supports multiple myos
  • hot-pluggable myo connect and hub
  • bare bones documentation for now, explore code MyoControllerComponent.h and MyoController.hfor how-to.
  • auto-casting blueprint conversions from data to controller to call actions such as vibrate device

Grab it at the github release page: Releases Ā· getnamo/myo-ue4 Ā· GitHub

Hello. community

Myo’s Plugin file is new.In case,how to connected to UE4?

I could not successfully build the Binaries file and Source file into the Project file.

thanks.