Difference between revisions of "Tom Plick's Course Project"

From GICL Wiki
Jump to: navigation, search
(GICL Bot: Updated link(s))
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
[[Category:Bio-Inspired Robot Design (Fall 2006) Projects]]
 
[[Category:Bio-Inspired Robot Design (Fall 2006) Projects]]
  
Current simulation: [[Media:TomsRobot3.zip]]
+
Current simulation: <!--GICL Bot edit:-->[[TomsRobot3.zip Contents|TomsRobot3.zip]]
  
 
Immediately below is my final report for the class.
 
Immediately below is my final report for the class.
Line 16: Line 16:
  
 
[[Image:Plick4.jpg]]
 
[[Image:Plick4.jpg]]
 +
 +
As the robot walks, each pair of legs rotates about a central axis, in the same direction and at the same speed.  However, the two pairs on the right are out of phase by 180 degrees.  The left pairs are too.  And the legs on the right side are out of phase 90 degrees with the left side.  The result is that in one full rotation of the axles, each pair of legs has undergone a complete revolution, being at one point closest to the ground, and at another point highest off the ground.  Meanwhile, the robot has moved forward.
  
 
In the course of this project, I faced the problem of modeling K'nex by computer.  The instructor provided models for Lego pieces, but I had to find my own for the K'nex.  Luckily, a set of K'nex pieces modeled in LDraw had already been created by Ryan Farrington and made available [http://www.ncgraphicarts.com/ryan/construction.htm link here].  After finding these, I foundered for a bit trying to get the pieces out of LDraw format and into a more usable format.  I at last found a freeware converter named [http://www.geocities.com/Eureka/Gold/3269/dat2dxf.html link dat2dxf] and transferred the K'nex pieces into DXF (AutoCAD format).
 
In the course of this project, I faced the problem of modeling K'nex by computer.  The instructor provided models for Lego pieces, but I had to find my own for the K'nex.  Luckily, a set of K'nex pieces modeled in LDraw had already been created by Ryan Farrington and made available [http://www.ncgraphicarts.com/ryan/construction.htm link here].  After finding these, I foundered for a bit trying to get the pieces out of LDraw format and into a more usable format.  I at last found a freeware converter named [http://www.geocities.com/Eureka/Gold/3269/dat2dxf.html link dat2dxf] and transferred the K'nex pieces into DXF (AutoCAD format).
Line 21: Line 23:
 
From DXF format, I wanted to get the files into the DirectX mesh format, so that I could use the models in code I wrote last year.  The best solution I found is listed in Week 9 below; it uses a plugin with the Gmax 3D modeler.   
 
From DXF format, I wanted to get the files into the DirectX mesh format, so that I could use the models in code I wrote last year.  The best solution I found is listed in Week 9 below; it uses a plugin with the Gmax 3D modeler.   
  
 +
The robot is represented as 12 objects: 4 pairs of legs, 2 frame pieces, 3 axles, and 3 sets of gray connectors taken from the axles.  (Separating the gray pieces from the rest of the axle allows a bonus feature in the demo app.)  The motion of the robot is regular enough that the path of each component can be specified succinctly: each has a center of revolution, a radius of revolution, a phase value (e.g. opposite pairs of legs will be out of phase by 180 degrees), and a flag saying whether the object rotates as it moves (as an axle does) or whether it keeps its orientation (as the legs do).
 +
 +
The finished model is this application: <!--GICL Bot edit:-->[[TomsRobot3.zip Contents|TomsRobot3.zip]].  It responds to these controls:
 +
* ESC - exit
 +
* up/down arrow - move closer/back away
 +
* left/right/page up/page down - rotate
 +
* insert - go faster
 +
* delete - go slower
 +
* F1 - hide gray pieces
 +
The application requires DirectX to run.  A screenshot appears below.
 +
 +
[[Image:TomsRobot2.gif]]
 +
 +
If you hit F1 in the app, the gray pieces disappear.  This may make it run considerably faster (it did for me!), if your computer is old (as mine is!).  More importantly, this view offers the burgeoning builder a way to duplicate my robot.
 +
 +
The computer model does not include the motor; the motor can be positioned on any of the axles.  To me, the bottom axle looked like the best place.  The other axles may work too, but there is a chance that with the motor higher up, the robot will become too top-heavy.  That exercise is left to the reader.
  
 +
My next improvement to the robot will be to add four more pairs of legs, to have eight pairs all out of phase by 45 degrees (as opposed to the four pairs out of phase by 90 degrees that there are now).  As the robot walks, it makes unpleasant clanking sounds as the legs fall forward; the actual movement is not as smooth as in the demo.
  
(STILL WRITING...)
+
K'nex worked very well for this project. To move the robot, I used a simple battery-powered K'nex motor available from their web site for $12. I do not know how well K'nex would interface with e.g. the Handy Board; the main problem would be fitting the four-pin adapter onto the ends of the K'nex motors.  The motor takes 3 volts (2 AA batteries), so there shouldn't be a power problem.  I find K'nex easier to use than Legos, because I can build the skeleton with K'nex and not worry about "filling in" the structure, as one does with Legos.  I also note that my robot does not have any gears in it!  I despair of ever seeing a Lego robot without gears.
  
  
Line 67: Line 86:
 
