IMU based joint angle measurement

Let us assume we have a two 2-DoF robot. Both axes rotate around x. And the goal is to measure the joint angle values with the roll value from IMUs attached on each link.
However, the problem is that the roll value of the second IMU also increases whenever the first axis rotates.

Am I missing here something?

Above you can see the two links. The yellow points are the center of gravity points where the mpu-6050 is placed on. So whenever the first axis rotates, the second roll is changing...I am not using any fancy algorithm to measure the roll, just the standard MPU6050_DMP6.

• The roll increases on the second axis, (which isnt moving) while the first moves? Or are they coupled in some way and the second axis is also rotating? Then itd be clear the second axis will also show a change Aug 19 '19 at 17:46
• Are you only measuring gyro aswell? Aug 19 '19 at 17:47
• Yes, the roll increases on the second axis, (which isnt moving) while the first moves and I am using a 6-DoF IMU. So the gyro is also measured and used.
– Joe
Aug 19 '19 at 17:48
• If you rotate the robot by hand in the air (assuming its so small...)are you getting a change in gyro? Are you using a comp filter, or something fancy? I assume this is a balancing robot and you’re calculating the body angle via inferred wheel angle? Or why are the axis parallel and require seperate measurement? My guess is either wiring is bad, and you’re reading the wrong signals, or your filter/observer is too heavily dependent on gyro/or accel which is reading some kind of movement....maybe if you post some code or maths of what you’re doing and the signals i could help more.... Aug 19 '19 at 17:55
• Right now we can only shoot in the dark, as ideally you shouldn’t be reading anything from something that doesnt move. Aug 19 '19 at 17:57