Let's Make Robots!

Live soccer robots on LMR

Recently Gareth suggested to me that it would be good to have 2 teams of my bi-ped robots playing soccer. This was too good an idea to ignore.

After talking about this idea backstage this is where we are at:

On behalf of DAGU I will donate 6 Mini-Biped robots (plus spare parts) and an Arduino compatible IR transmitter to control them. Frits has volunteered to host the robot soccer match. Players would control the robots from their homes via the internet and the video would be streamed on LMR so the players can see what their robot is doing.

What we need is someone who can write some simple software to be loaded on the player and host computers.
 
The software for the the players will take keyboard commands (e.g. Cursor keys and spacebar) and send this information via the Internet to the host PC.
The software for the host computer (preferably mac compatible) will receive the data from the 6 player computers and send it to the Arduino compatible transmitter as serial data.
 
The data only needs to be a simple code such as the number 1-6 indicating which player has pressed a key followed by a letter A-E indicating which key was pressed.
 
Example:
A = forward       
B = backward
C = left
D = right
E = stop / kick
 
Thus the data stream would be something like 0D1A2A3E4D5C etc.
These robots are small, slow and clumsy so while the game will not be fast and furious I hope it will be fun to watch as well as to play.

 

UPDATE:

Below is an explanation of how I will be programming the Arduino transmitter which will receive serial data from the host computer the same as it would using the serial monitor built into the Arduino enviroment. The Host computer will simply pass on the data it receives from the players computers.

Because the IR receiver needs to receive at least 14 pulses at 38KHz to recognise a 1, the Sony protocol uses 600uS as the width of a data bit and 1200uS as the width of the start bit. These times could be shortened but that could reduce reliability so for now I will stick with them. Beyond that I am ditching the Sony protocol which has 7 data bits and 5 device bits for a shorter, faster protocol.

I will write the Arduino code to send out 1 start bit, 3 player ID bits and 3 command bits. This will allow a maximum of 8 player and 8 commands. For now we will only have 6 players and 5 commands.

The Arduino will poll the player IDs thus the first 3 ID bits will count 0-5 repeatedly. The command sent out will be the last command received for that robot.

Each robot will be programmed with it's own ID so for example when the code 1A is sent out, all robots will receive the code but only robot 1 will respond and walk forward.

Because the slow IR transmission presents a bottle neck to the flow of data it would probably be best if the program running on the players computers limited the rate it sent command to 10 commands per seccond. This is fast enough to ensure a reasonable response time but will prevent the Arduino serial buffer from overflowing.

7 lovely red robot brains sitting on my desk. The main PCB is a simple little Arduino compatible board. The smaller PCB at the back is his "backpack" with speaker and IR comms hardware. An IR compound eye plugs into the front. I should have 7 little robots on their way to Frit's house next week. The seventh is a spare, just in case.

I've dubbed them the 7 dwarfs.
Here are some links to video of the prototype so you can get an idea what their soccer skill are like :P


RC chasing a ball: http://v.youku.com/v_show/id_XMTg0NDMxNTY4.html

Autonomous goal keeper: http://v.youku.com/v_show/id_XMTk5NDY1MTcy.html

Update: 20-09-2010

I have upgraded the Game Transmitter hardware and software to allow the pan/tilt assemblies to fire lasers (or other weapons) at the players. Lets be honest, no robot competition is complete without laser fire!

I have attached the code for both the game transmitter and the soccerbots. Currently the soccerbots will accept commands from both the game transmitter and a TV remote. The TV remote allows the host (Frits) to calibrate and test the players without a computer. The players ID can also be entered by TV remote so that if a player dies during a match Frits can quicky replace it with the spare robot just by changing the spare robots player ID to that of the dead robot.

Calibration settings and player ID are stored in the robots EEPROM so that the data isn't lost when the robot is turned off.

Update: 22-09-2010

As the famous saying goes, the devil is in the details! The seven dwarfs are not accepting commands from the game transmitter. As they work fine from the TV remote I have to assume the problem is with the transmitter. On the oscilloscope the transmitter seems to work fine with a nice modulated 38KHz signal.

