How to make Boe-Bot turn with certain degree?
Hasher
Posts: 3
I would like to know how to make my Boe-Bot turn the degree I wish???
Example==> turn 270 degree to right
FOR counter=1 TO endValue
PULSEOUT 13, 850
PULSEOUT 12, 850
PAUSE 20
NEXT
How to get the endValue to turn 270?
Thanks in advance!
Example==> turn 270 degree to right
FOR counter=1 TO endValue
PULSEOUT 13, 850
PULSEOUT 12, 850
PAUSE 20
NEXT
How to get the endValue to turn 270?
Thanks in advance!
Comments
There are wheel position encoders available from Parallax that produce pulses as the wheels turn and these can be used to give feedback as to wheel position and speed. There's still the problem of slippage on the floor.
Mike is certainly correct and I would EMPHASIZE the problem of slippage. Only in the high precision machinery world, such as in mills or lathes or whatever, do we find it possible to "turn" almost precisely.
This bothered me greatly during my very beginning robot days. (I am still a newbie.) However, I got to thinking about it and finally asked myself this question: What turns precisely or navigates precisely in nature? The answer is easy: NOTHING. All living organisms capable of locomotion navigate to an end point via a series of trial and errors with continuous negative feedback correcting the errors.
You might think of robotics from that perspective. If you do, it might have an impact on your sensor choices. The end point is the goal. Not falling off the cliff before you get there is the problem.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
For example, I wanted my line-maze BOE-Bot to turn 180 degrees at any dead-end path. (Black line on white background)
It kinda worked, but between the battery voltage reducing, slippage and whatever, I didn't get as close as I wanted. What I did was:
1. Turn about 120 degrees (to make sure I was clear of the line behind me.)
2. Do pulsout in a loop, reading the sensors after each pulsout, waiting for one or two of the left sensors (in a left 180 turn) to "see" black. Then return to the "follow the line" routine.
I found this lets the robot pick up the line perfectly each time and take off in the new direction much more dependably and accurately.
Code for this is at www.picrobots.com/my-line-maze.php
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Richard Vannoy
Programming and Electronics Instructor
www.PICRobots.com
www.SailingStrategy.info
www.TeachingTechnicalTraders.com
·
Welcome to the Wonderful World of Robotics! They never do exactly what you intend, and they never do exactly the same thing twice. Too many variables in the real world. And you're only asking about one simple turn to a heading! Imagine the cumulative error of long range odometry: telling your robot to drive a certain distance, then turn a certain amount, several times in a row.
It seems simple, but it's incredibly difficult and maddeningly erratic. Yet it's fun to try and learn what does and (mostly!) doesn't work. Besides being a great technical resource, this forum is also a support group for frustrated roboticists. Semper Fi!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."