Community Question

A grade 3 student has been given a challenge for a competition and we are stuck on how to code this challenge. The challenge is to place the battle bot into a large black circular battle ring with a white line around the perimeter against another competitor. The first to get pushed out by the other loses. Here is what my students wants to do (if possible):
- hook up three cameras and train each that when it gets within 2cm (ish) of the white perimeter to retreat for 2 seconds and then turn about 45 degrees.
- recognise the other bot and charge to it. When contact is made, keep pushing.
- if it senses another bot pushing it to push back.
- is pushing towards white, do not stop pushing (so override the retreat when pushing).
- this all has to occur on its own. Student is only allowed to start program and then stand back so bot has to operate on its own.
- mainly its competitor are Lego Mindstorms, so we kinda want to beat them!

We know how to colour train and object train (but this doesn't always work, so hoping to find a colour on the other bot to lock onto instead, but need a backup plan). We know how to code forward and turns (where we left yesterday)

We are hoping that with three cameras, all three will be able to colour/object track, to make him more accurate...

And yes, this was a grade 3 student's idea!

Any help with how to program the code. The if/then blocks are not my speciality... yet... Competition is in 2 weeks. Will gladly share results and take video if we can figure this out :)

Amber (from Kelowna)
Commented November 2017
I appreciate (and agree) with your perspective... it's that digital citizenship (responsibility) piece!

There is a big Robotics "tournament" at the local college, hence they set the activities. I will use your suggestions to learn how to detect, but suggest to the student to use these skills to enter the soccer game challenge. This one, they try to score on the opponent's net... similar programming concepts.

I also have a student entering the dance/theatre challenge, where JD will be re-enacting a scene from a movie.

DJ Sures
Commented November 2017
Those are great objectives! They'll clearly take home the gold :D
Commented November 2017
I also don't condone bots for violence but in relation to the technical question of 3 cameras i assume you can always use more than 1 EZB in a project and UART or MQTT connect them so you can use more cameras just sending the results of the image color motion recognition to the primary EZB.
Commented November 2017
WOW, a no " battlebots" rule? but those are so cool watch. Seeing robots ripped to shreds and parts flying is so cool. Plus I'm a big fan of terminators :) just a matter of time and we will wipe ourselves out by the machine at the rate technology is going I think.
Commented November 2017
Sorry but if you have implemented a strict "no battle bot robot fighting" with ezrobot, then why is there a "battle bot" product available in your e-store?

I don't see much of a difference between pushing an opponent out of a ring versus flipping it.

Battle Flipper
Avatarby adhartwell
Published Thursday, November 23, 2017