Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Supporting Visual Studio on Windows
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Post by Patrick »

Hi,

I'd definitely be a little worried about the mounting of the Motion Phidget - this should be mounted at the center or rotation - otherwise you will face magnetic distortions from nearby metal in the frame of your globe mount, etc. moving around. Of course, the compass also needs to be calibrated after the final mounting of the entire globe, in it's final location.

I hope you get this working - it looks like a really cool application.

-Patrick
kiu
Phidgetly
Posts: 24
Joined: Mon Aug 19, 2019 10:28 am
Contact:

Re: Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Post by kiu »

Thanks... I'm not sure however whether interference is to blame. In the real thing the sensor is mounted roughly in the center of rotation onto an aluminum u-beam(which should be ok as not magnetic). I have the same symptoms with my test-setup at home which only consists of cardboard and plastic.

There is also an expected margin of error due to the shift of the viewers position while the camera is fixed. The error is too severe though and consistent across two sensors calibrated to two different places (about 150miles apart).

That's why I'm asking you as you probably researched very deep into this topic. Might it be that the AHRS algorythm is not suitable for our uscase? Is it worth the effort to try to implement another one? Can you think of any other factor that might influence the result?

Clockwise rotation results in shift to the northwest, ccw to the southwest, as far as I can tell to the same degree (about double the north/south shift than the west shift).
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Post by Patrick »

I don't really have any more to add. The algorithm was tested with our more accurate 1044 USB Spatial, and we never tried it out on the VINT Spatial. I do hope you can get it working reliably - this topic of sensor fusion is very complex and difficult to get right. If you are seeing consistent errors - can you just calibrate these out?

-Patrick
kiu
Phidgetly
Posts: 24
Joined: Mon Aug 19, 2019 10:28 am
Contact:

Re: Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Post by kiu »

Hmmm... not tested. So as I'm not understanding what's going on there is no alternative to trying wether a 1044 USB will deliver better results. Is AHRS already processed onboard with this device?
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Post by Patrick »

1044 embeds AHRS in the firmware.
kiu
Phidgetly
Posts: 24
Joined: Mon Aug 19, 2019 10:28 am
Contact:

Re: Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Post by kiu »

I've got the 1044_1B here now. Great it does AHRS onboard so I can check with the phidgetInspector what's going on without any of my code involved....

So I've calibrated the magnetometer, testet for metal influences (you are right, they can be severe) did further testing where only wood an plastics were near. Still, there is quite a bit of flipping and snapping going on. Sometimes it's just some tumbling motion (I can reproduce the problem I was facing), for the worst example I could produce please have a look at this video:

https://share.icloud.com/photos/0398H5m ... 3P2m5D4jyw

I realize the mag gain is cranked up all the way, however this behaviour persists even at 0.01
This way, the algorythm is completely unusable for my applycation. Did I miss something?

The IMU algorythm seems by far more reliable to display the correct motion. Is there any way to make sure the orientation persists even when the device is switched off and on again? Otherwise the installation would have to be recalibrated every morning, maybe more often, will IMU produce drift?... am I out of options?
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Post by Patrick »

It looks like you're seeing a 180 degree rotation when the magnetic field x/y passes through 0/0. I'm wondering if there may be something wrong in the algorithm. Are you seeing big jumps/errors like this in your final application - because that's not expected.. I know you said the magnetic gain is set high - but yes, at such a high number, the magnetometer is driving most of the algorithm.

I'm going to try to reproduce. What country are you in?

-Patrick
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Post by Patrick »

Also, I would definitely play with magnetic gains down around 0.005 or lower - even 0.01 is pretty high.

-Patrick
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Post by Patrick »

The IMU algortion is just AHRS with the magnetic gain set to 0 - so you will see a drift in the yaw over time.

-Patrick
kiu
Phidgetly
Posts: 24
Joined: Mon Aug 19, 2019 10:28 am
Contact:

Re: Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Post by kiu »

I'm located in Germany. Magnetic field strength here is 0,485723. I guess the problem is in the algorythm... even at 0,001 it's making the same mistake - just slower. If I only switch on the magnetic correction periodically (like every 10 Minutes), will the drift that accumulated be corrected, even when switching it off again?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests