Robotics Lab 02
Sumo Lab
Brought to you by your Spring 2019
Robotics Practicum Class:
Rishabh Choudhary, Jacob Cook, Cameron
Higgins, Laura Stegner, Nick Trevethan
Quick Refresher
- Proximity Sensor
- Line Sensor
- Buttons
- Buzzer
- LEDs
- LCD
- Accelerometer/compass/gyro
- Encoders
Middle
Senosor
(Sensor 1)
Left
Sensor
Right Sensor (Sensor 0)
(Sensor 2)
Lab02 Description
Use Lab01 function plus additionally given functions provided to build and fight your
Zumo bot in the sumo ring.
● Each section will have a winner. That winner’s code will be uploaded to the champion
Zumo bot and will be passed to the next class as the bot to beat.
● Each team will have three deliverables:
1) Flow chart describing your Zumo bot’s behavior within the ring. This can be done on
paper.
2) Demonstrate your additional logic to a TA.
3) Fight an opponent! We want new sumo champions!
Lab02 Additional Features
Additional Feature Suggestions:
● Improve opponent seeking
● Slow down while seeking an opponent
● Rapidly increase speed when an opponent is found
● Change turning angles based on event
● Dodge opponents approaching from the side
● Improve line evasion
● Whatever you can come up with
Lab02 Flow Chart Short Lecture
What is a state?
- A state is a symbolic reference to a clipping of a piece of code or process that performs
some action. This process may be repeated until some form of stigma is observed,
performed once, or even performed indefinitely.
What is a flow chart?
- Diagram describing how external or internal input affects the behavior and interaction
between program states from the beginning of code execution to the end.
Lab02 Flow Chart Short Lecture
What is a state?
- A state is a symbolic reference to a piece of code or process that performs some action. This
process may be repeated until some form of stigma is observed, performed once, or even
performed indefinitely.
Example:
Button YES
wait() Pressed? move()
NO
Lab02 Flow Chart Short Lecture
What is a flow chart?
- Diagram describing how external or internal input affects the behavior and interaction
between program states.
Example:
Button YES
Power ON wait() Pressed? move() Power OFF
NO
Lab02 Naive Solution Flow Chart
Lab02 Notes:
● Keep in mind that you only have the time given in this lab period. You should:
1) Look at the naive solution that is provided. Upload it and see how it works.
*** We have purposefully made this code not so great, so analyze what the problems
are and track what you fix!
1) Add some additional logic that will make your Zumo Bot a champion.
a) Refer back to Additional Features slide for suggestions
2) Demonstrate your additional logic to the TA for your lab grade.
3) Attempt to beat the current champion.
TA Notes
● Faster is not always the best.
● When using sensor values to make a decision, always try and
avoid hard coded test values. Smarter is better and each robot
is different.
● Come up with a “state” solution (each action sets a variable to
track previous and current actions). If your robot can
remember what it did last time, you can combine that
knowledge with sensor values to make a very intelligent
decision.