frc6367 / 2019-robot Goto Github PK
View Code? Open in Web Editor NEW2019 Robot Code
2019 Robot Code
1.)pick up phone
2.)turn on phone
3.)unlock phone
4.)watch a video on youtube
package org.usfirst.frc.team6367.robot.LightDrive
import org.usfirst.frc.team6367.robot.io.RobotOutput
import org.usfirst.frc.team6367.robot.io.SensorInput
import edu.wpi.first.wpilibj.Encoder
import edu.wpi.first.wpilibj.PIDController
import edu.wpi.first.wpilibj.PIDOutput
import io.github.robotpy.magicbot.MagicInject
class LightDrive:
#implements PIDOutput
# static final double kP = 0.03
# static final double kI = 0.00
# static final double kD = 0.00
# static final double kF = 0.00
# static final double kToleranceDegrees = 2.0f
# static final double kTargetAngleDegrees = 90.0f
# public PIDController turnController
# double rotateToAngleRate
# @MagicInject
# SensorInput sensors
# @MagicInject
# RobotOutput robotOut
// Constructor
LightDrive():
# /* this.turnController = new PIDController(kP, kI, kD, kF, sensors.ahrs, this )
# this.turnController.setInputRange(-180.0f, 180.0f)
# this.turnController.setOutputRange(-1.0, 1.0)
# this.turnController.setAbsoluteTolerance(kToleranceDegrees)
# this.turnController.setContinuous(true)
# this.turnController.disable()
void driveStraight():
# if(!turnController.isEnabled())
# turnController.setSetpoint(kTargetAngleDegrees)
# rotateToAngleRate = 0
# turnController.enable()
# robotOut.setDriveLeft(0.8*rotateToAngleRate)
# robotOut.setDriveRight(0.8*rotateToAngleRate)
public void stop()
# turnController.disable()
# robotOut.setDriveLeft(0)
# robotOut.setDriveRight(0)
public void rotateToAngle(double targetAngle)
# if(!turnController.isEnabled())
# turnController.setSetpoint(targetAngle)
# rotateToAngleRate = 0
# turnController.enable()
# robotOut.setDriveLeft(0.8*rotateToAngleRate)
# robotOut.setDriveRight(-0.8*rotateToAngleRate)
public void zeroYaw()
# this.rotateToAngle(0)
public void ninetyYaw()
# this.rotateToAngle(90)
public void oneEightyYaw()
# this.rotateToAngle(180)
public void twoSeventyYaw()
# this.rotateToAngle(270)
public boolean atAngle()
return turnController.onTarget()
@Override
public void pidWrite(double output)
rotateToAngleRate = output
Eat
Hw
Sleep
What motors does it have?
What sensors does it have
What kind of motion is the component responsible for?
Create a list of functions that the component will do
Unknown:
What motors are needed for the swerve-drive?
What are the sensors that are need for the swerve-drive?
What motion is the drive-train responsible for?
The elevator target position resets to 0 every time the execute function runs.
@JimmieB and/or @JonnyG511 to get us started can you:
robot/robot.py
... you can probably use the magicbot example at https://github.com/robotpy/examples as a template to useOnce you do that, I'll add some physics to reflect those settings. Thanks!
What motors does it have
What sensors does it have
What kind of motion is the component responsible for?
Create a list of functions that the component will do
For each low-level component, we need to answer these questions:
What motors does it have
What sensors does it have
What kind of motion is the component responsible for?
Create a list of functions that the component will do
What kinds of things are we grabbing?
How heavy are the objects we are grabbing?
What motors does it have
What sensors does it have
What kind of motion is the component responsible for?
Create a list of functions that the component will do
On the 2nd layer of the elevator, the arm will be attached to it.
As the elevator moves the arm will have to rotate up, and it will rotate downwards as the elevator descends.
Here's the documentation: https://phoenix-documentation.readthedocs.io/en/latest/ch16_ClosedLoop.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.