Shop OBEX P1 Docs P2 Docs Learn Events
Wheel Encoder question. — Parallax Forums

Wheel Encoder question.

SciTech02SciTech02 Posts: 154
edited 2006-04-19 23:02 in Robotics
Hello, if I got the weel encoders and the compass, could I make my robot (Boe bot) go strait nomater what·surface it's on?· (By watching them, and act on it by·means of ramping to straiten out it's path)· Thank you.··· -SciTech02.

Post Edited By Moderator (Chris Savage (Parallax)) : 4/15/2006 3:21:40 AM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-15 03:22
    There is no way to guarantee· the bot will go straight simply by monitoring the wheel speed.· This certainly helps, but what if a wheel slips?· The only way to detect that would be if you were navigating on compass heading.· You would know if you turned then.· But only within the resolution of your compass module.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • SciTech02SciTech02 Posts: 154
    edited 2006-04-15 03:30
    That's what I ment, I would use both at the same time.· They could monitor speed, and the direction heading, and act on it.· It sounds like it could work.··· -SciTech02.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-15 03:46
    Right, the encoders help to ensure the wheels are moving at the same speed and the compass maintains heading.· With those two you're pretty well set, I think.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-04-15 04:06
    Gents -

    There are only a couple of methods to measure forward progress, and driven wheel encoders, and compasses aren't on the list, unfortunately. The problem you need to think about, even if it represents an impossible situation, is - what if the 'bot is sitting on ice or in a puddle of oil? Now both wheels are spinning and the 'bot is going nowhere.

    At that juncture, the only ways (without expensive equipment) that you can realize that there is no forward progress are either by means of a non-driven, trailing wheel (odometer wheel with rotation sensing ability) or by using GPS (or similar technology) to check your last and current positions.

    There are other methods which can be employed but they depend on knowing a good deal about your environment. If you know there will always be a wall in front of the 'bot, you can measure the contined, deceasing distance to the wall as forward progress. So too if there are grid lines or stripes underneath the 'bot, those can be sensed as well.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-15 06:58
    The original post was asking about keeping a heading.· No mention was made of confirming distance traveled or even speed (short of keeping the wheels matched for speed).· But you are correct, more would be required to accomplish this.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • SciTech02SciTech02 Posts: 154
    edited 2006-04-16 00:31
    I see what you are saying, but all I wanted was it to go strait on a solid surface, and if it rolled on a diferent surface (Carpet for instance) it would still go strait.· Now I'm wondering if I can just use the compass.··Because all I wanted it to do was go strait and if it just checked the compass heading every pulse (or more) and slow down (or speed up) a weel to·keep the compass heading in range.··· -SciTech02.·
  • Tom WalkerTom Walker Posts: 509
    edited 2006-04-17 14:08
    If you just rely on heading, you can be travelling in any direction (just ask a pilot friend). It doesn't really tell you anything about your movement...only which way you are "facing".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • SciTech02SciTech02 Posts: 154
    edited 2006-04-19 00:08
    That would work.· See what I wanted·it to do was to check it's heading every pulse or two.·If it's straying off it's set range, it would turn until it's in range again (ramping would be better).··Then, if it turns, it will check it's heading and stay in range of that heading.· I really didn't need to know how far it went, just if it's still going in the same direction.··· -SciTech02.
  • Tom WalkerTom Walker Posts: 509
    edited 2006-04-19 12:51
    Just to reiterate, because I'm not certain that I was clear...

    If you rely only on a compass, the only thing you truly "know" is which way you are "facing"...not which way you are "going"...
    If you are comfortable enough with your environment, you can make certain assumptions about what the heading means in relation to your actual travel (assuming that the wheels don't slip can be a big assumption, the flatness of the terrain compared to the "stickiness" of your wheels can have a large effect).

    This may be a "purist" argument because you indicate that you will be using encoders as well, which should give you more accurate information about which way you are travelling...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • SciTech02SciTech02 Posts: 154
    edited 2006-04-19 22:44
    I see what you mean.· But what I said would work fine.· All I wanted it to do was not to veer off it's path.· I don't need to know how "Far" it's going, just if it's staying in the same direction and not veering off into the unknown.· Do you know what I mean?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There is always an answer.

    There is always a way.
    There is always a reason.··· -SciTech02.
  • Russ MillerRuss Miller Posts: 25
    edited 2006-04-19 23:02
    SciTech02 said...
    I see what you mean. But what I said would work fine. All I wanted it to do was not to veer off it's path. I don't need to know how "Far" it's going, just if it's staying in the same direction and not veering off into the unknown. Do you know what I mean?

    It should be fine SciTech. For heading the compass will be a better choice than encoders because the compass errors will not grow over time while the encoder derived heading may continue to grow due to small biases in the robot or surface.

    The compass errors can be _large_ in a building with lots of piping, steel furniture or structure, so if you want to get an idea how big the problem will be before you spend money on a sensor walk around with a regular magnetic compass and see what kind of deviaiton exists. You may also need to experiment with placement of the compass module on your robot to minimize effects of the robot itself and use the calibration routines in the documentation.
Sign In or Register to comment.