Closed veeresh-dammur closed 3 years ago
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)
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.
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!
Apart from what you have already mentioned, I can only think of a few things:
Hi, Thanks for the nice repo. I would like to ask about the Euler angle ranges obtained from MPU9250. Do you get the orientation values between -180 to +180 degrees on each Euler axes (yaw, roll, pitch)?