1 of 36

Virtual Robotics

Fun Hour

May 15th, 2020

2 of 36

Host - Ellen Sun

3 of 36

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 36

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 36

3D PPE Print Fundraiser

Your donation is appreciated.

https://tinyurl.com/FLYSETPPEGoFundMe

6 of 36

Winners of 5/8/2020 Rubriks Cube Competition

Please email your home address to technicbots.team@gmail.com for receiving in mail.

(Alex Z, Hank, Ethan, Andrew, Luke, Louwyn, Bryan, Alex W, William)

7 of 36

Online Resource

Ellen Sun

8 of 36

Raspberry Pi

  • cheap, credit-card sized computer
  • can be programmed in Scratch or Python
  • available at https://www.raspberrypi.org/products/

9 of 36

Raspberry Pi

  • https://projects.raspberrypi.org/en
    • Free sign up with email
  • Wide variety of projects you can do with and without a raspberry pi
  • Each project has step-by-step instructions on how to complete it

10 of 36

Software Project Example

11 of 36

Hardware Project Example

12 of 36

Builder Zone

Derek He

13 of 36

What is Swerve Drive

  • Special type of drivetrain
  • Each wheel powered and turned independently
  • Common in FRC

14 of 36

NASA’s Swerve Drive

15 of 36

Swerve Drive in FTC

16 of 36

Swerve Drive Pros

  • Maximum maneuverability at high speeds
  • Multidirectional movement smoothly
    • Sideways
    • Diagonal
  • Navigate game field better
  • Easier to line up for scoring
    • Keeping same orientation
  • Harder to defend against
  • Better pushing power vs other drivetrains (mecanum)

17 of 36

Swerve Drive Cons

  • Hard to build and code
  • Hard to fix if failure occurs
  • Heavy
  • Uses 4 motors and 4 servos or 8 motors
  • Potential issues when driving
  • Limits robot design
    • Wheels must be on the corners

18 of 36

CAD Topics - Simulation and Animation

Max Fan

19 of 36

REV Mini Bot

  • A kit that has instructions and materials on how to build in CAD and irl

20 of 36

Simulation in CAD

  • Why?
    • A quick way to show how a mechanism working before physically building it
  • What?
    • Mechanical mechanisms such as gear trains
  • How?
    • Using different joints you can manually control a CAD component object
      • Revolute makes the object rotate
      • Slider makes the object move back and forth linearly

21 of 36

Simulation Demo

22 of 36

Animation in CAD

  • Why?
    • Animation clips to demonstrate to others of the intended design functions
  • What?
    • Mechanical mechanisms of any 3D model (could be done without consideration of any mechanical constraints)
    • Navigation of any 3D model in a setting (e.g., FTC field)
  • How?
    • In Fusion 360, there is an animate workspace
    • You animate by moving the model to the location you want it to go to with specific time duration, and it saves the movement/location to playback

23 of 36

Animating Demo

24 of 36

RoboCode Virtual Battle

Byron Li / David Hu / Victor

25 of 36

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 36

Robocode: Radar setup

  • We didn’t get time to go over this in depth, so we will be going over radar techniques again today
  • First things first, we need to change our Robot into an Advanced robot. Do that by changing the line that says extends Robot to extends AdvancedRobot
  • In run() you should then try to add

setAdjustGunForRobotTurn(true); and

setAdjustRadarForGunTurn(true);

  • This allows your robot's base, gun, and radar to rotate independently. It is essential for radar targeting.
  • One of the first actions your robot should then do is turn the radar as much as possible. A very simple way to do this is just to add

setTurnRadarRight(Double.POSITIVE_INFINITY); //this will spin the radar until it scans a robot

27 of 36

Robocode: Radar turning calculations

  • Now that our robot is constantly spinning, we want to turn whenever it scans a robot
  • We can do this by editing our onScannedRobotEvent() code.

double radarTurn = getHeadingRadians() + e.getBearingRadians() - getRadarHeadingRadians();

This part basically returns what angle the scanned robot is to us

This part is the original angle of the radar. To find out how much we still need to move we just subtract it

setTurnRadarRightRadians(Utils.normalRelativeAngle(radarTurn) * 2); //the *2 increases the reliability because sometimes the robot will fail to turn and lose the lock

28 of 36

Improving your radar

The lock-on radar we just made is pretty neat, but it's nowhere near scratching the surface of radars. For one, we are doing 4-robots battles in our tournaments. Locking on to just one robot means we don’t have any info on the others! For ideas to improve your robot, check out

https://robowiki.net/wiki/Radar

29 of 36

Robot Challenge #4

Create a new radar that constantly spins around. Every time you scan a robot, track its energy and name. Try to store the energy values of all the robots you scanned and track the differences between the old and new values. This is crucial to learning how to dodge bullets.

For help, look into this article

https://robowiki.net/wiki/Melee_Radar

30 of 36

Sharing Robot Insights

  • We are all in this to learn about coding together, and even though it’s fun to get competitive in our tournaments, keep in mind our overall goal is still to teach everyone as much as we can.
  • With that in mind, the winner of each division’s tournament is expected to share some thoughts about their code and the thought that went into their robot.
  • If you are confident in your robot, make sure to think about what you are going to say if you win!
  • Good luck everyone.

31 of 36

Virtual Robot Tournament #3

Division 1 (Qualification Round)

Robot Name

Coder Name

Robot Score

CHRISTINAA

christina zhu

Acid

Andrew

MojoJojoTheDestroyer

Selena

Bobminion

Michelle Bao

32 of 36

Virtual Robot Tournament #3

Division 2 (Qualification Round)

Robot Name

Coder Name

Robot Score

Bot1

David Hu

Rammer

Nathan Ma

Kitt

Adrian Lin

DUMMY

33 of 36

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 Friday 12:00 PM
  • 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/

34 of 36

Past Session Slides, Recordings and Docs

35 of 36

Q & A

After 8:00, you are free to leave

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

36 of 36

Questions/Suggestions

technicbots.team@gmail.com