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

R_init doesn't work as intended with manual sensors. #41

Open
EmpireOfTheTsun opened this issue Aug 18, 2020 · 2 comments
Open

R_init doesn't work as intended with manual sensors. #41

EmpireOfTheTsun opened this issue Aug 18, 2020 · 2 comments

Comments

@EmpireOfTheTsun
Copy link

EmpireOfTheTsun commented Aug 18, 2020

N.B. I have tested this using a manual sensor with data gathered previously, both with and without magnetometer values (using Madgwick and Analytical, respectively).

EDIT: Based on further review, I believe that R_init is not ignored entirely, but valid rotation matricies don't produce the desired effect (see below). I have therefore removed some previous analysis in this post.

I am new to IMUs and kinematics in general, so if I have made some error, I deeply apologise.
Thank you for your time.

@EmpireOfTheTsun
Copy link
Author

EmpireOfTheTsun commented Aug 18, 2020

initOrientation = np.array([[0.707,.707,0], #Initial orientation. Arbitrary, as model should converge to true orientation quickly.
                            [-.707,0.707,0],
                            [0,0,1]])

inputData = {'rate':50,
        'acc':accData,
        'omega':gyroData}
sensor = manual.MyOwnSensor(in_data=inputData, R_init=initOrientation)

Gives a visualisation of:
image

@EmpireOfTheTsun
Copy link
Author

EmpireOfTheTsun commented Aug 18, 2020

UPDATE: Using the initOrientation above (which I believe should be a 45 degree rotation around the z axis) results in an initial quaternion of
[ 1.00000000e+00 -6.93889390e-18 1.73472348e-18 8.67361738e-19]
Instead of the usual [1,0,0,0]. So it appears that R_init is having an effect, but a much milder one than anticipated.

Furthermore, rotation matrices such as the ones used here do not produce any deviation from the default orientation, when it should produce a 180 degree rotation around the Z axis.

@EmpireOfTheTsun EmpireOfTheTsun changed the title Visualising a manual sensor ignores R_init R_init doesn't work as intended with manual sensors. Aug 18, 2020
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

1 participant