==Week 6==
 
==Week 6==
  
I have managed to convert the K'nex LDraw files into DXF format: [[Media:knex_parts_dxf.zip]]
+
I have managed to convert the K'nex LDraw files into DXF format: <!--GICL Bot edit:-->[[knex_parts_dxf.zip Contents|knex_parts_dxf.zip]]
  
 
You can get the DAT-to-DXF converter at http://www.geocities.com/Eureka/Gold/3269/dat2dxf.html ; a direct link to the download is http://www.ldraw.org/index.php?name=Downloads&req=getit&lid=29
 
You can get the DAT-to-DXF converter at http://www.geocities.com/Eureka/Gold/3269/dat2dxf.html ; a direct link to the download is http://www.ldraw.org/index.php?name=Downloads&req=getit&lid=29
Line 76: Line 95:
 
I am still wrestling with the lighting; the .X files I have made so far look rather blurry.  I will keep experimenting with the materials options.
 
I am still wrestling with the lighting; the .X files I have made so far look rather blurry.  I will keep experimenting with the materials options.
  
Here are the .X files: [[Media:knexmeshes13Nov06.zip]]
+
Here are the .X files: <!--GICL Bot edit:-->[[knexmeshes13Nov06.zip Contents|knexmeshes13Nov06.zip]]
  
 
(To-do: insert lame Mulder and Scully joke)
 
(To-do: insert lame Mulder and Scully joke)
Line 82: Line 101:
 
==Week 11==
 
==Week 11==
  
I have started the animation of my robot in DirectX.  Right now it has just the legs and a dummy axle; I have yet to build the axles.  You can try it (this is EXE, not source): [[Media:TomsRobot1.zip]]
+
I have started the animation of my robot in DirectX.  Right now it has just the legs and a dummy axle; I have yet to build the axles.  You can try it (this is EXE, not source): <!--GICL Bot edit:-->[[TomsRobot1.zip Contents|TomsRobot1.zip]]
  
 
These are the controls for the program:
 
These are the controls for the program:
Line 95: Line 114:
 
==Week 12==
 
==Week 12==
  
Progress: [[Media:TomsRobot2.zip]]  (this one really slows down the machine, so don't run it if you're working on something important)
+
Progress: <!--GICL Bot edit:-->[[TomsRobot2.zip Contents|TomsRobot2.zip]]  (this one really slows down the machine, so don't run it if you're working on something important)
  
 
[[Image:TomsRobot2.gif]]
 
[[Image:TomsRobot2.gif]]

Latest revision as of 18:12, 17 March 2009


Current simulation: TomsRobot3.zip

Immediately below is my final report for the class.

I built my robots out of K'nex. The first robot had four legs in the style of the windshield-wiper mechanism presented in class. Unfortunately, it did not actually walk; it just moved around in place. Here is a picture.

Plick2.jpg

It would have been possible to get this one to walk by increasing the friction on the back legs (e.g. with rubber feet), but I opted to build a second robot, based on a simpler idea, one that I knew would work. This second robot would also make the computer model simpler; I explain why below.

This idea was to connect two axles in a manner similar to the bars connecting the wheels of a locomotive. However, instead of the typical locomotive motion, this bar would stay horizontal and ensure that the wheels stayed in phase with each other. Also, in place of the wheels, the robot would have a pair of legs. Constructed in this manner, the legs of the robot would travel in a vertical circle, but the feet would always point toward the ground.

This mechanism buckles, but the addition of a third axle makes it work. The locomotion of the robot results from an arrangement of four of these mechanisms, each at a different angle. As you can see below, the final product somewhat resembles a spider; it depends how powerful your imagination is.

Plick4.jpg

As the robot walks, each pair of legs rotates about a central axis, in the same direction and at the same speed. However, the two pairs on the right are out of phase by 180 degrees. The left pairs are too. And the legs on the right side are out of phase 90 degrees with the left side. The result is that in one full rotation of the axles, each pair of legs has undergone a complete revolution, being at one point closest to the ground, and at another point highest off the ground. Meanwhile, the robot has moved forward.

In the course of this project, I faced the problem of modeling K'nex by computer. The instructor provided models for Lego pieces, but I had to find my own for the K'nex. Luckily, a set of K'nex pieces modeled in LDraw had already been created by Ryan Farrington and made available link here. After finding these, I foundered for a bit trying to get the pieces out of LDraw format and into a more usable format. I at last found a freeware converter named link dat2dxf and transferred the K'nex pieces into DXF (AutoCAD format).

From DXF format, I wanted to get the files into the DirectX mesh format, so that I could use the models in code I wrote last year. The best solution I found is listed in Week 9 below; it uses a plugin with the Gmax 3D modeler.

The robot is represented as 12 objects: 4 pairs of legs, 2 frame pieces, 3 axles, and 3 sets of gray connectors taken from the axles. (Separating the gray pieces from the rest of the axle allows a bonus feature in the demo app.) The motion of the robot is regular enough that the path of each component can be specified succinctly: each has a center of revolution, a radius of revolution, a phase value (e.g. opposite pairs of legs will be out of phase by 180 degrees), and a flag saying whether the object rotates as it moves (as an axle does) or whether it keeps its orientation (as the legs do).

The finished model is this application: TomsRobot3.zip. It responds to these controls:

  • ESC - exit
  • up/down arrow - move closer/back away
  • left/right/page up/page down - rotate
  • insert - go faster
  • delete - go slower
  • F1 - hide gray pieces

The application requires DirectX to run. A screenshot appears below.

TomsRobot2.gif

If you hit F1 in the app, the gray pieces disappear. This may make it run considerably faster (it did for me!), if your computer is old (as mine is!). More importantly, this view offers the burgeoning builder a way to duplicate my robot.

The computer model does not include the motor; the motor can be positioned on any of the axles. To me, the bottom axle looked like the best place. The other axles may work too, but there is a chance that with the motor higher up, the robot will become too top-heavy. That exercise is left to the reader.

My next improvement to the robot will be to add four more pairs of legs, to have eight pairs all out of phase by 45 degrees (as opposed to the four pairs out of phase by 90 degrees that there are now). As the robot walks, it makes unpleasant clanking sounds as the legs fall forward; the actual movement is not as smooth as in the demo.

K'nex worked very well for this project. To move the robot, I used a simple battery-powered K'nex motor available from their web site for $12. I do not know how well K'nex would interface with e.g. the Handy Board; the main problem would be fitting the four-pin adapter onto the ends of the K'nex motors. The motor takes 3 volts (2 AA batteries), so there shouldn't be a power problem. I find K'nex easier to use than Legos, because I can build the skeleton with K'nex and not worry about "filling in" the structure, as one does with Legos. I also note that my robot does not have any gears in it! I despair of ever seeing a Lego robot without gears.


Contents

Intro

My project is a four-legged robot. Each leg is moved by a joint similar to the windshield-wiper mechanism that Dr. Regli presented in the first (?) week of class.

My robot is somewhat reminiscent of a daddy longlegs with only four legs. My original intent was for the robot to walk like a cat, having three legs on the ground at a time; but in its current configuration, that made it just shuffle back and forth. So, I put little rubber feet on the front legs, and they make the robot drag itself forward. I may change that....

Unlike everyone else in the class, I am using K'nex to build my robot. I have more experience with them and I own a bunch of them already, so this appealed to me more than using Legos. K'nex makes battery-powered motors that one can slip on a rod and have it turn like an axle; currently I am powering the robot with a hand crank. Fortunately, my design doesn't seem to need a lot of torque, so I am fairly confident that the electric motor will drive my beast just as well as my index finger has.

Here are some pictures of the robot:

Plick1.jpg Plick2.jpg

Week 2

- I made the legs shorter; the robot was liable to fall down, because I was using gray rods that are all bent from a model I made years ago.

- I found a set of K'nex models for LDraw (http://home.ifriendly.com/~fourfarrs/library.zip) and am going to see how to get them into a CAD program.

Week 3

I had another idea for a robot, and I built this one during the Eagles game on Sunday. (Note to self: it was the one against New Orleans)

I also received my K'nex motors in the mail and put them onto each robot. The second one walks MUCH better than the first. I also managed to build it without any gears, which really helped since I only own four gears, it seems.

Here are pictures of the second robot:

Plick3.jpg Plick4.jpg

More to come...

Week 4

...

Week 5

...

Week 6

I have managed to convert the K'nex LDraw files into DXF format: knex_parts_dxf.zip

You can get the DAT-to-DXF converter at http://www.geocities.com/Eureka/Gold/3269/dat2dxf.html ; a direct link to the download is http://www.ldraw.org/index.php?name=Downloads&req=getit&lid=29

Week 9 (?)

I found a program named gmax that will convert DXF files into DirectX meshes. It requires using a converter though; the instructions are at http://panda3d.org/wiki/index.php/Converting_from_GMax . I am still wrestling with the lighting; the .X files I have made so far look rather blurry. I will keep experimenting with the materials options.

Here are the .X files: knexmeshes13Nov06.zip

(To-do: insert lame Mulder and Scully joke)

Week 11

I have started the animation of my robot in DirectX. Right now it has just the legs and a dummy axle; I have yet to build the axles. You can try it (this is EXE, not source): TomsRobot1.zip

These are the controls for the program:

  • ESC - exit
  • up/down arrow - move closer/back away
  • left/right/page up/page down - rotate
  • insert - go faster
  • delete - go slower

Here is a screen capture: TomsRobot1 img.gif

Week 12

Progress: TomsRobot2.zip (this one really slows down the machine, so don't run it if you're working on something important)

TomsRobot2.gif