Absolute Rotation Quaternion From Phidgets Spatial MOT1101_0 in Unity3d??

Supporting Visual Studio on Windows
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 »

Nothing yet? I guess I'll have to look for alternatives. I'm a bit disappointed... I have no problem to pay the premium price of your hardware in turn for solid performance and good integration. In this case, quite the opposite happened, this will be an expensive rebuild.
By the way: Right now I'm testing a 25$ 10DOF sensor with onboard AHRS which is delivering good values...
jdecoux
Labview Developer
Posts: 180
Joined: Mon Nov 13, 2017 10:20 am
Contact:

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

Post by jdecoux »

I've taken on looking into this issue, and will update you on any findings.

-James
jdecoux
Labview Developer
Posts: 180
Joined: Mon Nov 13, 2017 10:20 am
Contact:

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

Post by jdecoux »

This does look like a compass calibration issue.

I can reset the correction parameters on my 1044_1 magnetometer to get similar results to what you are seeing from your video, in terms of the rotation moving in weird directions, but the issue gets resolved by calibrating the sensor running CompassCalibrator.exe and loading the specified parameters. If simply running the program and pressing STOP when done doesn't work, you can try copying the values from the calibration program and using them with the Set Params... button on the SpatialAHRS example, to see if that helps.

To prevent problems, be sure you are running the calibration program on location each time the sensor is moved, especially when moved within the machine and outside of it. This can sometimes even be necessary when moving from one part of a room to another. Magnetic field readings are very sensitive to metals in the environment, even at distances you might think are too far to do anything. Feel free to test this yourself by holding the spatial in one orientation and moving it around.

Please let me know if this works, or if the problem persists so I can track it down further.
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 »

To differentiate the two devices:

USB Spatial:
If the calibration has to be expilitly written to the sensor each time you use it, the Text in the Calibration tools seems a bit misleading to me.
Calibration successful.
Calibration values have been written to firmware on your spatial. These values will be maintained from now on, across power cycles, until explicitely reset or changed.
I tested a number of calibrations, seems like the CompassCalibrator.exe sometimes crashes trying to write. Until now I presumed the application closing down after calibration was expected behaviour. If the CompassCalibrator.exe stays open, it really was successful. Then, the values are better.


Vint Spatial:
After calibration, I get the success note along with the list of values, but without the part about the calibration having been written. A split second later, CompassCalibrator.exe closes (is this a crash?) No way to copy the values except with good screenshot timing. Here also, I thought this was intended. Just to clarify, is it possible to write the calibration permanently to the vint spatial or do I have to set them again everytime my application starts?
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,

The compass calibrator shouldn't be crashing. I'll have to add some extra error checking to see what may be causing this.

The calibrator write the calibration values to the Phidget permanently for every Phidget Spatial except the old 1056. You should NOT have to write the values yourself.

-Patrick
jdecoux
Labview Developer
Posts: 180
Joined: Mon Nov 13, 2017 10:20 am
Contact:

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

Post by jdecoux »

You are correct, the calibration values are saved to the device if calibration is successful. The reason I asked you to try the alternate method is to verify your calibration process was working correctly, which it seems half the time it wasn't.

The calibration program is supposed to stay open after completion to allow you to visually verify the results with the rotating spheres.

When you say the results are better when calibration is successful, is the issue resolved on these devices?

The calibration values should be saved to the VINT spatial as well. While Patrick is looking into the issue, I recommend installing the latest libraries from our website and trying again. If it still crashes, please run the attached version of the example that contains some logging to help us track down any issues. Once you've run that program, please attach the resulting "compassCalib.log" from the same folder as "CompassCalibrator.exe" if the program crashes.
Attachments
CompassCalib_Logging.zip
(460.91 KiB) Downloaded 1916 times
jdecoux
Labview Developer
Posts: 180
Joined: Mon Nov 13, 2017 10:20 am
Contact:

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

Post by jdecoux »

We now have a version of the compass calibrator that will catch any exceptions and give an error message. Please try to run this version of the program and get back to us with your results.
Attachments
Compass_Calibration_Runnable.zip
(490.23 KiB) Downloaded 1853 times
Phidget22_Spatial-CompassCalibrator_CSharp_Windows_Ex_20200717.zip
(1.42 MiB) Downloaded 1872 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest