Lego robot soccer nxt robot


We have changed the sensor's command block to detect when the direction number "Equals 5". Note that we have connected the two blocks by a yellow wire. This allows the direction number to go from the Seeker block through the yellow wire to the Mathematics block.

If you forget to do this, the program will refuse to work! To do this we need a loop. In the code above, the mathematics block is connected to the loop with a green wire.

This code will allow your robot to leave the loop and obey the next command following the loop. We haven't put that next command in yet, but will soon. There are lots of things we can tell our robot to do after it finds the ball. However, just so we can test that our code works, let us tell our robot to go forward one rotation each time the ball is seen.

The code above causes motors A and C to turn one rotation, causing the robot to go a short way forwards. The loop in the code above causes the whole code to keep repeating forever, or until we turn our robot off.

This complete program causes the Robot to keep finding the Soccer ball, and following it - which is what we wanted. Download this program to your robot, and test it to see that your robot does what you want it to do.

These two elements - the Robot Game and Project - make up what they call their yearly Challenge. RoboCup is an international research and education initiative which is more advanced than the FLL. It is an attempt to spawn AI and intelligent robotics research by providing a standard problem where a wide range of technologies can be integrated and examined, as well as being used for project-oriented education.

RoboCup currently uses a soccer game as its primary domain. In order for a robot team to actually play a soccer game, various technologies must be incorporated including: RoboCup is a task for a team of multiple fast-moving robots within a dynamic environment. In the past, all FLL competitions have involved the building and programming of one autonomous robot to achieve a mission.

To date, there have been no challenges that involve multi-agent teamwork co-ordination between robots to achieve a goal or complete a mission. Due to the Bluetooth capabilities of the Lego NXT, we began to think that this type of challenge could be an excellent addition to the FLL as a new challenge. However, due to competition time constraints and available hardware, it first appeared that a challenge of this type may be better suited for either an older age group of contestants or as a new RoboCup segment.

We found a wealth of information scattered across the internet that was extremely helpful in learning just what kind of capabilities we were dealing with. Once armed with this new understanding, we took a closer look at both the FFL and RoboCup competitions. Although at first, we thought that the RoboCup competition may be a better fit for our project, once we learned more about the NXT, we realized that the RoboCup competition was a little too advanced for anything that we could put together with the resources we had over an eight month period.

Therefore, we took a closer look at the First Lego League. Our initial reservations about trying to create the first challenge for the FLL that involved multi-agent teamwork co-ordination between robots to achieve a goal or complete a mission were centered on the age of FLL contestants, competition time restraints and available hardware.

Normally, teams comprised of up to ten children ages 9 to 14 with at least one adult coach, compete in the challenge and program one NXT. We had very lofty goals right from the outset of this project. Since we North Americans are more enamoured with the NFL style of American football as opposed to soccer, we decided that our challenge would be to create NFL style teams of NXT powered robots that would compete against each other.

Since developing Java based programs that use Bluetooth protocols is a little more than the average 9 to 14 year old is probably ready to handle, we needed to develop a core set of programs that could be easily adapted for the competition or our contestants would never meet the time constraints. In order to simplify things for the FLL, we created two remote PC interfaces that control each of the teams through the use of Bluetooth.

As a starting point, we added three plays for the Offensive team that can be run with the click of a button. Each NXT on the Offensive team has pre-programmed instructions to carry out depending on which play is being executed.

However, each remote interface can be expanded to include up to nine plays each. Our new challenge would ask the FFL contestants to program the actions of each robot for each play.

This way, teams could work together to decide which NXT needs to perform which actions for each play and work towards a common goal of either scoring a touchdown or stopping the other team from scoring.

Through the use of our interfaces, contestants would not need to program any complicated Bluetooth protocols and they would still get to enjoy the fun of controlling a robot by remote control. Create workspace in eclipse and import source code.