Until I can sort this problem out the Dwarfs are staying in China :(

 


 

Update: 22-01-2011

Well they are finally in Frits's workshop. If nothing else Frits will learn a bit about Arduino. I did a lot of last minute stuff before I sent it all out and forgot the ball in the process. Now I need to get some instructions together for Frits.

I've taken some of Frits's photos and labelled them so every one knows what all the thingys are.

The Mini-Bipeds are normally sold pre-programmed for use by younger robot enthusiest. Therefore a programming cable was not produced. As Frits's will probably need to update the code a few times I quickly made up a cable. Experienced users can make a serial cable quite easily or use the ISP socket.

 

AttachmentSize
Soccerbot_transmitter_V2.zip2.35 KB
Soccerbot_V1.zip3.7 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Yeah, the game is for pussys, but that's why I suggested laser turrets, land mines, or giant mechanical claws.  Nothing like a good flame-thrower to make a match more manly.  We can make this thing into a "real" sport.

The camera is a brilliant idea.  I implemented them the same as a "Player" except instead of a player they get the camera.. Hoooboy... they could totally fuck with the players... for example ... going for the goal then suddenly, the camera is looking at Frits' ceiling.. bwah ha!

He who controls the Media ... controls the game !!!

Here is the screen shot of nuumio as camera man - and the controls pan/tilt

I'll hook this up @ my house to a pan/tilt servos here so we can work out all the kinks.

Hopefully Rik will help me with some of the uStream stuff.

This appears wicked, GroG! man did you come on track with this project, cool!

FYI; I have bought n extra webcam, (OK, I was going to, but never got that far today, but when you read this, I may) - so I plan that there will be one overview / top camera, and the other to provide some .. other angle :)

Frits, remember to stock AA cells. Six bipeds have twelve feet, holding two AA’s each. You’ll need 2 dozen cells.

These little robots use AAA cells and yes Frits will have to supply them because apparently customs won't let us send batteries.

What he said!

Watching episode 3 or 2 or 2.5 or watever the LMR show with Grog as a guest was called I noticed that Chris was underwhelmed by the term "soccer" and being an Australian I tend to agree, soccer is for pussy's who act as though they've been hurt when ever their hair get's messed up. Not to mention that the games sometimes end without any team scoring.

The reason soccer was chosen is because we have some neat little soccer balls in stock from another robot that were the perfect size for the Mini biped.

To make CTC happy I have come up with an American football robot!

I don't really understand why North America continent calls Football Soccer. And Rugby they call Football. In Football you play with your legs, in Rugby you run across the field with the oval ball in your hands (if they let you keep it) and once in a while kick the ball with the leg really hard, trying to send it through the poles. Anyway, I am not a fan of any of these sports. But I am a fan of robots! And robots playing Football are cool! I am not gonna say Soccer as I am not gonna call those RC destroying machines - robots. Heck, those biped robots will actually BE rc machines, yikes!

Still, they are cool ROBOTS! There, I've said it! I'll cheer happily! Go Robots!

It reminds me of two groups building 2 sets of tracks which will meet in the middle. Yay ! .. Hopefully we wont have the trains going full blast when we meet.

Here's the latest update...

 

Things that don't currently work

  • Logging in / Authentication will take some work - Authentication works - simple file on the host computer name & passwords
  • Exported scoreboard & Player roster need to be implemented - to associate the login name with the player
  • Details of the serial stream still need to be worked on
  • Blue Team Red Team
  • Strange concurrency bug I've seen pop up occasionly - keepin my eye on it
  • Host ping - update of latency times
  • Clean up when a player either drops the connection or leaves
  • Connectivity checks
  • Host gui's are not all updated  when events happen
  • Start testing with others here (no bots - but i can hook it up to a few servos, laundry machine, and some other junk)

 

This one has a syncing roster list of players. Hey OddBot were on the same team !!

Any suggestions / enhancements welcomed

This is the great thing about LMR, if there is something you know absolutly nothing about, garanteed that at least 2 other members will know something or can at least help you find out more information.

My heartfelt thanks to Grog and Nuumio for their good work so far. Thanks also to Rik for testing video lag with his Darwin bot.

Amittedly I have fallen behind schedule as Jack and I had to meet a customer in Shenzhen on Sunday and next weekend I will be meeting MarkusB in Nanjing. I still hope to send out the 7 dwarfs before I leave for Nanjing.

Aside from assembly and testing which is half done I still need to modify the original code so that each robot will only accept the commands meant for it.

 

GroG is on fire with this one. I'm just watching him posting updates left and right :-)

Anyway, I'll take another look at those video issues later today after I get back home because that lag I was getting already on localhost kept troubling me.