Tuesday, October 25, 2011

GPS Buggy

A couple of weeks ago I tried building a small vehicle that would drive to a given location. I wanted to use LVLM but there was a problem with the blocks need to support the dGPS sensor, so I switched to NXT-G instead. Since then, John from Dexter Industries has kindly sent me a fixed version of the blocks, so I'll get back to LVLM. Before this, however, I wanted to document what I did with NXT-G.

I started with a modified version of HiTechnic's IR RC Kart that I happened to have lying around, added the dGPS and a magnetic compass sensor, and ended up with this...

Here's the NXT-G program for my GPS Buggy (GPS Buggy v4.rbtx, 649kb).

The program is in "pack and go" form and includes a myblock that I use for displaying variables.

The following notes are in the program, but I'll include them here for completeness...
  • Set the target lat/long using decimal degrees:
    • ddmmmmmm (lat - 8 digits)
    • dddmmmmmm (long - 9 digits)
  • Positive for North, East
  • Negative for South, West
  • For example:
    • S42 47.778 E147 15.096
    • => -42.7963 ,  147.2516
    • => -42796300, 147251600
I found that that when entering coordinates into the program that NXT-G converted them into scientific notation and didn't display all the digits. I was a bit worried about this at first, but tested it out and was pleased to discover that the entered digits were indeed stored correctly. They're just rounded off in the configuration panel.

Testing out this robot in my driveway, I was a bit disappointed about the consistency of the target coordinates. Although the robot will steer towards a target quite nicely, there seems to be quite a bit of drift in the current coordinates, even if the robot's motors are disabled. I'm not sure why this would be happening, but it seems like it's more of a problem than I'm used to when establishing waypoint coordinates using a standard GPSr.... maybe.

The next thing I want to do is recreate this program in LVLM and then have two robots working together. One robot moves around randomly and sends its location to the the second robot that then steers towards the first robot. I'm am hoping that any drift will affect both robots in the same way, and will result in more consistent behaviour....

Tuesday, October 11, 2011

Stanford's Introduction to Artificial Intelligence

I just completed Unit 1 of Stanford's new online (and free!!) course, "Foundations of Artificial Intelligence". It's being delivered by gurus in the field, Sebastian Thrun and Peter Norvig, and so far consists of videos separated by short quizzes. Homework assignments and exams are to come...!

The course is based on content from their face-to-face class at Stanford, and provides an overview of a very interesting field of study that is, of course, very relevant to robotics education. Even after the just the first video I already feel like I've had lots of excellent professional development for my grade 5-12 robotics classes!

Wednesday, October 5, 2011

LEGO Mindstorms NXT 2.0 Software - Now free!!

I'm very pleased to see that LEGO have now made the retail version of their NXT-G v2.0 software available as a free download. Because this is the retail version, it won't have the Robot Educator tutorials or the graphical data-logging capabilities of the education version, but it's still great for situations where students who do have their own kits want to be able to do some programming at home.

I know that it costs a lot of money (and time!) to create a piece of software, but I've been very keen to see LEGO make the software freely available for quite some time - especially for schools. When it comes to robotics in the classroom, I find that each of the dominant programming languages for the NXT have their own strength and weaknesses. Considering the breadth of students I teach, I like to have a range of programming options available, but the cost of licenses needed to have a full range of software adds up quickly. For some students, NXT-G is perfect, but for others (e.g. those who have already completed pre-tertiary Computer Science) either RobotC or LVLM will be more appropriate. (I'll even be breaking out Robolab this week for a student who has decided that he wants to program a swarm of RCXs for his final project!!)

(Thanks to Damien Kee for passing on this news via the 'Robotics in Education' mailing list.)