Shop OBEX P1 Docs P2 Docs Learn Events
Question on compass vs. gyroscope for navigation — Parallax Forums

Question on compass vs. gyroscope for navigation

SteveJSteveJ Posts: 13
edited 2011-07-09 14:14 in Accessories
Hi,
I'm an experienced programmer, but, relatively new to robotics.
I have set my Stingray to rotate for fixed amounts of time and find that the actual distance will vary depending on the charge remaining on the batteries. I'm considering adding a compass or a gyroscope. Can anyone advise on pros and cons of each?
Is there a better method to control the problem I'm seeing with the rotation distance problem?

Regards,
Steve

Comments

  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-07-08 07:29
    SteveJ,
    Welcome to the forums! I recently got into robotics as well and created my homemade Stingray.

    I think your solution might be quadrature encoders on the motors or wheels so you can accurately determine the number of RPMs and distance traveled.

    The motors are not perfectly matched and you can't really compensate for all of the variables thru program code. Search the forums for quadrature encoders and you can find some good information.

    - Ron
  • ercoerco Posts: 20,256
    edited 2011-07-08 17:29
    Either way is a long row to hoe. I agree with Ron, encoders are a must to start. Plenty complicated to "get going", much less master; compass and gyro add further variations.
  • SteveJSteveJ Posts: 13
    edited 2011-07-09 12:26
    SteveJ,
    Welcome to the forums! I recently got into robotics as well and created my homemade Stingray.

    I think your solution might be quadrature encoders on the motors or wheels so you can accurately determine the number of RPMs and distance traveled.

    The motors are not perfectly matched and you can't really compensate for all of the variables thru program code. Search the forums for quadrature encoders and you can find some good information.

    - Ron

    Thanks for the suggestion. Good to see the solution in action!
  • SteveJSteveJ Posts: 13
    edited 2011-07-09 12:34
    Thanks Erco. Looks like the encoder is a better way to implement than a compass or gyroscope and in many ways simpler and more robust!
    Steve
  • ercoerco Posts: 20,256
    edited 2011-07-09 14:14
    SteveJ: I had excellent results with homebrew wheel encoders and a Stamp, long thread at http://forums.parallax.com/showthread.php?118861-Homebuilt-Robotic-Platform-AKA-Retrobot&highlight=retrobot
    and I had an article in Robot magazine on that bot.

    I'm sticking to my story that REAL MEN make their robots out of plywood, plus they make their own encoders! :)
Sign In or Register to comment.