Comments (4)
Also note that, as mentioned in the readme, this repo assumes that orientation data has been calculated already (for example, using this code) and is only concerned with visualizing that orientation. In case your algorithm calculates quaternions, this repo contains a function that converts that to yaw, pitch, roll angles as mentioned in my previous response. In case it provides yaw, pitch, roll angles, the sensor fusion implementation used defines the ranges.
from pyteapot-quaternion-euler-cube-rotation.
Please refer quat_to_ypr()
function in pyteapot.py
. Yaw and roll angles are obtained with the math.atan2()
function, which returns angles in [-pi, pi]. Pitch is obtained with math.asin()
, which returns angles in [-pi/2, pi/2] (refer this page)
from pyteapot-quaternion-euler-cube-rotation.
Just off the topic of the created issue, Currently, we are using BNO055 in one of our projects. The IMU is placed next to the dc motor due to space constraints within the hardware setup. Due to motors vibrations, we are applying a low pass filter on quaternion values read from this script. We have set 5 Hz as a cut-off frequency of the filter. We have also placed IMU on Sorbothane (damping material) to minimize the vibrations. However, we are still selling the error in the orientation.
What could be done to reduce the impact of motor vibrations on IMU both from a software and hardware point of view? Any inputs are highly appreciated!
from pyteapot-quaternion-euler-cube-rotation.
Apart from what you have already mentioned, I can only think of a few things:
- Try to apply filters on the raw accelerometer and/or gyroscope measurements and then apply sensor fusion instead of applying filters on the quaternions fused from noisy measurements since that is a highly non-linear operation. I don't know if the particular IMU you are working with has a library that lets you readily do this, although the datasheet should help you implement this on your own using standard libraries (eg. you should be able to find libraries for TWI (aka I2C), SPI, or whatever interface that IMU uses)
- Maybe also try to characterize the motor vibration frequency(ies?) and set the cut off frequency for your filter accordingly?
- (Digital) Signal Processing is a huge domain in itself: try to find a better filter for this particular use case. However, this is not my area of expertise and hence cannot recommend something for this
- Read up on standard methods for vibration isolation. The wikipedia page could be a start. You can find some good review papers on the topic too.
Also it depends on what you mean by "error in orientation". In general, IMUs (ones based on accel+mag+gyro) tend to drift. You can increase accuracy or reduce drift by using better sensors (or better sensor fusion techniques) but in the end, this is unavoidable without fusing with additional sensors. Try to figure out if the problem you are referring to is indeed because of the vibration (eg, look at orientation without keeping it close to the motor). That's all I can say for now.
from pyteapot-quaternion-euler-cube-rotation.
Related Issues (11)
- OpenGL.error.NullFunctionError: Attempt to call an undefined function gluPerspective HOT 2
- Application: Black screen, not-responding HOT 9
- Do graceful error handling for socket communication HOT 1
- Which order to pass quaternions? HOT 2
- How to rotate object 180 degrees?
- MPU9250 sensor fusion HOT 2
- Quaternion calculation HOT 1
- unable to initialize HOT 8
- No argparse interface for controlling the program HOT 1
- [TODO] Read data from file for visualisation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyteapot-quaternion-euler-cube-rotation.