IQ Autonomous Gen 2 Brain - Inertial Gyro - Turn for 90 infinite turn

Odd problem:
Gen 2 Brain
Drivetrain - 2 Motor with internia gyro
Simple code:

  • Drive reverse 6.5"
  • Turn left for 90 degrees (or any combination)
  • → Infinite turn.
    Our programmer tried all combinations of:
  • Tried new program
  • Added 2 motor drivetrain with inertial
  • Added two lines of code:
  • Drive reverse for 6.5" (60/24 gear ratio on drive train for speed)
  • Turn left for 90 degrees (also tried turn to 90, turn right for 90, etc.
  • Test code - drives infinite circles until stopped.
  • Troubleshooting:
  • Deep calibrate of brain (viewing device degrees is accurate on turning robot to 0, 90, 180, 270
  • Added motor group for conveyor, motor for combine
    • All below added while troubleshooting problem
  • Calibrate BrainInertial
  • Set heading to 0
  • Set BrainInertial heading to 0
  • set Braininertial rotation to 0

None of the above worked if we had the brain inertial gyro enabled.

Odd thing:

  • we create new project
  • Add 2 motor drive train (NO GYRO)
  • Add combine
  • Add conveyor
  • simple program -drive reverse 6.5", turn left for 63 degrees (was about 90) and STOPPED.

He could not get the inertial gyro to work properly. If we remove the gyro we could “fudge” a 90 degree turn (63 degrees).

We did a deep calibrate the gyro, tried adding all the “set gyro to 0” set heading to 0 commands, tried slowing down velocity to 10%, turn velocity to 10%, nothing worked.

Until we removed the drivetrain internal gyro on a gen 2 brain.

Thoughts?

It seems like the gyro isn’t calibrated. Are you completely sure it is calibrating? could you post your code? It would hepl us debug it.

The default driving train did not work for my gear-ratio robot either. I solved it by coding each wheel separately (kind of my own drive train):

I can post code later. We did a deep calibrate under brain devices (left and right arrow).

We also let robot sit still on field when starting program.

If we set on field the degrees on device matches angle (0,90,180,270).

Created new project:

  • no controller
  • 2 motor drivetrain (inertial gyro - infinite spin, no inertial gyro 63 degree turn left - actual is 90 and stops turning.
  • Note: robot does have a 60:24 (?) drive gear ratio.
  • Added combine and conveyor motors.
  • When started - could be none or 6 lines of set headings and rotation and gyro 0 or not
  • When brain left pressed:
  • Drive reverse 6.5”
  • Turn left 90 degrees
  • Don’t recall having a wait 0.5 between those two lines.

That’s all

Most basic with inertial was no when started and only 2 lines under when brain left pressed.

Thanks!



Sorry I didn’t have a better picture of robot.

Thoughts on why inertial gyro not working on simple turn left 90 degrees.

They had added several set X to 0 degrees on started and still would go infinite turn unless we removed inertial gyro. Manually rotating robot gyro on devices had correct matching angle. No pneumatics to mess up startup calibration. Brand new project with no extra devices or drive code (only 3 total lines). Remove inertial gyro and turn left works (although Thad to program turn left 63 degrees to equal 90.

On original code he even slowed down turn speed to 10% to eliminate any momentum question.

Thoughts?

Been through 4 years coaching and two state champs but this has me baffled.

Is it actually turning left ?
Where is the IQ brain mounted ? I can’t see it in the picture.

Thanks James!

Brain is not centered (which could cause issues with precision) - in corner (I know center ideal - but conveyor in way).

Even when he went down to 10% turn velocity still infinite.

Tempted to put external gyro near center and use that.

Bottom right corner of pic

Check out this post Infinite Turning it sound slike the same problem several teams in our program had

1 Like

Chris (and James),

Thanks - I looked at a pic - our drivetrain is “up” and read James post. I’ll try having him flip directions and see what that does. May put a gen 1 gyro sensor near center of robot normal orientation. Both are worth a shot. One week before our West Michigan Championship - since we’ve delayed so long working through this issue not sure how far he’ll get in Skills Autonomous; but some better than nothing and may help with some other awards. I’ll have him try tonight or Monday and post back with updates. Our gen 2 brain is in the corner to make room for conveyor (which would affect accurate angle), but slowing down to 10 % turn velocity should have helped that. Will post updates - thanks both! Here are a couple of other pics that may be better than I had on my cell phone.


In my experience when we had this issue, a gyro sensor did not help and once we flipped the arrow, a gyro sensor wasn’t needed. We got very accurate turns

That might work. I’m not saying you’re wrong, both things might work, but I had a similar problem and I put a gyro in the middle, and I got very precise turns.

Thanks all! We opted to stay with what we had - even though angle were odd (63 = 90 degrees, etc.). Season is done. Thanks for the input. That was odd we had to remove the gyro to stop the constant turn - even at low turn velocity. See ya’ next year.