0

I currently have the wiiuse lib op and running with the motion plus output the angle_rate from the gyro. Now i want this to give me the output in angles either euler representation or best of with quaternions, and i am a little stuck here. any solutions code examples that could point me in the way of how to calculate these?

I have an example of wiimoteHook running with a DSU controller test that gives output the quaternion output and is exactly what i want to give further to my program.

my program i am working on is that i am trying to make the wii remote hold by a person with a position system using ultra sound that gives me a coordinate(x,y,z) in a world frame then I want the wiimote to give me the rotation in that point to teach a 6 axis robot a tool center point that in the end would imitate movement of the remote.

I hope that somebody can guide me in the way of getting the rotations from the wiimote.

Thanks in advance.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Rasmus
  • 1
  • 1
    I am not familiar with this library, but looking at the source-code, it seems that you may be after the "orient" parameters rather than the "angle_rate". Give that a try and post what code you have so that it is easier to see exactly what you are trying to do and where it is going wrong. I was looking at the source here: https://github.com/wiiuse/wiiuse/blob/master/example/example.c – Sneaky Polar Bear Sep 16 '21 at 05:28
  • Yes your are right at some point, but i can calculate the orientation based upon the anglerate and the sample time. im am almost there with a big inspiration from this site. https://x-io.co.uk/open-source-imu-and-ahrs-algorithms/ and from this https://www.digikey.com/en/articles/apply-sensor-fusion-to-accelerometers-and-gyroscopes. now i have the quaternions and a rotation vector. next in my work i have to make my own calibration function since i have to calbrate over time becourse of the gyro is drifting – Rasmus Sep 17 '21 at 12:19
  • why delete an answer course i fixed my own question ? or What ? @martijnPieters – Rasmus Sep 23 '21 at 11:15
  • Please post your solution as an answer to this question to help anyone who runs into a similar problem in the future – Sneaky Polar Bear Sep 23 '21 at 13:23
  • i did or at least almost if you followed the link you will get the whole background and why the Mahony filter is a great way to use with and imu sensor from the documentation. in my link there is c# implementation of the filter and a matlab implementation. further on there is a nicely phD of the mahony and madwick filter of imu sensores. so basically evry thing you should know to implement it into your own code. – Rasmus Sep 28 '21 at 07:32
  • I understand, but if you actually submit it as an answer to your own question it makes it more readable. – Sneaky Polar Bear Sep 28 '21 at 13:20
  • i did, but it got deleted by Martijn Pieters – Rasmus Sep 29 '21 at 11:39

0 Answers0