-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
D435i IMU problem #4391
Comments
@TanmayPathak hello, IMU raw data inherently exhibits noisy characteristics. |
@malith1992, that is correct. In an inertial system affected by G-Force only you can extract the actual Pitch and Roll angles. You also track the left-right rotation, but the initial Heading angle is arbitrary defined. |
I wrote a code to calculate the YAW, PITCH and ROLL in python by referring rs-motion example and a IMU data gathering example . I used the same logic. Please tell me if there is any mistake in my code @ev-mp
You can get an idea about the sensor origin and coordinates of D435i camera from this document |
@malith1992 |
@AhnHyeongHyun What kind of different you mean ? |
@malith1992, in the above code you use hard-coded indexes for accel and gyro frames, which is not the correct approach:
You need to iterate over the frames in the frameset to establish their affinity.
In certain situations you can extract orientation roll and pitch from the acceleration values and use them to compensate for the gyro drifts. But this is only possible if (a) you have the IMU unit perfectly calibrated, and (b) the sum of forces applied to the camera equals G (e.g the device's is either completely static or moves with a constant linear velocity) |
@TanmayPathak , do you have follow-up questions on this topic ? |
Hello, I'm new to sensors like IMU, and I've got some questions about using D435i IMU and converting it to angles.
|
@magnusbarata , it seem that the gyro is not working properly. Did you try to run |
can you correct the mistakes in the codeabove @ev-mp , or provide a clear way to calculate the following values? |
Hey, thanks for the code. It is working very well, however, except the angle_Y. I made a few change so that angle_Y could be estimated by integrating gyro_Y (tested, working well ignoring the shift after long-time running).
|
Thanks so much @roobooot for sharing your solution for calculating Y :) |
Thanks to @malith1992 and his brilliant solution. |
Issue Description
As I have taken IMU data by using following code :
The Data which I am getting is highly fluctuating and from that I also not be able to derive accurate YAW , PITCH , ROLL etc values .
Is there any method available in python to derive these data ( YAW, PITCH , ROLL ) directly ?
The text was updated successfully, but these errors were encountered: