AutoModelCar / AutoModelCarWiki

59 stars 25 forks source link

IMU gets stocked in the same value #4

Closed Toku11 closed 7 years ago

Toku11 commented 7 years ago

Hi, we have been making some test holding an orientation with the value of the heading topic, everything was working good until we noticed that the value was the same when we were trying to move in slow velocity (less than 300 in motor speed), when we try to reach certain angle the measurement holds the same value in the heading topic (yaw), we already checked the yaw value directly connected via USB cable (Arduino Terminal) and shows the same value than ROS, but when we stop the vehicle or the vehicle is moving faster apparently the IMU works again.

We also noticed that when turn on the system the YAW angle starts with certain angle offset (between 30 and 60 degrees), all the events can be reproduced. What could be happening ? Could the IMU have some damage? Greetings

AutoModelCar commented 7 years ago

IMU works fine.

AutoModelCar commented 7 years ago

Original library: https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050

AutoModelCar commented 7 years ago

@Toku11 could you please use the code below to calibrate your IMU? https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050/examples/IMU_Zero

    mpu.setXGyroOffset(420);
    mpu.setYGyroOffset(-59);
    mpu.setZGyroOffset(69);
    mpu.setZAccelOffset(1323); 
Toku11 commented 7 years ago

Thanks for your help, the IMU works fine with the values given by IMU_ZERO.