Knowledge Base

10 Tips to Help You Crack the ToppleBot Challenge

ToppleBot is the hardest game CoderZ League has to offer, as the final challenge of the Pro division.

Our team would like to share some tips we think could really help you approach this difficult challenge:

  1. The GPS sensor has 3 axes - X,Y and Z. While X and Z indicate your robot's position on the platform, the Y axis indicates the height in which the robot is located. One way to utilize the GPS would be to use the Y axis to determine the robot's current height and take corrective action to prevent it from falling off the platform.
    Screen_Shot_2020-11-29_at_11.43.51-01__1_.jpg

  2. A very important use of the GPS is determining the exact location of your robot on the platform. Be careful! Your robot can play for either the blue or the red team, so be sure to reset the GPS before you make any calculations with it.
    When playing for different teams, not only is the location of your team's robot different, but the robot is facing the opposite direction each time. For example: while going forward on the blue side shows positive values on the GPS X axis, on the red side, it would show negative values.

  3. Pressing the 1-4 numbered keys at the top of your keyboard (not numpad) will allow you to switch between camera angles in the Simulation Pane. It’s a great way to evaluate the robot's position and understand the robot’s behavior better.

  4. The robot has two different color sensors: one on the cannon and one on the robot’s body, facing forward. The forward facing sensor can be used to detect ammo packs. The cannon’s color sensor is placed on top of the cannon. Use this in conjunction with an ultrasonic sensor that is placed slightly to the side of the cannon. Note that adjustments might be required to make sure the cannon is locked on correctly.
    mceclip1.png

  5. The encoder is another amazing sensor that can indicate the distance the robot has traveled. Remember to reset it before measuring every trip!

  6. Stabilizing the robot is an essential part of the ToppleBot Challenge. We recommend exploring two possible approaches:
    • Using the Gyro sensor - Set speed (x+z, x-z) where x and z are the Gyro values for the respective axes. Give it a try, why not?
    • Using the GPS sensor - Try pursuing a positive Y value. Use it as an initial condition to understand whether the robot is stable or not.
  7. Shooting: Try using the Gyro’s Y axis value to compensate for the robot’s rotation in order to be able to shoot at the balls even when the robot is not facing them.

  8. For Python users: Add time.sleep(0.01) to any loop you’re using. Not doing so could cause issues with the browser (This happens because such loops would use all the resources of the browser).

  9. Consistency - Unity’s simulation engine  (The engine which the simulation runs on) simulates an actual real life environment. As such, it has variance between runs. Try running your code as many times as possible, on as many computers as possible to make sure the behavior of the robot is consistent enough no matter the conditions. Don’t take any chances! If your robot only performs well on 70% of runs, that 30% might be the one against your opponent. 

  10. And finally... Remember to have fun. Be competitive, but remember we’re all here to learn and enjoy coding.

Good luck!

Was this article helpful?
1 out of 1 found this helpful

Comments

Please sign in to leave a comment.