Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accel doesnt work, gyro drifts instantly. No sensor fusion? #39

Open
odivalq opened this issue Feb 13, 2017 · 6 comments
Open

Accel doesnt work, gyro drifts instantly. No sensor fusion? #39

odivalq opened this issue Feb 13, 2017 · 6 comments

Comments

@odivalq
Copy link

odivalq commented Feb 13, 2017

Hi, the unity project seems to work okay, however I get no indication that accelerometer is working. In the vídeo I can see some red lines indicating the direction of the acceleration vectors, but no such thing appears for me.

Also the motion plus drifts instantly after initialization whereas in the vídeo it seems to remain largely reliable for at least a few minutes. Could that be related to the seemingly nonworking accelerometer input?

Having asked these, is there some sort of sensor fusion at work in the API?

Thanks in advance!

@Flafla2
Copy link
Owner

Flafla2 commented Feb 14, 2017

  1. To see the accelerometer line, make sure the "Draw gizmos" button is pressed in the game view (top right).
  2. To minimize motionplus drift, make sure to lay the WMP down flat on a table and click the "Zero out WMP" button
  3. The only sensor fusion I have implemented right now is when you zero out the WMP. this reorients the remote so that it is facing forward and aligned with the accelerometer (assumed to represent gravity).

@odivalq
Copy link
Author

odivalq commented Feb 15, 2017

Oh, do I feel silly now. Thank you very much Flafla2, it seems to work as intended now.
Just one thing: sometimes during playtest of the default scene of the project you suplied some hiccups happens, about twice per minute, and although they barely last half a second they desync the wiimote model orientation with the real one. Any ideas on might be going on?

@Flafla2
Copy link
Owner

Flafla2 commented Feb 15, 2017

@odivalq Perhaps this is an issue with your bluetooth stack? Possibly your bluetooth equipment can't keep up with updates. I'm not completely sure though - it could also be a software issue. Are you getting FPS drops when these issues pop up?

@cascross123
Copy link

Hey, I'm trying to work with the Accelerometer data, but from the documentation I can't seem to work out how to actually get the controllers accel data, do you happen to have any example code or anything I could take a look at?

@Flafla2
Copy link
Owner

Flafla2 commented Feb 21, 2017

@cascross123 See here

@cascross123
Copy link

Hey, Thats great, though i'm being thrown errors "Object reference not set to an instance of an object", any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants