I recently added an adxrs613 gyro to my setup and am trying to calibrate the odometry. Because my kinect is mounted upside down on my robot I expected that some small changed in the code of calibrate.py are needed for everything to function correctly. I expected that the change in calibrate from
scan_delta = 2*pi + normalize_angle(scan_end_angle - scan_start_angle)
scan_delta = 2*pi - normalize_angle(scan_end_angle - scan_start_angle)
and in align from
angle = self.scan_angle
angle = - self.scan_angle
would suffice to fix this?
However my problem is that, during the calibration run, I notice that especially at the lowest speed (first calibration rotation) the turtlebot rotates much too far (about 1.5x). I guess because the bot rotates way too far, it is not able to find the straight wall anymore and the next calibration run starts off at a wrong position. These higher speed calibration rotations do however seem to rotate approximately 360 degrees, but then of course also end up facing away from the wall and thus not finding it correctly. I checked if the data coming from odometry and imu is making sense by echoing when using keyboard_teleop and it does.
Any suggestions on what's going wrong and how to fix it?