Domino bot v2

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

Domino bot v2

Postby pEhrlich » Wed Jun 10, 2009 10:00 pm

I made my first domino robot when the nxt was all new to me, and it didn't work for a variety of reasons. (Probably the language I was using was not shiny and object oriented enough :wink: ) The curious can see it here.

Now I'm reimagining the project. It will be able to lay dominos, but the pusher has been redesigned, and there will be a whole lot more programming. Here's some pics first, (and a big fat description later on.):

First moderately successful run, making a 10cm straight line followed by a supposedly 90 degree turn with radius 15cm:
Image
Image

The mechanics: The top motor splits power between a pusher and a gate, using a differential. The cleverly designed gate (when I say clever, i mean it went through at least 100 different permutations to become just right,) which lets the dominos out when down but holds them back when up (this is the shock absorber, used for is 6.5M length), while nozzling them to land centered whatever the size of the domino. The a pusher is made out of that soft axle piece. This winds up around a drum to pull the pusher back, and unwinds to push the domino out. (The end moves back and forth in a track.)

Image
Image

There is a lot to program on this. It builds lines of dominos segment by segment - a line, an arc, a spiral, whatever. These are written and read from a text file, and put in to a Queue for use. The program starts by asking for a file, or allowing you to create one on the go with the buttons or a color bar code reader (the latter two yet to be implemented.)

I have classes set up with proper MVC architecture:
Domino: This is the Controller. It starts the robot, loads and save properties from a properties file, and controls setting up Queues of segments to place.

View: This makes things pretty. It has its own println/printerr functions, which are special because they save the last 8 lines in a Vector. It has functions for alert and confirm, just like on web pages. When showing these "dialogs", it hides any output and changes the button listeners to control the dialog. When the dialog is closed, it prints out the lines again.

PowerButton and ButtonMode: This makes button listeners more useful. You add one listener to it to a button, and then call methods in PowerButton to change which listener is applied. It has things like waitforpress of multiple buttons. More is yet to come, like the ability to have multiple button listener threads.

LineQueue: This loads a file and parses it in to commands. When start() is called, it tells the Robot to make segments, sequentially.

Robot: This is responsible for motors. It has methods like LayLine, LayArc, LaySpiral, whatever. It listens to the sound sensor to make sure a domino falls, and if not sends an alert message to the user for more dominos.



This is all for the robot pictured above. What I'm actually building is a crane arm vehicle, which has a truck chassis and an arm on the back that can place dominos with polar coordinates, using the robot pictured above as a tool head. (You can see a 20z gear on the top where the arm will connect. The drive motors will be removed and the ball moved to their spot for support, the nxt will be removed.)

Having a truck will make the robot much more powerful: it will be able to do splits and joins in the chain of dominos. This will require things like a TruckPilot class, something to move an arm and decide when to move the truck vs when to move the arm, as well as logic for making two lines at once and maybe a light sensor for help finding the end of a line. (Step 1: parallel lines. Step 2: each line does whatever it wants, and the program figures out how to join them automatically.) I'm not sure what features to add after that, but I'm open to suggestions like Bezier curves or calculation of how long a line would take to fall based on spacing, and making lines take the same amount of time to fall...

Image
As you can see, there's a lot do yet. I'm hoping to be able to do parallel lines in time for brickworld, but this could be tough. (Lets not think about the other NXT projects also vying for time. *cough*sumo*cough*) This is just a quick summary, I will go a lot more in to depth after the event....

What do you all think?

Cheers,
--Peter
User avatar
pEhrlich
Advanced Member
 
Posts: 158
Joined: Fri Jan 04, 2008 1:38 am

Postby roger » Mon Jun 22, 2009 6:21 pm

Hi Peter
One of the most impressive pieces of mechanical engineering for the NXT that I have seen.
On the software side, I would like to see your TruckPilot class. The developers have been talking about implementations of the Pilot interface that do not use differential steering. Yours may be the first.
You mentioned a View to make things look pretty. Do you mean pretty patterns of dominos, or will your code run on a PC and make a pretty GUI there?
Roger
roger
Moderator
 
Posts: 359
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA

Postby pEhrlich » Thu Jun 25, 2009 1:08 am

Turns out that I didn't get as far as the truckPilot in time for brickworld, time was consumed by Indy and Sumo software. However, it is not forgotten, and when I get some free time mid-July I will give it a shot. What I'll probably do is make a pilot that can drive in lines/arcs, with some kind of tunable reference point extending anywhere from beyond the rear wheels to beyond the front. If done right it could also handle rear steered axles, customizable gear ratios, and different steering configurations (1-2 motors.) If I can figure out anything worthy about gear wiplash, that could be part as well. Using this could be a navigator which could drive to points not-reachable by simple arcs, set heading, and the like. I'm not sure what it would take for such a navigator to be actually useful and not just retarded. But the idea for both Pilot and Navigator will be to start with some basics and grow from there :)

View is for giving the NXT display a lot more power. Right now its a singleton which has the ability to show alert and confirm dialogs, multiple-choice dialogs, a "choose file" TextMenu, and finally an "Adjust Property" menu and dialog pair, which, when combined with a PowerProperties class of mine, allows you to easily edit variables right on the brick.

This and lot a few other things christen the code repository once its made, but in the mean time, if anyone wants the code, feel free to PM me for it!

Cheers,
--Peter
User avatar
pEhrlich
Advanced Member
 
Posts: 158
Joined: Fri Jan 04, 2008 1:38 am

Postby pEhrlich » Fri Jul 17, 2009 7:33 pm

Hi Guys

I've made a shiny new video of my Domino Robot!

Enjoy:
http://www.youtube.com/watch?v=OOAn7MbHnxY :D
User avatar
pEhrlich
Advanced Member
 
Posts: 158
Joined: Fri Jan 04, 2008 1:38 am

Postby Shawn » Sat Jul 18, 2009 11:43 am

Unbelievable!

If you take it apart, please do so piece by piece (showing each piece ever so briefly to the camera) and then you can charge me something like $15 for the full length video.

Shawn
User avatar
Shawn
Advanced Member
 
Posts: 723
Joined: Wed Sep 12, 2007 4:59 am
Location: Tokyo


Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff