Subject:
|
Odometers
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Mon, 24 Mar 1997 23:34:58 GMT
|
Original-From:
|
Tom Hueske <TAHUESKE@EE.TWSU*stopspammers*.EDU>
|
Viewed:
|
1956 times
|
| |
| |
Has anyone used odometers to make their bot drive in a straight line.
I am trying to do this and it seems like the delay in reading the
encoder values from 1 line to the next causes problems. I have tried
taking two results after sleeping for 0.3 seconds subtracting
these 2 values and correcting accordingly but this still doesn't
work well. Maybe the time isn't precise enough???
If anyone can share their experiences with this I would appreciate
it.
Here is a sample of the procedure I call to check the encoders and
try to correct accordingly.
Thanks,
Tom Hueske
/*globals are defined as:
RSPEED: Right motor peed
LSPEED: Left motor speed
SPEEDSTE =: 20
o_l_count: left odometer count
o_r_count: right odometer count
I call odomstraight procedure in a loop and it should drive fairly
straight but it doesn't.
*/
void odomstraight()
{
o_l_count = read_encoder(L_ODOM);
o_r_count = read_encoder(R_ODOM);
if (o_l_count > o_r_count)
{
RSPEED = RSPEED + SPEEDSTEP;
}
if (o_l_count < o_r_count)
{
RSPEED = RSPEED - SPEEDSTEP;
}
/*This is to keep the motors from going over 1 step above starting
speed*/
if ((RSPEED) > LSPEED)
{
RSPEED = LSPEED+SPEEDSTEP;
}
if ((RSPEED) < LSPEED)
{
RSPEED = LSPEED - SPEEDSTEP;
}
motor(R_MOT, RSPEED);
motor(L_MOT, LSPEED);
|
|
Message has 1 Reply: | | Re: Odometers
|
| Tom, What kind of encoders are inside these i.e., Hall Effect Sensors (magnetic), or IR LED emitters/detectors (optoelectronic)? Jose-Alfredo Esguerra WSU Mechanical Engineering Student Autonomous Mobile Robot Project (28 years ago, 25-Mar-97, to lugnet.robotics.handyboard)
|
Message is in Reply To:
| | COX SERVOS
|
| I have a 10-14yrold COX micro servo that will rotate freely in both directions when applied straight DC. Does anyone know if these older servos operate differently than PWM. This would be a great solution vs hacking my new servos. (28 years ago, 24-Mar-97, to lugnet.robotics.handyboard)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|