Difference between revisions of "DEWBOT X Programming"

From DEW Robotics
Jump to: navigation, search
(Update Section)
 
(38 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
All programmers please note: All updates on current and older projects are now on a google document. Talk to myself or one of the other co-head programmer (Nick, Laura, or Matt) at Wednesday's meeting if you do not have access to this google document so that we can add you to the google document.-Pat Drago, overall head programmer.
 +
==Ocelot Pictures==
 +
<gallery>
 +
File:Ocelot.JPG
 +
File:Ocelot false case.JPG
 +
File:A.JPG
 +
File:B.JPG
 +
File:C.JPG
 +
File:D.JPG
 +
File:WD1.JPG
 +
File:WD2.JPG
 +
File:WD3.JPG
 +
File:WD4.JPG
 +
File:FLS.JPG
 +
File:FRS.JPG
 +
File:BLS.JPG
 +
File:BRS.JPG
 +
</gallery>
 +
 +
==Off-Season Projects==
 +
 +
===Eliminate Autonomous Start-Up Delay===
 +
 +
Problem: Approximately a three second delay occurs at the start of autonomous mode.
 +
 +
Solution: _________________
 +
 +
===Two-Ball Autonomous===
 +
 +
Challenge: Score two balls in the high goal in autonomous.
 +
 +
Progress: Currently working but takes 13.4 seconds.
 +
 +
To do:
 +
* Decrease time so that second ball is scored by 10 seconds.
 +
* Do completely automated testing; need wall leading to low goal to help with second ball guidance.
 +
 +
===Hot Goal Autonomous===
 +
 +
Challenge: Score one ball in hot goal.
 +
 +
==="Build Your Robot" Game App===
 +
 +
Challenge: Create a PC-based game to let players choose how to build their robot and then compete with it.
 +
 +
===Gear-Shifting Pivot Drive===
 +
 +
Challenge: Design control software for a gear-shifting pivot drive system.
 +
 +
''Note: Mechanical and electrical design and construction must be completed first, but programmers can start coding once major design elements are decided on by the mechanical and electrical teams.''
 +
 +
==Update Section==
 +
February 23
 +
#Julie
 +
#* Kevin and DJ reviewed automated tasks with Siri and coded them (with string outputs) into a VI.  See the repository commit with the message:  ''Made a VI to automate all of the tasks for the shooting mechanism and ball pickup. Nobody reads these commit messages.''
 +
#* '''They must still translate those string outputs to motor and solenoid commands.''' Sully did some of the work, but Kevin and DJ are the leads and know how to translate the string outputs.
 +
#** Translation should not happen all in the same loop as the amount of code will probably cause watchdog errors. 
 +
#*** Put the "state machine" automated tasks VI in a loop of its own, possibly with one or two motor or solenoid command translations.
 +
#*** Write the string outputs to global variables so that they can be read in other loops running at different loop timings for the other motor and solenoid translations.
 +
#* Pat worked on autonomous 4-tachometer code.  He has a few fixes to upload to the repository or to otherwise merge in the main project.
 +
 +
February 9
 +
#Julie
 +
#*Scott has a suggestion for a smoother tach-based driving algorithm.  Instead of comparing the tach counts against each other, compare the tach counts against the expected number of tach counts expected in a certain timeframe for the current power/speed.
 +
#**[[File:ScottsTachApproach.jpg|300px]]
 +
 +
February 8
 +
#Pat
 +
#* Got robot's wheels to do a 360 degree turn followed by a 180 degree turn. Robot ran "straight" and could theoretically score, that is if it could shoot. Have to test more time to make sure that the autonomous code does these actions consistently!
 +
#* Replaced 360, 180 code with 90, 0 code at Molly's suggestion; Works just as well as previous code. Started to work on trials with 90, 0 code, got eleven trials done.
 +
'''NOTE:''' Tomorrow if I am not at robotics, someone has to work on this code, follow the directions on the board and use the Robot data spreadsheet I have provided; has trials already complete, as well as directions on what to do. You must work on the code if the robot goes off coarse too much (if any value goes over max. value from today's trials; make note, but don't add to trials, Twice this has happened to me).
 +
#Sully
 +
#* Worked on classmate, set up driver station on it. Also learned that you have to connect with an ethernet cable to the robot with it without massive lag
 +
 +
Febuary 22
 +
#Sully
 +
#*Updated pickup code, untested.
 +
 +
===Intake code===
 +
What drivers want:
 +
#Fully automatic
 +
#*Press button
 +
#*Intake engages
 +
#*Motor starts
 +
#*Press button
 +
#*Intake disengages
 +
#*Motor stops
 +
'''Important:''' NEEDS AN OVERRIDE BUTTON FOR DRIVER CONTROL, IN CASE DRIVERS NEED TO HAVE CONTROL
 +
#One button for motor control
 +
#One button for intake (solenoid) control
 +
 +
===Auton code===
 +
#Download code from repository
 +
#Work on last nine trials
 +
#*Use spreadsheet called Robot data-on Github
 +
#*Follow directions on spreadsheet (sheet one)
 +
##Ask Rizzo or Andrew for help!
 +
#If robot moves too far off course-turn it off for a few min.
 +
#*Continues to move off course too much work on code!
 +
 
==Current State of Products==
 
==Current State of Products==
  
''To be maintained by sub-team leaders once products and sub-teams are finalized.''
+
''To be maintained by sub-team leaders''
  
 
===Overall Robot Project===
 
===Overall Robot Project===
 +
Controls for Hatboro-Horsham (X and Y on operator controls are slightly different from what's currently coded):
 +
[[File:DEWBOTX_HH_controls.jpg|300px|text-top]]
 +
 
Preliminary driver/operator controls:
 
Preliminary driver/operator controls:
 
[[File:DEWBOTXcontrols.jpg|300px|text-top]]
 
[[File:DEWBOTXcontrols.jpg|300px|text-top]]
  
===Shooting Mechanism===
+
===Shooter===
 
'''Out of date!!''' State machine diagram for how it should work:
 
'''Out of date!!''' State machine diagram for how it should work:
 
[[File:ShooterStateMachine20140118.jpg|300px|text-top]]
 
[[File:ShooterStateMachine20140118.jpg|300px|text-top]]
 +
 +
===Ball Collection===
 +
 +
''TBD''
 +
 +
===Autonomous Mode===
 +
 +
''In progress (see Update Section above)''
 +
 +
===Driver Station Dashboard===
 +
 +
''Suggested dashboard layout; open for discussion''
 +
 +
[[File:DEWBOTX_dashboard_layout_idea.jpg|300px]]
 +
 +
===Drive Train===
 +
 +
''Integrated into overall robot project since no coding changes are expected''
  
 
==Programming Products and Sub-Team Members==
 
==Programming Products and Sub-Team Members==
Line 40: Line 161:
 
|Overall Robot Project  
 
|Overall Robot Project  
 
|Completely integrated competition code; kept current
 
|Completely integrated competition code; kept current
|Kevin
+
|Kevin, DJ
 
|}
 
|}
  
