leJOS NXJ for Mindstorms NXT
I started using a new programming environment for the NXT called leJOS. This is a significant step up from the original software that comes with the NXT. I don't think that visual programming environments are yet powerful enough to do the things that I want while at the same time being concise and easy to read. I was looking at a benchmark which compares the relative speeds of the different systems available for NXT, and I couldn't help but notice that the NXT-G and LabView program diagrams were quite a bit more complex than the simple C version.
In any case, I plan to attend BrickWorld 2008, and am entering the "Trash Wars" robotics competition there with some friends. I think leJOS will work well for this project.
Today my Belkin F8T012 bluetooth interface arrived, and I tested out loading leJOS programs using bluetooth, and streaming data between the PC and the NXT. It took a little bit of setup, but it works nicely.
When we get pictures, I'll post them here.
Robot wheels and NXT
The wheels arrived Nov 30th, which was quite a delay from when I had expected them. Then they sat in the box for several days. November and December are such busy months. That's not something I'm fond of.
We did finally get around to putting the wheels on the bot, but haven't wrote the code needed to make it drive around. Hopefully next weekend that will happen, since I'm leaving tomorrow morning to travel for work, and won't be back until Friday.
Originally I had wanted to build this robot and take it to the December meeting of YAAARC on December 12th. Unfortunately, I'm going on travel for my work all week that week, so we won't be able to go. So some of the urgency for getting it done quickly is gone.
In the meantime, I got a LEGO Mindstorms NXT set for my birthday. Yes, a 38 year old man can get toys for his birthday. In fact, I prefer toys as gifts. I assembled the "quickstart" robot from the manual, and hopefully Alex will have a chance to program it while I'm away.
I installed the software on both of our Macs. Of course, it runs better on the MacBook Pro, since it's much faster, but the Mac MIni works ok too. I configured the bluetooth to connect to the Mini, and that worked quite well. I've never had much luck with bluetooth before, having tried it with mac-to-phone and mac-to-mouse, and it always seemed flaky. The NXT, however, connected easily, and has worked every time.
When I get back from my trip I want to write a program that uses the distance sensor to wander around. Perhaps I'll need to add a distance sensor to the homebrew bot too.
Robot project
Alex and I worked on the robot more this weekend, then again today.
On Saturday, we built the frame. The materials had arrived on Wednesday, but our busy schedules prevented us from doing anything with them until Saturday. The pictures from the Saturday session are here - robot_02 . Here's a sample:
Then, today, we wired both servos, and mounted the Arduino on the frame. The pictures are here - robot_02b .
I ordered wheels today from Robot Objects. The wheels I am getting (WHL-SBGMPW) fit right onto a Futaba servo, so we won't need to do anything special to use them. Those should arrive by Friday, and since I won't be at work that day due to the Thanksgiving holiday break, we should be able to mount them on the robot, and make it drive around that same day. Hopefully the holiday won't delay the delivery. I'll be tracking it just in case.
Once the wheels are on, we'll need to start doing some programming, and thinking about sensors.
FLL, Mindstorms NXT, and Robofest, Oh my
So we went to the FLL competition at Michigan State University today. It was as loud and chaotic as I remember the FIRST competitions being. It's strange, now, going to a robot competition and being a spectator. I think having been a competitor before leaves the spectator view lacking, as I've always been more fond of doing things than watching them done.
It was informative, and the kids who were competing were full of energy and excitement. I watched enough matches to see how things went, and to get a good idea of what the competition is like. Alex watched a bit, but then seemed bored. Or hungry. It was lunchtime, and I think she was more focused on wanting to eat than watching.
Afterwards, we had lunch, and then went to Bob's house. Bob was my boss in my previous job, and is into model railroading, LEGO, and Star Wars. So naturally we get along well. He's got a LEGO Mindstorms NXT, which we spent the afternoon messing with. Alex learned quite a bit about using it and programming it, and seemed much more interested.
We've played a bit in the past with Processing, which is a Java-based "simplified' programming environment. Alex picked up enough of that to get the basics, but didn't really stick with it too much. Processing supports using OpenGL for graphics, so she tried to read my OpenGL Programming Guide (The Red Book), but I think it was a bit over her head. I figured it would be, but I didn't want to discourage her, since she went and got the book on her own, and wanted to read it.
Mindstorms NXT uses a graphics programming environment based on LabView. I was really happy when she was plugging together pieces in the program and said, "Oh, it's like an IF thingy", referring to the if () {...} else {...} structure in Java. I guess some of the stuff we did in Processing stuck.
The last thing we talked about while we where there is a competition called RoboFest, which was created by Lawrence Technological University, a local technical university. One of my other co-workers at my previous job had suggested it to Bob, and we looked on the web site, and decided that the competition was more to our liking.
Hopefully we'll be entering in the upcoming season, although I suspect that it will be quite a push to be able to do so. In Robofest, the students do all the work on the robots, and the adults are there for coaching, teaching, and encouraging. That means that the kids will have to learn a lot of material in a short time, then apply it under pressure, which, depending on the personalities involved, may or may not work out well. If they're not ready to compete, and they don't want to, we'll need to remember not to push.
Anyhow, I also took the opportunity to show off the robot that we're building. There isn't much to see yet except a couple of modified servo motors, a printed drawing of the robot frame, and a few chips I ordered for future use, but it's something. Alex and I are pushing to have a working robot by the next YAAARC meeting, which is 2007-Dec-12. So we have a little over a month. My plan is to have a movable robot base next week, so we can start working on programming it, and adding sensors.
Well, this is long so I'm going to cut it off here. Next action on the robot is probably Tuesday, since that's when the base materials arrive.
First Lego League
Alex and I are going to a FIRST Lego League competition tomorrow. Not as competitors, just as spectators. She's been asking me to "coach" a team for her school for a while now, so I figured it would be good to go and see what's involved.
We're also meeting up with my ex-boss and his son, who are also interested. I expect that good things will come from this.
If it's anything like the regular FIRST competitions, then it's bound to be fun, chaotic, and a lot of work. We'll see how things go tomorrow.
In the meantime, I found out my materials order from ASAP was somehow lost. Their system normally sends an acknowledgment via email immediately, and I never got that, so I placed the order again today. This time I got the email, so the materials should ship out Monday, so I can have it Tuesday.
Unfortunately, that means we won't get anything done on the bot until then.