Subject:
|
Re: Re[2]: YAL, Yet Another LegWay
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Tue, 10 Feb 2004 20:02:30 GMT
|
Viewed:
|
3360 times
|
| |
| |
> > Hey Philo,
> >
> > I was just looking over your code, and I think if you change this line:
> > pid = (Kd * err_diff + Kp * err + Ki * err_int) /3000l;
> > to something like this:
> > pid = (Kd * err_diff + Kp * err + Ki * err_int) /3000l + ForwardOffset;
> >
> > then when you change ForwardOffset (via remote control code) the robot will
> > start to go forward (or backward, if it's negative).
> > The ForwardOffset could be between -255 and 255 (I'm sure you don't want it
> > quite that big)
>
> > Steve
>
> Or, you could just alter the original offset that is calculated when
> you first turn it on. I used this method to get it to move forward and
> back. Then it's easy to get the robot to rotate by implementing one of
> the PID controllers for each of the wheels with opposite offsets.
>
> Allen
Hi Steve and Allen,
I already tried what you suggested, but I had only mixed results: either too
little moves or unstable and uncontrolable ones. Perhaps also my PID
coefficients, determined by trial and error, are not so good...
I'd like to have more time to tune all this!
Philo
|
|
Message has 1 Reply: | | [Q] Remote control code ?
|
| Hi Philo,Steve and Allen. I've made a YAL right after reading the articles of you all. It's great and very fun. After tuning some papameters, it is working so well. My Lego has been in a dark corner of my room so long time. New BrickCC/BrickOS help (...) (21 years ago, 21-Feb-04, to lugnet.robotics)
|
Message is in Reply To:
| | Re[2]: YAL, Yet Another LegWay
|
| Hello Steve, Monday, February 9, 2004, 8:55:11 PM, you wrote: (...) SH> Hey Philo, SH> I was just looking over your code, and I think if you change this line: SH> pid = (Kd * err_diff + Kp * err + Ki * err_int) /3000l; SH> to something like this: (...) (21 years ago, 9-Feb-04, to lugnet.robotics)
|
14 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
|
|
|
Active threads in Robotics
|
|
|
|