Showing posts with label robots. Show all posts
Showing posts with label robots. Show all posts

Thursday, 17 November 2011

NXT Robots

So you know how I did a project on swarm robotics and I said I would have some video of it all working, well I forgot and deleted the codes. Rageragerage. The only thing I can find is a screen shot of some early development in my collision avoidance, shown below. The robots are the small boxes and the blue is the line of sight. Trails are on to show the movement path. The yellow one (only one moving) was going to hit the blue one so swerved violently to the right, where he saw he was about to hit the brown so swerved left, then corrected once seeing he had passed the blue robot.



Any who, I now have a summer research project working with Lego. That's right. My summer job is playing with Lego. Jelly? I thought so.



The Lego MindStorm NXT is a robot is a small computer that can support 4 input devices and 3 output devices. Included in our pack are 3 motors (outputs) and 2 touch sensors, 1 ultrasound sensor, and 1 colour sensor. The NXT also supports Bluetooth so I am considering making a controller using my Android. Woot! Here are some existing projects.

 Find and grab a ball
 Solve a Rubik's cube. Epic.
 Fire balls at target.
 Solve a Sudoku
Follow a path.

I am part of a group of 4 people looking at doing some project with these robots. We are looking to have 3 of them and have them interact in some way. The exact specifications of the project are really vague. But we are looking at a warehouse simulation with automated forklifts. Still undecided but this is sounding most likely. This is something that has been done before but not completely autonomous with multiple robots.

We are to program it in Java using LeJOS (Lego Java OS), which is fantastic because I love Java. But terrible because no one on my team has used it before. We will see how this goes.

Epic post about a great Android app coming out soon.

That's all for now.

Cheers,
Milk

Friday, 30 September 2011

Swarm Robots: Basics

I've started a project for University where we need to program the code for 7 swarm robots. Here's a short video with swarm robots. If you don't really get why this is so awesome, please read on.


The robots need to:
  • select a leader
  • form a group
  • move in a V shape formation like birds migrating
  • while avoiding obsticles
  • and swapping leader to whoever has the highest battery life

The catch is that every robot needs to be programmed with the exact same code. This is known as emergent behaviour. It's pretty damn sweet.

This is my way to think about it. Every single bird is the same. Yet because they have some minor different traits (one might be larger than another), their interactions with each other are different, and so the behaviour of the group may be different to the behaviour if there was only one bird. This is the thought behind emergent behaviour. It is the behaviour that emerges as a group is formed.



[nerd speak]
Now think about the above behaviour in terms of people. If we could model humans and their environment correctly, we could theoritecially simulate the entirety of the human existance. That's a long long way off, but no way near impossible. There is just too many variables to take into account. One of which would be the program itself, and according to Alan Turing with the Halting Problem, the recursive nature of this problem will make the solution undecidable.
[/nerd speak]
Yes that was the nerd speak and not the rest of the post...



Like birds, the robots cannot directly access each others information, they must talk (pass messages). For the robots, the messages can be in the form of a message (one tells the ones listening something) or a service (one asks another for something and it replies accordingly). These are the only ways the robots can interact. Oh but they can ram each other. More on collision detection and avoidance in a later update.



The robots are coded in Python with assistance from ROS (Robot Operating System), that helps with the simulations and the backend on communication between the robots. I'll paste some code at some point to give an overview of what is going on, but I'll be sure to add pictures for those that don't code.

I better end it here, but I have so much more to say so stay tuned for more on swarm robotics.

Cheers,
Milk