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 / 18722
18721  |  18723
Subject: 
Re: Sword fighting robots
Newsgroups: 
lugnet.robotics
Date: 
Wed, 21 Aug 2002 19:53:20 GMT
Original-From: 
T. Alexander Popiel <[popiel@wolfskeep.com]spamless[]>
Viewed: 
692 times
  
In message:  <H17FH7.IAE@lugnet.com>
             "Carl Kadie" <carlk@msn.com> writes:

Problem one:
Even with the angle sensor, I don't know how to move the sword to the
angle I want. My current program just goes until the angle is reached and
then turns off the motor. The sword, however, oven overshoots. We'd be
grateful for tips or pointers on how to do this.

To get more precise (and smoother) positioning, slow down the movement
when it starts getting close to the desired position.  Motor speed is
generally best governed by pulse-width modulation via rapid on/brake
switching, although some people will argue for on/float switching instead.
Switching speed is important, as is the relative durations of the on and
off states; I would recommend pulse cycles no longer than 10ms.  Faster
pulsing is generally better than slower, here.

Another problem that you're likely to run into is gear lash; as the
arm/sword/whatever swings past a balance point (generally vertical),
the forces on the arm will reverse direction, and the arm will move
uncontrolled as far as the looseness of the gears will let it.  In
Lego, this is often several degrees for just a single gear interaction...
and it only gets worse with longer gear trains.  Rubber bands in
strategic locations can sometimes help by shifting the balance points,
but that generally increases strain on the motors, when pushing
against the rubber bands.

Problem two:
Ideally, the robots would automatically get themselves facing each other
at, say, 2 inches apart. From this known position, they could do sequences
of moves. Maybe there is some way to use the two light sensors to achieve
this position, but I don't know what it could be. It seems they could look
for the other's light, but they wouldn't know how far away they are. Maybe
there is some design using the light sensors to face each other and the
touch sensors to get the right distance. Anyway, I'm open to any suggestions
on this.

This can be a difficult problem.  If you can guarantee that the other
robot will be the brightest object in the vicinity (in an evenly lit
room, and bright lamps on the other robot, visible from any angle),
then having the robots spin around and orient on the brightest light
can work.  If you can't guarantee that (either because you're in a room
with a window, or its beacon is only visible from the front, or some
other restriction), then the problem is _much_ more complicated.

One thing I'm working on right now is a sort of proximity/reflectance
measure using a light sensor (with the red light blocked via a 2-stud
beam right in front of the sensor) and a Lego lamp (with the directional
reflector on it).  I compare the light sensor readings with the lamp off
and with the lamp on, and use that as a rough gauge of how far away
something is.  Greater difference == closer/more reflective object.
By turning the lamp/sensor combo back and forth, I can home in on
(nearby) objects.  Useful for Lego Sumo.

- Alex



Message is in Reply To:
  Sword fighting robots
 
IDEA: After watching the Tyron Powers version of Zorro, my 7-year-old son and I would like to make two Lego robots that can sword fight each other. To make it harder: They should be autonomous To make it easier: They should "cheat" by sending each (...) (22 years ago, 21-Aug-02, to lugnet.robotics)

5 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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