Last year we had a robot with a drivetrain geared more for torque using Neverest 40 motors. We were using a MR Gyro to perform different turns and utilized their sample code in their demo video for creating our turning with a gyro code. We had much success with that gyro. This season we are struggling with the IMU on the REV Expansion hub.
We have a robot that is geared more for speed utilizing the Neverest 20 motors. We are still able to get the robot to turn at a speed of .1. However, when using the code we had last year the robot wants to keep rotating back and forth as if it can't find the set heading value that we put. We have it set to allow for a +- 3 degree margin of error and have utilized some other code where the closer it gets to the value the slower it should drive. Sometimes it rotates and stops pretty close to the value, other times it pivots back and forth for 5-8 seconds before settling down.
Is someone willing/able to post their portion of the code where they turn if you are seeing success in using the IMU on the Expansion Hub to accurately and consistently rotate to a set degree? At this point we are having more success in using encoders but we know a gyro would give us more accurate positioning.
Thanks!
We have a robot that is geared more for speed utilizing the Neverest 20 motors. We are still able to get the robot to turn at a speed of .1. However, when using the code we had last year the robot wants to keep rotating back and forth as if it can't find the set heading value that we put. We have it set to allow for a +- 3 degree margin of error and have utilized some other code where the closer it gets to the value the slower it should drive. Sometimes it rotates and stops pretty close to the value, other times it pivots back and forth for 5-8 seconds before settling down.
Is someone willing/able to post their portion of the code where they turn if you are seeing success in using the IMU on the Expansion Hub to accurately and consistently rotate to a set degree? At this point we are having more success in using encoders but we know a gyro would give us more accurate positioning.
Thanks!
Comment