I am having a problem with calibrating my Inertial sensor where the initial pitch and roll are being calculated several degrees off from the orientation of the sensor. Is there a way to fix this?
How long are you guys calibrating it for?
what does the dashboard show ? Is the sensor mounted at an angle ? After calibration, the roll/pitch/yaw values will slowly adjust themselves over a few seconds to reflect the true orientation of the sensor.
There’s no choice, calibration time is fixed for the inertial sensor, just slightly more than 2 seconds.
This is unrelated to this topic, but for my code i have the calibration in my pre auton then i have a wait until the calibration is complete. Is that how it should be or should i do it some other way?
My teams experienced the same issue. We ordered a four sensors and get different results from at least one. I was wondering if we could take the raw number, instead of degrees, and (attenuate) multiply the value by a constant to calculate the degrees.
The X-axis acceleration reads -1G when the sensor is sitting flat. Would that affect the percieved orientation of the sensor during calibration? To get the sensor to read flat, the robot needs to be tilled in the air about 10°
When the inertial sensor calibrates, it looks at the acceleration data and decides which one of the six possible orientations it has been mounted in. With that knowledge, it will adjust data so roll/pitch/yaw and heading are relative to the ground. If you have to tilt the robot 10 deg to get roll and pitch to read 0, then something is not level, I can’t really say without more data, but perhaps put a level on the robot and figure out if it’s a physical misalignment on the robot or something internal to the sensor. If all you care about is heading (or rotation) it probably won’t make too much of a difference (although I have never measured any error in heading if the sensor is not completely flat, put that on the todo list I guess)
If it doesn’t affect the rotation it should be fine for our purposes. Is it possible that something could be different electically where the zero-point of the accelerometer is off?
can you run this program, let the IMU finished calibration, then touch the screen and send me the data from the terminal (it just dumps all the numbers, I’m interested to see what they are)
v5code-project-imuDebug.zip (10.6 KB)
(change port number for IMU to yours)
Ours behaves the same
do you mean X acceleration reads -1 ? are you fully updated to vexos 1.0.9 ?
After calibration, z-axis reads -1G but the pitch reads anywhere between 10-15 degrees when the robot is on a concrete floor. I haven’t put a level to it, but to get pitch to read zero, the robot must be rotated substantially, to a point where visually the IMU is not level. Will try the program you posted and send results. Competition this weekend so may not be til next week
I won’t have access to my team’s robot until tomorrow, but I will run the code and send the data. Also, I meant to say before that the x -axis was reading -0.1G not -1G
Here is the data:
yea, that seems to be a significant error, if you determine that it truly is mounted level on the robot (wrt the ground, use a spirit level) then we may want to get hold of that unit so we can analyze why it’s different.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.