Line 50: Line 171:
 
# After doing the above steps, '''when LabVIEW 2013 is started, you should see "FRC 2014" on the LabVIEW splash screen.''' Re-check your installation if you do not see "FRC 2014" when you start LabView.
 
# After doing the above steps, '''when LabVIEW 2013 is started, you should see "FRC 2014" on the LabVIEW splash screen.''' Re-check your installation if you do not see "FRC 2014" when you start LabView.
 
# Also, be sure to check out the tutorials available on the [http://decibel.ni.com/content/docs/DOC-34661 2014 FRC LabVIEW Quick Start Guide page].
 
# Also, be sure to check out the tutorials available on the [http://decibel.ni.com/content/docs/DOC-34661 2014 FRC LabVIEW Quick Start Guide page].
# Also start to update status on what you completed during the day ten minutes before you leave. If you do not have an account on this website talk to Julie about getting an account!
+
'''NOTE:''' All programmers must start to update status on what you completed during the day at least ten minutes before you leave. If you do not have an account on this website talk to Julie about getting an account! By doing so, we will allow all programmers know what everyone else is doing (state of their project), as well as to make the integration project run more smoothly.
  
 
'''NOTE:''' ALL programming team members must have home access to a computer with the LabVIEW software installed, whether or not they bring that computer to build meetings or not.
 
