Git Product home page Git Product logo

2019-robot's People

Contributors

jimmieb avatar jonnyg511 avatar mliang1987 avatar virtuald avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

2019-robot's Issues

Jonny's Task

1.)pick up phone
2.)turn on phone
3.)unlock phone
4.)watch a video on youtube

I need help with translating the code

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

Camera usage

  • Will we use a Limelight or something for tracking objects
  • What objects can we track?
  • What about driver view

Drivetrain Tasks

What motors does it have?

  • Cims
  • Pneumatics

What sensors does it have

  • Cimcoder v2

What kind of motion is the component responsible for?

  • Speed and rotation

Create a list of functions that the component will do

  • Drive
  • Gear up and down -Shifter-

Unknown:

  • Can we gear up when the robot is moving?

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?

Create initial robot code

@JimmieB and/or @JonnyG511 to get us started can you:

  • Identify which motors we're using for mechanisms this year, and what IDs they are
    • This doesn't need to be a complete list
  • Fill out the initial robot.py in robot/robot.py... you can probably use the magicbot example at https://github.com/robotpy/examples as a template to use
  • Make sure the initial code starts in the simulator and shows the motors that you created

Once you do that, I'll add some physics to reflect those settings. Thanks!

Hatch Intake Tasks

What motors does it have

  • Bosch Seat Motor

What sensors does it have

  • Built-in hall effect encoder

What kind of motion is the component responsible for?

  • It would go up and down at a certain angle either 45 or 90-degree angle

Create a list of functions that the component will do

  • goes up and down

Define components of robot

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

Elevator Tasks

What motors does it have

  • 2 775 pros - both driving the same output

What sensors does it have

  • One VersaPlanetary Integrated Encoder

What kind of motion is the component responsible for?

  • Moving the intake up and down
  • Going to particular positions

Create a list of functions that the component will do

  • go to specific position
  • STOP
  • Incremental up and down?

Grabbing Things

What kinds of things are we grabbing?
How heavy are the objects we are grabbing?

Cargo Intake Tasks

What motors does it have

  • NEO Brushless
    OR
  • 775 Pro

What sensors does it have

  • None

What kind of motion is the component responsible for?

  • It will rotate clockwise and counterclockwise

Create a list of functions that the component will do

  • Intake
  • Outake(?)

Mechanical Design(Arm):

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.

control

  • What buttons are we using?
  • where can the buttons and the joystick go?
  • What is the button layout
  • joystick dead bands

Autonomous/Hybrid mode

  • What motors are they using
  • What kind of motion is the component responsible for
  • What sensors do we need to control it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.