Coder Social home page Coder Social logo

madgwick_py's People

Contributors

arturba avatar morgil avatar talhasr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

madgwick_py's Issues

Output Data

I am trying to learn motion processing and have managed to write myself a driver for the MPU9250 9DOF sensor and now I need to implement Madgwick's filter to get accurate orientation. I see your MadgwickAHRS class with the update method but don't understand how the method returns the result.

Quaternion KeyError using self.__dict__

Using Python 3.9 and the Quaternion object I'm getting a KeyError. self.dict returns an object, not an array.

I'm mostly writing this to lets someone else feel that they are not alone.

Thanks

Quaternion Euler/Euler123 issues

Hi,
Looks like there is a coding error with Euler123 output, setting different initiation and outputing without updating AHRS gives invalid data

refq = Quaternion(1,0,0,0) # look front
Euler:  (0.0, 0.0, 0.0)
Eu123:  (0.0, 0.0, 0.0)
Quat:   [1 0 0 0]

refq = Quaternion.from_angle_axis(np.pi/2,0,0,1) # look front, sideways
Euler:  (0, 1.5707963267948966, 0.0)
Eu123:  (-0.0, 0.0, 1.5707963267948963)
Quat:   [ 0.70710678  0.          0.          0.70710678]

refq = Quaternion.from_angle_axis(np.pi/2,1,0,0) # look up
Euler:  (1.5707963267948963, 0.0, 0.0)
Eu123:  (1.5707963267948963, 1.5707963267948966, -0.0)
Quat:   [ 0.70710678  0.70710678  0.          0.        ]

refq = Quaternion.from_angle_axis(np.pi/2,0,1,0) # look right
Euler:  (0.0, 0.0, 1.5707963267948963)
Eu123:  (-0.0, 0.0, -0.0)
Quat:   [ 0.70710678  0.          0.70710678  0.        ]

Also discussed here:
RiftCat/vridge-api#17

Acc/Gyro/Mag axis reference - which is which?

I've been trying to implement the AHRS with the sensors from the PlayStationVR headset, and getting confused about which axis should be which.

From reading the sensor values, as arrays, I have:

Structure of the PSVR sensor:
Gyros (when wearing headset normally).
1 - yaw, +ve right hand forward
2 - pitch, +ve look up
3 - roll, +ve right hand down
Accelerometers, largest when 'x' is highest point
1 - top+, bottom-
2 - right+, left-
3 - front+, back-

And on the other end, when the rendering the scene from the output of Madgewick I know that the following are true (tested by setting during init and not updating the AHRS):

Quaternion that points directly forward
refq = Quaternion((1,0,0,0))

Quaternion pointing/pitched directly up
refq = Quaternion.from_angle_axis(np.pi/2,1,0,0)

No matter how I've tried swapping various axis I have not yet reached a working system, it either 'moves' incorrectly or the Quaternion ends up pointing in the wrong direction....

Can someone/any provide a reference for how the axis should be arranged?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.