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 / 7703
7702  |  7704
Subject: 
controlling RCX from PC?!
Newsgroups: 
lugnet.robotics
Date: 
Tue, 26 Oct 1999 22:06:40 GMT
Original-From: 
nik heger <nik@stagecastSTOPSPAMMERS.com>
Viewed: 
617 times
  
all,
i have a little program that controls the RCX from the PC. i know
other people here have done that, so...

my major problem is that signal round trip time is very high - it
takes about 200 - 250 ms to send ONE command to the RCX (waiting for
the response included). this is WAY too long to do anything
interesting. in particular, i am trying to navigate the brick on a
set course of black stripes using the light sensors.
the only way i can currently get it to work is when i step the
motors, doing this:
- step (motors On and Off) ... 200ms
- test sensors ... 200 ms
- step.... and so on.

this makes the lego car crawl around the floor - not very impressive.
but i find that when i don't step the motors, the car goes way too
fast for me to issue any commands to it before it "overshoots" a line
and gets completely confused. not surprising, considering that it
takes 200ms to test one sensor and an additional 200 ms until the
motors react - the car can go quite a distance in half a second.

i already slowed the car down by using gears and setting the motor
speeds to 2 - but i am not willing to make it any slower, as that
would not be fun.

what i don't understand is: why is it so slow?

i have several theories, and maybe someone around here can help me
reinforce or dismiss them:

1) the firmware is slow, so the actual RCX controller takes a long
time to respond to requests. i can't really believe this, since this
is pure hardware speed and it does not seem like the RCX would need
to do a lot of fancy stuff to return a sensor value or set a motor
speed. on the other hand, all other causes seem even unlikelier.

2) the IR is slow. i doubt that, too, since it is set to 2400 bits
per second, approx. 240 bytes per sec, and each command has about 14
bytes in it. => 10 commands per second should be in there. hmm... ,
come to think of it, 10 is not really a lot.
i never have to resend commands, though, so the IR connection itself
is pretty stable (i mounted it on the ceiling and have the RCX
standing up).

3) i am doing something incredilby stupid and just don't know about
it?! all i do is send opcodes (thanks, Kekoa!) to the brick and then
wait for the response.

has anybody made similar experiences? would i gain a lot of speed if
i translate parts of my program into RoboCode and download it onto
the brick (i was not too impressed with reaction times in the
"pathfinder" challenges i did, so i am reluctant to do all this work)?

thanks,
nik



Message has 2 Replies:
  Re: controlling RCX from PC?!
 
(...) This isn't a fix for the slow speed you're noticing, but: what about programming the RCX to take care of the low-level moving around -- the basic motion and testing of sensors -- and then just sending higher-level commands from your program. (25 years ago, 26-Oct-99, to lugnet.robotics)
  Re: controlling RCX from PC?!
 
nik heger wrote in message ... (...) Remember the NASA Pathfinder? Signal round-trip was about 30 minutes! Still, they did some interesting research. Try to put more decision-making capabilities in the RCX itself and let the PC handle its behaviour (...) (25 years ago, 27-Oct-99, to lugnet.robotics)

4 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
5 hours ago
Custom Search

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