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.
- Finish the Python Codecademy course. Almost everything covered there is used in our Python code. You should finish the course before coding the robot.
- If you want to get better, try solving the beginners problems on CodeAbbey. This is not necessary to program the robot.
- 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.
- Download the latest PyFRC package
- Unzip the contents
- cd into the directory
- Run
python setup.py install
If the cRio has been used to run different code, follow these steps:
- Image the cRio with the C++ image
- Download the latest RobotPy
- Unzip the robot archive
- Run the
install.pyinside the unzipped folder while the cRio is connected to the computer.
THIS NEEDS TO BE FILLED OUT
10.29.28.1 - Router 10.29.28.2 - cRio 10.29.28.5/6 - Computer 10.29.28.11 - Axis
- 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
- 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
- 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
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'
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