RZero

Finally got a vid of the little guy up on YouTube!

He’s the dumbest thing ever, please don’t take this as a representation of my programming skills :)

The code was developed in Robot C as it was very C-like and had nice documentation and debugging capabilities. I am planning to write up a quick article on how to get started with NXT and Robot C at some time in the future. Another article will probably incorporate hooking up the NXT platform to Microsoft’s new Robotics Studio software.

Actually, I could probably write 100 articles on the various ways you can interface with the Lego NXT it’s that hackable.

The basic algorithm is as follows:

  • Drive forward while scanning with the ultrasonics
  • If the ultrasonics detect anything then drive back then choose a RANDOM direction to rotate in
  • Rotate for a bit then start driving again

Hehe, as you can see it is highly involved and allows the robot to build complex 3 dimensional probability grids of the rooms topology using only a call to rand(). :p

P.S. The music is ‘What’s Up Samba’ by ‘Flora Y Fauna’.

3 Comments

  • On 08.23.07 daveymilla said:

    I like your style.

    What about going sub random?

    And where are you putting the map?

  • On 08.23.07 kymhorsell said:

    Seems like a nice kit.

    I didn’t realise the motors were so heavy-duty. You could get it to climb stairs! :)

    I was playing around with a line-follower, and it’s doing something vaguely (hey, olnly vaguely I said) similar. Using somwhat erratic points between "I have located the edge of the black line" I’ve been trying to get it to build a model of the shape it’s following. I was kinda hoping to be able to determine the area inside the black line.

    Can your bot determine the volume of the room it’s in? Could be at least a way of narrowing down where in a building it’s located.

  • On 08.24.07 ash said:

    Hehe unfortunately he is too stupid for anything like room mapping and storage yet. :)

    The kit has bluetooth capability however so the next step is going to be storing sets of sonar readings and then transmitting them to the main computer for processing.

    The servos all have built in odometry so I will be able to at least get a rough idea of how far it has travelled but if there is any slippage then that may go out of the window. I also probably need a compass module which you can get from here.

    By taking the various sensor readings and then integrating them using a kalman filter (I still don’t get these fully but I know the can be used to estimate things from multiple noisy sensor readings with error) you can build up a occupation grid in which each element of the grid contains the probability of it being occupied.

    From there you could do a lot of stuff but as I said I am at stage 0 of 15 so I’ll let you know how I go. :)

    The main issue I am having is that the bluetooth module isn’t working with my computer at the moment so I can’t do any offboard processing.

    I’ll keep you all posted! :)