Reading Gyro Angle from a roborio mounted at an angle with the ground?

Hello! Our team has our roborio mounted at a ~60 degree angle from the ground, with the top of the rio facing downwards (On the surface highlighted in picture below, with ports facing down).roborioMount

We’d like to use the spartan board gyro on this rio to give us the heading of the robot, in order to be able to consistently turn to become parallel with the cargo ship. Is there some math we can do to map one of the axes of the gyro to the heading of the robot?

2 Likes

I don’t remember if the Spartan board has multiple gyros, but I do know the ADXRS453 gyro on the Spartan board is only a single axis gyro. You might be able to do some compensation using an accelerometer reading to determine where the ground/earth is, but tracking heading at a mounting location like this is usually better handled with at least a tri-axis gyro and preferably a tri-axis accelerometer. Even better, using an IMU where the gyros and accels are actually closely tied together and in some cases calibrated together.

TL;DR it’s possible, but you might not get super accurate results.

1 Like

If I were you I, would externally wire the gyro to the RoboRio so it can be resting at the horizontal axis as necessary.

1 Like