'''NOTE:''' ALL programming team members must have home access to a computer with the LabVIEW software installed, whether or not they bring that computer to build meetings or not.
Line 63: Line 184:
  
 
[http://www.usfirst.org/roboticsprograms/frc/softwareresources FRC Software Resources page]
 
[http://www.usfirst.org/roboticsprograms/frc/softwareresources FRC Software Resources page]
 
==Update Section==
 
February 8
 
#Pat
 
##Got robot's wheels to do a 360 degree turn followed by a 180 degree turn. Robot ran "straight" and could theoretically score, that is if it could shoot. Have to test more time to make sure that the autonomous code does these actions consistently!
 
  
 
===Repository===
 
===Repository===

Latest revision as of 21:20, 30 September 2014

All programmers please note: All updates on current and older projects are now on a google document. Talk to myself or one of the other co-head programmer (Nick, Laura, or Matt) at Wednesday's meeting if you do not have access to this google document so that we can add you to the google document.-Pat Drago, overall head programmer.

Ocelot Pictures

Off-Season Projects

Eliminate Autonomous Start-Up Delay

Problem: Approximately a three second delay occurs at the start of autonomous mode.

Solution: _________________

Two-Ball Autonomous

Challenge: Score two balls in the high goal in autonomous.

Progress: Currently working but takes 13.4 seconds.

To do:

  • Decrease time so that second ball is scored by 10 seconds.
  • Do completely automated testing; need wall leading to low goal to help with second ball guidance.

Hot Goal Autonomous

Challenge: Score one ball in hot goal.

"Build Your Robot" Game App

Challenge: Create a PC-based game to let players choose how to build their robot and then compete with it.

Gear-Shifting Pivot Drive

Challenge: Design control software for a gear-shifting pivot drive system.

Note: Mechanical and electrical design and construction must be completed first, but programmers can start coding once major design elements are decided on by the mechanical and electrical teams.

Update Section

February 23

  1. Julie
    • Kevin and DJ reviewed automated tasks with Siri and coded them (with string outputs) into a VI. See the repository commit with the message: Made a VI to automate all of the tasks for the shooting mechanism and ball pickup. Nobody reads these commit messages.
    • They must still translate those string outputs to motor and solenoid commands. Sully did some of the work, but Kevin and DJ are the leads and know how to translate the string outputs.
      • Translation should not happen all in the same loop as the amount of code will probably cause watchdog errors.
        • Put the "state machine" automated tasks VI in a loop of its own, possibly with one or two motor or solenoid command translations.
        • Write the string outputs to global variables so that they can be read in other loops running at different loop timings for the other motor and solenoid translations.
    • Pat worked on autonomous 4-tachometer code. He has a few fixes to upload to the repository or to otherwise merge in the main project.

February 9

  1. Julie
    • Scott has a suggestion for a smoother tach-based driving algorithm. Instead of comparing the tach counts against each other, compare the tach counts against the expected number of tach counts expected in a certain timeframe for the current power/speed.
      • ScottsTachApproach.jpg

February 8

  1. Pat
    • Got robot's wheels to do a 360 degree turn followed by a 180 degree turn. Robot ran "straight" and could theoretically score, that is if it could shoot. Have to test more time to make sure that the autonomous code does these actions consistently!
    • Replaced 360, 180 code with 90, 0 code at Molly's suggestion; Works just as well as previous code. Started to work on trials with 90, 0 code, got eleven trials done.

NOTE: Tomorrow if I am not at robotics, someone has to work on this code, follow the directions on the board and use the Robot data spreadsheet I have provided; has trials already complete, as well as directions on what to do. You must work on the code if the robot goes off coarse too much (if any value goes over max. value from today's trials; make note, but don't add to trials, Twice this has happened to me).

  1. Sully
    • Worked on classmate, set up driver station on it. Also learned that you have to connect with an ethernet cable to the robot with it without massive lag

Febuary 22

  1. Sully
    • Updated pickup code, untested.

Intake code

What drivers want:

  1. Fully automatic
    • Press button
    • Intake engages
    • Motor starts
    • Press button
    • Intake disengages
    • Motor stops

Important: NEEDS AN OVERRIDE BUTTON FOR DRIVER CONTROL, IN CASE DRIVERS NEED TO HAVE CONTROL

  1. One button for motor control
  2. One button for intake (solenoid) control

Auton code

  1. Download code from repository
  2. Work on last nine trials
    • Use spreadsheet called Robot data-on Github
    • Follow directions on spreadsheet (sheet one)
    1. Ask Rizzo or Andrew for help!
  3. If robot moves too far off course-turn it off for a few min.
    • Continues to move off course too much work on code!

Current State of Products

To be maintained by sub-team leaders

Overall Robot Project

Controls for Hatboro-Horsham (X and Y on operator controls are slightly different from what's currently coded): DEWBOTX HH controls.jpg

Preliminary driver/operator controls: DEWBOTXcontrols.jpg

Shooter

Out of date!! State machine diagram for how it should work: ShooterStateMachine20140118.jpg

Ball Collection

TBD

Autonomous Mode

In progress (see Update Section above)

Driver Station Dashboard

Suggested dashboard layout; open for discussion

DEWBOTX dashboard layout idea.jpg

Drive Train

Integrated into overall robot project since no coding changes are expected

Programming Products and Sub-Team Members

Product Description Sub-team members
Shooter Controls for shooting mechanism Kevin, Brad, DJ
Ball Collection Controls for ball collection mechanism Pat, Rachael, Henry, Sarah
Autonomous Mode Scripting code; tach-based driving Pat, DJ, Sully
Driver Station Dashboard Custom layout and controls; communication with robot project Brad, Kevin T., Malia
Drive Train Driver controls for teleop; motor initialization DJ, Kevin
Overall Robot Project Completely integrated competition code; kept current Kevin, DJ

Programming Team Information

ALL MEMBERS OF THE PROGRAMMING TEAM:

  1. Install the NI Software for FRC 2014, either from the team's DVD or downloaded from the FRC 2014 NI Software Set Up Guide page. The serial number needed for activation will be emailed out to team members. Follow the directions for installing Option 1 (team programming in LabVIEW).
  2. Next, download and install the FRC 2014 Update Suite from the FRC 2014 NI Software Set Up Guide page.
  3. After doing the above steps, when LabVIEW 2013 is started, you should see "FRC 2014" on the LabVIEW splash screen. Re-check your installation if you do not see "FRC 2014" when you start LabView.
  4. Also, be sure to check out the tutorials available on the 2014 FRC LabVIEW Quick Start Guide page.

NOTE: All programmers must start to update status on what you completed during the day at least ten minutes before you leave. If you do not have an account on this website talk to Julie about getting an account! By doing so, we will allow all programmers know what everyone else is doing (state of their project), as well as to make the integration project run more smoothly.

NOTE: ALL programming team members must have home access to a computer with the LabVIEW software installed, whether or not they bring that computer to build meetings or not.

Programming Certification Pre-Test for 2014 Season (with answers)

Proposed / Recommended Programming Team Structure

Control System

Some information about Network Tables

FRC Software Resources page

Repository

2014 Robot Code Repository

Programming Language

FRC LabVIEW software has been used for the past four seasons (2010 - 2013).

C++ and Java are also supported by FRC and could be used if the programming team decides to do so.

Programmer Training Resources