StarStruck in a Virtual World: Fantasticbot Version

Slides:



Advertisements
Similar presentations
Jason Howard. Agenda I. How to download robotc II. What is tele-op used for? III. How to build a basic tele-op program IV. Getting the robot to drive.
Advertisements

Downloading, Installing, and Working with Dropbox.
Automation and Robotics
Developed in collaboration with Introduction to Programming.
Vex Robotics Introduction to Sensors. introduction to sensors Sensors assist robots in seeing and feeling the physical world through which they travel.
V EX C OACHES ' T RAINING October 12, Agenda for Today 9 – 10 AM : Tina Reeves and the Engineering Notebook 10 – Noon : Finish Building, Basic Robot.
Autonomy using Encoders Intro to Robotics. Goal Our new task is to navigate a labyrinth. But this time we will NOT use motor commands in conjunction with.
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Programming in easyC.
VMWare Workstation Installation. Starting Vmware Workstation Go to the start menu and start the VMware Workstation program. *Note: The following instructions.
VMWare Workstation Installation. Starting Vmware Workstation Go to the start menu and start the VMware Workstation program. *Note: The following instructions.
Coding for the FIRST Tech Challenge: RobotC Presented by: Audrey Yeoh Acknowledgements: Team Unlimited FTC 0001.
Coding for the FIRST Tech Challenge: RobotC
Vex Robotics Programming Sequence. Now that you’ve had some practice downloading and using the included programs, it's time to learn to write some of.
Programming Design ROBOTC Software Principles of Engineering
Robot C and Natural Language
Autonomy using Encoders Intro to Robotics. Autonomy/Encoders Forward for Distance In this unit, you will learn to use the encoders to control the distance.
Vex Robotics Program six: combining autonomous and radio control.
AUTOMATION WITH ROBOTC Starting to write and troubleshoot computer code.
VMWare Workstation Installation. Starting Vmware Workstation Go to the start menu and start the VMware Workstation program. *Note: The following instructions.
Getting Started in RobotC // Comment task main() motor[] {} wait1Msec() ; = Header Code Compile Download Run Take out your notes.
Vex Robotics Program four: reversing and turning.
VMWare Workstation Installation. Starting Vmware Workstation Go to the start menu and start the VMware Workstation program. *Note: The following instructions.
RobotC Remote Control. Learning Objectives: Focusing on Virtual World with Physical Examples Understand Real-Time Joystick Mapping Understand how to use.
Programming - Motion Intro to Robotics. Motors and Sensors Setup The first thing we need to do is tell ROBOTC that we have motors on our robot. Choose.
Programming your Robot
Vex Robotics Program Two: Using two motors. Program two: using the motors In the last section, you learned how to turn on one motor. Now, you will take.
Vex Robotics program three: using motors and sensors together.
ROBOTC for VEX Robotics (VEX IQ) On-Line Session 2014 My name is Jason McKenna I will be leading you through these sessions Teacher for 17 years Hopewell.
Testbed Coding In this activity you will code different challenges for the Testbed. For each challenge a sample program is shown. Use what this sample.
Robot C and Natural Language. Create a folder Create a folder on your desktop to insert all your Robot C files, Here you will begin with your template.
Bot Shop Jane Taylor Dee Wallace Robot C For Vex.
Testbed Coding In this activity you will code different challenges for the Testbed. For each challenge a sample program is shown. Use what this sample.
Programming Design ROBOTC Software. Behavior-Based Programming A behavior is anything your robot does –Turning on a single motor or servo Three main types.
With. Project Overview  Introduction to Factory Automation Numerical Control  Build an autonomous robotic solution  Testing an autonomous robot build.
After Construction Name: Per #:.
Programming Design ROBOTC Software Principles Of Engineering
Basic Steps in Programming
Introduction to Programming in RobotC
Automation with RobotC
Development Environment
ClawBot Beginning Programing.
VEX Cortex Video Trainer using ROBOTC
Introduction to Programming
ROBOTC for VEX On-Site Professional Development
Robotics Programming Using Shaft Encoders
Using a set-up file to read ASCII data into SPSS
StartStruck in a Virtual World
Automation and Robotics
Programming Design ROBOTC Software Computer Integrated Manufacturing
Movement using Shaft Encoders
RobotC Sensors.
Getting Started in RobotC
By Willem Scholten Learning Access Institute
Using variables, for..loop and functions to help organize your code
Automation and Robotics
Basketball Drill Programming Alternatives
Getting Started in RobotC
Programming Design ROBOTC Software Principles Of Engineering
Automation with RobotC
Robotics Programming Using Shaft Encoders
Robotics Programming Using Shaft Encoders
Remote Control For this activity we will use the Squarebot
Automation with RobotC
Robotics Programming Using Shaft Encoders
Running a Java Program using Blue Jay.
Programming Design ROBOTC Software Principles of Engineering
Getting started with LEGO EV3 Mindstorms software
Is there an alternative to copy-paste for repeating code?
Introduction to Programing the Cortex for BEST
Presentation transcript:

