Giter Site home page Giter Site logo

2017-robot's People

Contributors

armaangoel78 avatar aryker avatar c0d3r0fapps avatar claytondetke avatar hmperson1 avatar karagenit avatar paul-blankenbaker avatar streaker03 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

karagenit

2017-robot's Issues

CTRE Library Javadocs

Add to .classpath (eventually) - maybe then add to .gitignore since it's a pretty user-specific path for the docs.

Software Rotation Limit On Turret

0 degrees will need to be determined (probably the halfway point between limits) and then we need to figure out how far each way we can rotate, then limit the various subsystem set...() methods so they can't force the turret to rotate further.

Turret Rotation Subsystem

  • Set Position Method (Resets encoder count?)
  • Set Angle Method (set position of motor)
  • Read Limit Switches (will be hard-wired to Talon as well - use DigitalInput for now)
  • Set PID values

RecordMotors Interface

Implementable interface which forces you to provide a record() method or something, which then returns a value that can be saved to a CSV file or something.

Subsystem Encoders

  • Shooter
  • Turret
  • Drive

Drive will be a bit different, since we can't simply read the value from the CANTalon (they're going to have Sparks).

Advanced Starting Points for Commands

Some auton routines will be run after others, for example dropping off a gear first then driving over to dump the hoppers.

  • Gear to Hopper
  • Hopper to Gear
  • Gear to Baseline
  • Gear to edge of neutral zone (ready to grab another gear at start of teleop)

Command Arguments & Command Factory

Idea for simpler command structure:

  • Command Groups call only the main CommandFactory
  • CommandFactory has static methods such as getGearOpenCommand() or getGearClosedCommand()
  • CommandFactory calls subsystem-related command factories, such as GearCommandFactory
  • Subsystem factories such as GearCommandFactory take arguments such as a boolean for open/closed, build a command via creating a new object and calling the add... methods, and return the created object
  • More advanced factories for auton routines would exist, such as ones that take a starting point and build the auton routines accordingly

Possibly also an AutonFactory itself which adds multiple auton routines from different starting points: for example, builds a DropOffGearCG from RedOne, then a DumpHopperCG from GearPegOne, then a FeedAndShootCG from Hopper.

Different Serial Subsystems for Different Ports

I understand we've been playing with the PixyCam on both Serial and I2C ports...we should have different classes for each of these e.g. ColorPixySubsystemSerial and ColorPixySubsystemI2C.

Serial Device Subsystems throw Exceptions

When a subsystem for a device which uses some sort of serial communication (such as the LIDAR or PixyCam over USB or MXP) is constructed and a device isn't attached to that serial port, it throws an exception which breaks the entirety of the robot code.

It would be possible to catch this exception within the constructor itself. This would mean getInstance() has to do one of two things: return null which would create NullPointerExceptions in other parts of the code; or, continue trying to construct the device on the serial port until it succeeds, which would cause the code to hang indefinitely. Neither of these are very good solutions, though they're pretty easy to implement.

The current solution is to simply not use these Subsystems (e.g. don't call them in the UpdateSmartDashboard command) when the devices aren't hooked up OR just hook up every device properly, though both slow down the testing/debugging process.

Instead, we could have the constructor catch this exception and set the serial object to null. Every method which reads from serial would check to make sure it isn't null before reading, and in the case that it is null would return 0 for any measurement. Additionally, it would be good to have a public connect() method which reattempts to construct this serial object, and a method isConnected() which returns serial != null (essentially if the serial data being read is valid or just returning 0 as the error case).

Alternatively, we could just surround every interaction with the serial object with a try-catch, and set any expected return values to 0 in the catch statement.

Synchronize Pixy Field Accessors

As the IR Pixy Subsystem is now threaded, any of the getters or setters to the class fields need to be declared synchronized. These include methods such as processRecord() and getSizeOfTarget().

Fix Shooter Command

Currently sets the power of the motor, but sets it to about 0.8 volts. Should instead use the PID to set an RPS of something like 80.

RotateToAngle vs TurnToAngle?

I think it might be better to name it TurnToAngle in order to better differentiate it from RotateTurretToAngle...what do you think?

Create Style Guide

I'm noticing inconsistencies in the code (spaces vs. tabs, space between () and {, if x rather than if { x }, etc), and thinking that a unified style guide may be in order.

As an initial proposition, the Google Java Style Guide may work.

Move lib-robot Submodule into Source Directory

Pretty simple, move the submodule into src/, change necessary imports (only for the gyro really), and remove the copy/pasted lib/gyro source files.

Doing it sooner than later would be good, as it would likely mean less refactoring.

Auton Commands

Positions:

  • Start
  • Gear
  • Hopper
  • Neutral/Baseline

Auton Routines

  • Start - Gear
  • Start - Hopper (may not actually shoot)
  • Start - Neutral (may not go far enough into neutral zone)
  • Start - Gear - Neutral
  • Start - Gear - Hopper (again, may not actually shoot)
  • Start - Hopper - Gear
  • Start - Hopper - Neutral

Simple Commands

  • Drive by Distance
  • Turn by Angle
  • Rotate Turret to Angle
  • Shoot
  • Release Gear
  • Agitator
  • Feed to Shooter

Add Javadoc

Subsystems

  • Agitator
  • Drive
  • Gear Collector
  • LIDAR

More files tbd.

Turret Calibration

As in the title. Also (probably) a prerequisite for any kind of turret stops.

GetInstance Interface

It is possible with Java 8, though I'm not sure if the syntax for implementing static methods in interfaces is any different.

Simplified OI

  • Sendable Chooser is pointless - adds clutter to SmartDashboard (just hardcode types)
  • setupController(type) is pointless, we won't ever have more than one driver or operator

For the last one, the setupDriver and setupOperator should still be encapsulated to look nice.

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.