1 of 34

Virtual Robotics

Fun Hour

May 1st, 2020

2 of 34

Host - Ellen Sun

3 of 34

Virtual Robotics Fun Hour

  • Every Friday at 7pm CDT, starting on 4/17/2020
  • Hosted by Technicbots 8565 team members
  • Four modules
    • Online Resource
    • Builder Zone
    • CAD topics
    • RoboCode Virtual Battle (welcome submission of your robot code)
  • Mute yourself when not talking, ask questions in the zoom meeting chat window
  • Expect a reminder email (with Zoom meeting info) one day before event
  • Expect an email after event with the link to this slides
  • Any questions and suggestions of topics? please email: technicbots.team@gmail.com

4 of 34

folding@home

We are contributing to folding@home to find cure for covid-19. You are welcome to join our team (Flyset: 256564) to contribute your idle computing power at home.

https://foldingathome.org/category/covid-19/

5 of 34

3D PPE Print Fundraiser

Your donation is appreciated.

https://tinyurl.com/FLYSETPPEGoFundMe

6 of 34

Online Resource

Ellen Sun

7 of 34

VEXcode VR: Program a Virtual Robot using Block-Based Coding

  • To get started: https://vr.vex.com/
    • No account needed
  • Many tutorials and activities available
  • Wide variety of playgrounds

8 of 34

Draw a House Activity Demo

  • Challenge: Program the VR Robot to draw a house on the Art Canvas using the Pen block.

9 of 34

FIRST Virtual Showcase

  • Showcases highlights of FIRST events and recognition of teams and volunteers around the world.
  • Announcements of FIRST awards and remarks from special guests
  • Watch live on Saturday, May 2, 2020, 9:00 A.M. CT at twitch.tv/firstinspires

10 of 34

Builder Zone

Champers Fu

11 of 34

8565 Robot Reveal

Five subsystems

  • Mecanum Wheel Chassis -- Austin
  • Wheeled Intake -- Champers
  • Vertical linear slide extension -- John
  • Horizontal linear slide extension -- Otto
  • Claw -- Derek

12 of 34

8565 Robot Subsystems

Mecanum Chassis

Wheeled Intake

13 of 34

8565 Robot Subsystems

Horizontal slides

Vertical Linear Slides

14 of 34

8565 Robot Subsystems

Claw

15 of 34

Match Video

16 of 34

Robot Design Process

  • Start with idea
  • Build in CAD
  • Build physical subsystems
  • Test and find issues
  • Repeat

17 of 34

CAD Topics - Fusion 360

John Dunbar

18 of 34

Fusion 360 Model Examples

19 of 34

Fusion 360 Install

20 of 34

Fusion 360 Resources

General / How to use Fusion 360

Robotics Specific / How to build a good robot CAD model

21 of 34

Basics of Fusion 360

Where to find tools (toolbar & shortcuts)

What parametric means (example sketch)

How the Timeline fits into this

Move tool and Capture Position

Bodies vs Components

22 of 34

Examples for Practice

  • Youtube guides
  • Pick any object in your house and CAD it
  • Cad a robot (Rev minibot, Search for parts here)
  • Has a part at your house broken?

23 of 34

My favorite tips

  • Keep a ruler with you and occasionally visualize parts at their actual size
  • Move: Point to point
  • Position the origin to minimize necessary extra planes & axes

24 of 34

RoboCode Virtual Battle

Byron Li / David Hu / Victor

25 of 34

Eclipse Check In & Developing Tips

  • We highly recommend you have Eclipse installed as it offers a much more streamlined coding experience. Instructions were sent out in the email and you can find them again here (same doc as install instructions last time)

https://robowiki.net/wiki/Robocode/Eclipse

  • Brief General Overview
  • Some quick general coding tips
    • Keep class name the same as your file name and make sure it is descriptive
    • Look through error messages to try and figure out problems in code. If you are stuck, try looking up the exact text of the error message online!
    • Make sure to have imported a library before you use it: more on that later

26 of 34

The Robot Console

  • To really work with events, we need to make sure they trigger when we want to. We can do this with the robot console
  • Navigate to RoboCode and start a new battle. Choose any robots you wish
  • When the battle starts click the robot’s button on the right side of the battle screen. This opens up the console screen.
  • The console screen right now should only have system messages. Let’s change that by writing in something with out.println

27 of 34

Events in Robocode

  • Events and your robot’s responses to them are what make your robot smart and responsive
  • Let’s examine an event handler in detail.
  • Go over event name, event object, and callback

public void onScannedRobot(ScannedRobotEvent e) {

fire(1);

}

  • Go to your OnScannedRobot event handler in your robot and add in the following line, then test it out!
  • out.println("I found a robot!”);

28 of 34

The Event Object

  • The event object that gets passed into Robocode has a lot of details, including the robot’s name and energy. Let’s use that info.
  • Try and test these following few lines
  • String concatenation.
  • out.println("I hit a robot! It’s name is:” + e.getName());
  • out.println("I hit a robot! It’s energy is at:” + e.getEnergy());

29 of 34

Finding New Events and Objects

  • Want to get a certain piece of info from the event object, but don’t know how? Consult the documentation!
  • https://robocode.sourceforge.io/docs/robocode/robocode/Event.html(Just search up robocode events)
  • How to find different kinds of events.
  • Click on the event link to find out what properties it has.
  • Add a new event to our robot, the win event! Test it out with out.println

30 of 34

Robot Challenge #2

  • Create two robots that stand still or do nothing. Name them friend and enemy
  • Create a copy of MyFirstRobot
  • Edit its OnScannedRobot event such that your new robot only fires when the scanned robot’s name is enemy
  • Run a battle with your three new robots. Your MyFirstRobot should only kill the enemy robot

Hints: Highlight if you need help!

  • (Part 1) Use the sittingDuck sample robot for a robot that stands still!
  • (Part 2) To get the scanned robot’s name, try using the event.name, with event beign the name of your OnScannedRobot event

31 of 34

Virtual Robot Tournament #1

Thank you for all of your robot submissions!

We will be holding a 4-way free for all battle tournament, hosted on Byron’s computer with shared screens.

Tournament bracket

https://docs.google.com/document/d/10f65k-K3bqmjlsHHy3_EVFMq_fW0B696NuJ6qRxUxXM/edit

Winners will be decided with Robocode’s scoring system, which is based off damage dealt, received, and whether or not your robot survived.

The winner of the tournament is expected to talk about their robot design process

32 of 34

Submit Your RoboCode for Virtual Battle

  • Submission form: https://tinyurl.com/robocodeform
  • Results Doc: https://tinyurl.com/robocoderesults
  • Submission opens at Wednesday noon and closes at Thursday midnight
  • Name your robot with unique and short name
  • The battle schedule will be posted to the chat window of zoom meeting
  • Battles will be held in two divisions:
    • Novice: for people new to Java
    • Advanced: for already experienced coders
  • Division winners can share some thoughts about their coding process
  • Recommended prep: These links are very useful http://mark.random-article.com/weber/java/robocode/

https://www.ibm.com/developerworks/java/library/j-robotips/

33 of 34

Q & A

After 8:00, you are free to leave

Feel free to ask questions in chat or with your mic!

34 of 34

Questions/Suggestions

technicbots.team@gmail.com