StarStruck in a Virtual World: Fantasticbot Version

Your Robot

Learning Objectives Students will be able to configure the Motors and Sensors for the VEX Kickstarter robot in the RobotC Virtual World. Students will be able to develop an autonomous program for the Programming Skills Challenge Students will be able to incorporate motor[] and wait1Msec() commands. Students will be able to incorporate sensors into their autonomous programs

Getting Started in RobotC Open RobotC Select VEX 2.0 Cortex Platform Robot-> Platform ->VEX 2.0 Cortex Make the robot compile to Virtual Worlds Robot-> Compiler Target -> Virtual Worlds Select Virtual World Window->Select Virtual World to Use -> VEX Starstruck

Configuring the Robot: Just the motors for now. Robot-> Motors and Sensors Setup

Configuring the Robot: Just the motors for now. Set the Encoder Port 1: frontRightMotor 2: rearRightMotor 3: frontLeftMotor 4: rearLeftMotor 5: 6: clawMotor 7: armMotor 8: leftExtendMotor 9: rightExtendMotor 10: wristMotor Note the ‘right’ drive motors are reversed. Click ‘Apply’ and ‘OK’ when finished.

Mapping the Motors

Two Commands that can help you conquer the World! motor[elMotor] = 127; The motor[] command is used to send power to one of the motors [elMotor] The name of the motor as set in the motors in sensors setup (Like rearLeftMotor) port1 Will send the power to port 1. You can use this for any of the 10 motor ports. Although this works it is not good style. 127 An value -127 to 127 Can just put in a number of use integer variables or fancy math to generate a number 127 = Full Power Ahead -127 = Full Power Backwards 0 = Stop!!! wait10Msec(100); 100 This will continue what the robot is doing for 100 of the 10/1000 ths of a second (1 second total in this example) Can just put in a number of use fancy math to generate a number

Motors and their values 1: frontRightMotor 2: rearRightMotor 3: frontLeftMotor 4: rearLeftMotor 5: 6: clawMotor – Positive = pinch, negative = release 7: armMotor – Positive = go up, negative = go down 8: leftExtendMotor – Positive = go out, Negative = go in 9: rightExtendMotor - Positive = go out, Negative = go in 10: wristMotor – Positive – go up, Negative = Go down

Getting Started: Open the RobotC Sample Program File -> Open Sample Program

Open the ‘VEX StarStruck’ Folder

Open the ‘Fantasticbot Programming Skills’ program

Don’t Worry about the errors. Click ‘OK’ and we will delete the code

Highlight and Delete everything after task main()

Ready to start!!! Enter your code here!

Example What do you think this will do? How can you test it? 6: clawMotor – Positive = pinch, negative = release 7: armMotor – Positive = go up, negative = go down 8: leftExtendMotor – Positive = go out, Negative = go in 9: rightExtendMotor - Positive = go out, Negative = go in 10: wristMotor – Positive – go up, Negative = Go down

Compiling the Program

Oops! The compiler catches syntax (typing) errors and gives some hints on how to fix them.

Any guesses on how to fix these mistakes? Errors Red X = error Yellow X = Warning Errors and hints on the bottom of the page. If you click on an error it will highlight the line of the error. Any guesses on how to fix these mistakes?

Corrected and Compiled

Download the program Since we set it up to map to Virtual Worlds it will download to a Virtual Robot.

Set up and Account with CS2N. It will track progress Set up and Account with CS2N. It will track progress. Can log in locally as a guest without tracking.

Make sure VEX FANTASTICBOT is chosen. Click START to test the code.

Play: Run the program 4) Fixed Driver’s point of View Show Sensors Toggle Play: Run the program 3) Free Movement: Scroll: Zoom Click-Drag: Rotate View Home Follows Right Scroll: Zoom 2) Top Down View Reset

Click-Drag: Rotate View Select Camera and Go Follows Right Scroll: Zoom 2) Top Down View Play: Run the program 3) Free Movement: Scroll: Zoom Click-Drag: Rotate View Reset Home Show Sensors Toggle

Example What do you think this will do? How can you test it? 6: clawMotor – Positive = pinch, negative = release 7: armMotor – Positive = go up, negative = go down 8: leftExtendMotor – Positive = go out, Negative = go in 9: rightExtendMotor - Positive = go out, Negative = go in 10: wristMotor – Positive – go up, Negative = Go down

Your FantasticBot Challenge: Get the highest score possible. Programming (20 Points = 100%) ____ Motors are setup correctly by you (2 points) ___ Program compiles (2 points) ___ Header complete with names, description (include the robot and commands available and the date (2 points) ___ Code is properly indented (1 points) ___ Comments in the program describing the code (3 points) Performance (10 points) ____ Robot Moves (2 point) ____ Robot Scores at least 2 points (2 points) ____ The Slider movers (2 points) ____ The Kicker Arm moves (2 points) ____ The Kicker Moves (2 points) ____ Top scoring robot in class ( 2 Point Bonus) ____ Second scoring robot in class (1 point Bonus)