Skip to content

VikingRobotics/2014_Base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

168 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

We use python (Yay!)

Python is not officially supported by FRC, so we use RobotPy. RobotPy runs a python interpreter on the cRio and provides python bindings to most of the wpilib.

Learn Python

Learn how to program an FRC Robot with Python

  • You should have a thorough understanding of the WPILib Documentation . This will give you an understanding of what's possible with the Robot. There are also step-by-step guides for coding some things, such as mecanum drive.
  • There is example Python code in the RobotPy code base.
  • RobotPy wraps the C++ implementation of WPILib, therefore we have to use the C++ documentation. For detailed C++ documentation, see Virtual Roadside.

Install PyFRC on Your Computer

  • Download the latest PyFRC package
  • Unzip the contents
  • cd into the directory
  • Run python setup.py install

Setting up a cRio for this codebase

If the cRio has been used to run different code, follow these steps:

change/build/test workflow

THIS NEEDS TO BE FILLED OUT

IP Addresses

10.29.28.1 - Router 10.29.28.2 - cRio 10.29.28.5/6 - Computer 10.29.28.11 - Axis

Planning

Shooting strategies

  • Jam robot against corner goal, shoot low goal
  • Jam robot against corner goal, shoot high goal
    • If not possible to make high goal (need to test), back up by specific amount before shooting
  • Square against wall, shoot from variable distance (use sonars to square and detect speed needed)
  • Square up with zone line, fire at fixed speed to high goal (can use line sensors square)
  • Square up on goal line, fire at fixed speed at high goal (can use line sensors to square)
  • Shoot whenever you want at whatever speed you want

Autonomous Mode Plan

  • With humans, square up robot to wall at consistent distance from wall
  • Wait until Axis camera detects goal is hot
  • Shoot ball
  • Drive forward with dead reckoning into zone area

Autonomous Plans

  • One ball mode: Drive forward, extend pickup, shoot when goal is hot
  • Two ball mode: Extend pickup, start rollers, drive forward while dragging ball, shoot first ball, shoot second ball

Get em working without PIDControl, then add PID

LiveWindow error

File "/c/py/robot.py", line 19, in init self.lw.AddActuator('subsystem', 'name', self.motor) TypeError: LiveWindow.AddActuator(): arguments did not match any overloaded call: overload 1: argument 3 has unexpected type 'Talon' overload 2: argument 2 has unexpected type 'str'

TODO

today:

  • Make Kinect work
  • Figure out PID. Why is it going backwards?
  • Make pickup motor spin while extending during one ball autonomous
  • Add catch preset

later:

  • Remove photoswitch code - unused!
  • Fix LiveWindow on RobotPy. This will help with tuning

About

The base code used for the 2014 FRC season.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages