Home › Forums › Forums › Technical Support for BerryIMU › Odd Values
Tagged: BerryIMU
- This topic has 3 replies, 2 voices, and was last updated 8 years, 3 months ago by Mark Williams.
- AuthorPosts
- February 27, 2015 at 7:00 pm #3586NocturnalParticipant
I just hooked up my BerryIMU to my BeagleBone Black, and compliled some of the sample code. Some of the values I am getting seem a little odd though (I tried a couple different tutorials code from the git repo) .
Loop Time 200 GyroX 2325.095 AccXangle -19.046 CFangleX 45.363 GyroY 1311.378 AccYangle -11.202 CFangleY 24.295
Loop Time 200 GyroX 2327.154 AccXangle -19.169 CFangleX 45.423 GyroY 1312.442 AccYangle -11.909 CFangleY 24.241
Loop Time 200 GyroX 2329.156 AccXangle -19.513 CFangleX 45.417 GyroY 1313.548 AccYangle -11.618 CFangleY 24.238While most of the values seem mostly stable (and therefor probably sane) GyroX and GyroY are continually incrementing which doesn’t seem right.
I don’t have time to go through and figure this out atm, so I though I would ask if I am missing something.
March 1, 2015 at 12:02 am #3588Mark WilliamsKeymasterWe have never tested on the BBB. But in theory, it should work.
The gyro values will always increase or decrease, even when the IMU is not moving. The is the drift as a result of noise all gyros produce. This is why a complementary or Kalman filter is used to fuse both the gyro and accelerometer readings for an accurate reading.
The angles your are interested in above are CFangleX and CFangleY (CF for complementary filtered). Do these angles seem correct when you rotate the IMU?
Mark --OzzMaker.com --
March 1, 2015 at 1:48 am #3590NocturnalParticipantThey don’t go up and down, the just go up, by a fairly consistent amount each time, while stationary. Which seems strange. I mean you don’t actually seem use the values. I’m curious why you are tracking the combined total rather than just the current rate_gyr * DT.
I know CFangleX and CFangleY are the values I am after (or kalmanX / kalmanY with the other sample code), and they seem sane.
March 1, 2015 at 11:32 am #3593Mark WilliamsKeymasterthe is the correct behavior of a gyro. It will increase value over time, even when it isn’t moving. All gryos exhibit this behavior.
However, it shouldn’t really increase more than 2 degrees a second.They gyro will be trusted for only a short period of time, however for that short period, we need the accumulated amount of angle for that period.
Mark --OzzMaker.com --
- AuthorPosts
- You must be logged in to reply to this topic.