To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 22195
22194  |  22196
Subject: 
Re[2]: YAL, Yet Another LegWay
Newsgroups: 
lugnet.robotics
Date: 
Mon, 9 Feb 2004 22:39:15 GMT
Viewed: 
2852 times
  
Hello Steve,

Monday, February 9, 2004, 8:55:11 PM, you wrote:

SH> In lugnet.robotics, Philippe Hurbain wrote:
YAL: Yet Another LegWay
=======================

Here are some details of my implementation, using two regular light sensor to
monitor YAL inclination.

The [<http://www.philohome.com/yal/yal1.c code>] is a simple PID algorithm
implemented in BrickOS, direct translation of


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:

SH>     pid = (Kd * err_diff + Kp * err + Ki * err_int) /3000l + ForwardOffset;

SH> then when you change ForwardOffset (via remote control code) the robot will
SH> start to go forward (or backward, if it's negative).

SH> The ForwardOffset could be between -255 and 255 (I'm sure you don't want it
SH> quite that big)

SH> 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

--
Best regards,
Allen                            mailto:Kaptain.korolev@ntlworld.com



Message has 1 Reply:
  Re: Re[2]: YAL, Yet Another LegWay
 
(...) 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 (...) (20 years ago, 10-Feb-04, to lugnet.robotics)

Message is in Reply To:
  Re: YAL, Yet Another LegWay
 
(...) Hey Philo, I was just looking over your code, and I think if you change this line: pid = (Kd * errdiff + Kp * err + Ki * errint) /3000l; to something like this: pid = (Kd * errdiff + Kp * err + Ki * errint) /3000l + ForwardOffset; then when (...) (20 years ago, 9-Feb-04, to lugnet.robotics, FTX)

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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR