Subject:
|
RILYBOT 4 (was Re: show-me training
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Tue, 19 Oct 1999 21:03:26 GMT
|
Viewed:
|
841 times
|
| |
| |
I now have a robot working using the intuitive training principles I described
about 6 weeks ago in this thread. This robot will be at Mindfest.
Here are the web pages describing what I've done so far:
http://www.mrob.com/robot
and here is the current NQC program:
http://www.mrob.com/robot/rb4_08.nqc
Notable departures from my original vision include dropping the two-variable
chi-squared linear regression (for training mode) in favor of simple
one-dimensional averaging. After much consideration I decided that, although I
could do the chi-squared formulas if I wished, it would require developing some
32-bit math routines and it seemed like the effort just wasn't worth it.
However, I have had little trouble getting the hardware to work and
implementing the playback ("GO mode") algorithms, which are particularly
notable for combining different stimuli into a single pair of outputs
(aggregate linear motion and aggregate rotational motion) in a useful way. They
use weighted averages based on input stimuli that decay exponentially with
time. I will quote the main piece of code responsible for this:
int bump_1; // is 100 when hit, then decays exponentially to 0
int bump_3; // rear bumper; works just like bump_1
int m1_f; int m1_r; // learned forward and rotate for bumper 1 stimulus
int m3_f; int m3_r; // like m1_f and m1_r
int m0_f; int m0_r; // forward and rotate in absence of a stimulus
int ft; int rt; int td; // temps
int fwd_ac; int rot_ac; // communicate desired sum and difference to motor
control task
task master
{
while(true) {
ft = bump_1 * m1_f;
rt = bump_1 * m1_r;
td = bump_1;
ft += (bump_3 * m3_f);
rt += (bump_3 * m3_r);
td += bump_3;
if (td < 100) {
td = 100 - td;
ft += (td * m0_f);
rt += (td * m0_r);
td = 100;
}
ft /= td; minmax(fwd_ac, ft)
rt /= td; minmax(rot_ac, rt)
Sleep(MASTER_DELAY);
}
}
In lugnet.robotics, Robert Munafo writes:
> I'm hoping to start trying out the idea in NQC. That means no replacement
> firmware. However, I want to make it eventually use all five devices that come
> standard with the Robotics Invention System (two motors, two touch, one light)
> and it looks like 32 variables isn't enough to compute and model 6
> linear-regression functions.
>
> The motors generate voltage when you turn them (assuming they've been turned
> off with the FLOAT method rather than the OFF method). This voltage can be
> combined with the touch sensors and the two extra buttons (TEACH and GO) using
> an appropriate resistor network. That's one button, one sensor and one motor
> feedback-voltage per input port. The ports would be put into RAW mode. The
> third input port is used for the light sensor.
>
> During TEACH mode, each input has to be fed through some type of function to
> seperate it into the touch sensor value and the motor value. You don't have to
> worry about seperating out the TEACH and GO buttons. I haven't worked out the
> formula.
>
> - Robert Munafo http://www.mrob.com/
> LEGO: TC+++(8480) SW++ #+ S-- LS++ Hsp M+ A@ LM++ YB64m IC13
|
|
Message is in Reply To:
| | Re: show-me training
|
| (...) I'm hoping to start trying out the idea in NQC. That means no replacement firmware. However, I want to make it eventually use all five devices that come standard with the Robotics Invention System (two motors, two touch, one light) and it (...) (25 years ago, 8-Sep-99, to lugnet.robotics)
|
17 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|