Charge



Purpose

Learning: how to program autonomous navigation
Making Sumo: make robot detect and charge at opponents



Sandbox

Before we program our robot to chase things, let’s explore how robots navigate in the real world. Find short clips online of these robots moving in their environments:

  • Robot vacuum navigation
  • Boston Dynamics robot
  • Self-driving car

Write in your sprint notes…

what patterns you notice in how these robots navigate their environments.



Walkthrough

  1. Download the SumoBot-Front-IR-Nav program
  2. Open it in BlocklyProp Solo
  3. If your IR sensors don’t reach 8 when there’s no object:
    • Right-click the IR Front Navigator block
    • Select “Expand Block”
    • Change the 7s to one less than your max reading
  4. Load the program and test that your robot:
    • Still avoids ring borders
    • Turns toward objects it detects
    • Pushes detected objects

Take a video…

of your robot successfully detecting and charging at an object.



Exercises

Approaching

Place a paper cylinder 6 inches in front of your robot at these angles:

  • Directly in front
  • 45° to the left
  • 45° to the right

Write in your sprint notes…

Record if the robot successfully detected and charged each time.



Response Time

Proficient

Measure how long it takes your robot to:

  1. Notice an object that suddenly appears 6 inches away at an angle
  2. Begin turning toward it
  3. Make contact with it

Try to optimize these times.

Write in your sprint notes…

what’s something you did to improve the response time?



Distinguished

Design and test on of these different navigation strategies:

  1. Run away when opponent detected
  2. Spiral search pattern
  3. Random walk with occasional spins

Make sure you save your strategy in a place you can get it back!

Write in your sprint notes…

a name for your strategy