Giter VIP home page Giter VIP logo

2018robotcode's People

Contributors

nhubbard avatar noahhusby avatar timandyothers avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

noahhusby

2018robotcode's Issues

Things To Do Before States

Countdown Indicator

Icon Type This... Meaning
โฌ› :black_large_square: Very Low Priority
๐Ÿ”ต :large_blue_circle: Low Priority
๐Ÿ”ถ :large_orange_diamond: Medium Priority
๐Ÿ”ด :red_circle: High Priority
โ€ผ๏ธ :bangbang: Immediate Concern

Code Quality

  • Review all Javadoc. ๐Ÿ”ต
    Ensure that documentation is adequate from top to bottom.
    No signing off needed.
  • Review all code for possible issues. ๐Ÿ”ต
    Run through each line of code.
    No signing off needed.
  • CI for reviews? โฌ›
    CI to do automated reviews for improvement of productivity.
    Not of immediate concern.

Bugs
No bugs as of late, but they will be added here when deemed necessary.

Tasks to be completed before Milford event

Icon Type This... Meaning
๐Ÿ”ท :large_blue_diamond: Low Priority
๐Ÿ”ถ :large_orange_diamond: Medium Priority
๐Ÿ”ด :red_circle: High Priority
โ€ผ๏ธ :bangbang: Immediate Concern

Autonomous Goals

  • Switch Auto ๐Ÿ”ถ
    Test and evaulate new switch auto, make sure it can find sides using the FMS
    Signed off by: Noah Husby, Monday, March 12, 2018
  • Scale Auto ๐Ÿ”ถ
    New autonomous where robot can be started on either side of the field. If the robot is on the side where it can drop cube in scale, then go for scale. If not cross the autonomous line and stop.
    Signed off by: Noah Husby, Monday, March 12, 2018
  • PID navX turning ๐Ÿ”ถ
    Implement a working PIDSubsystem to make turns the same angle each time and more accurate, which will allow us to make more complicated autonomous modes.
    Signed off by: Noah Husby, Monday, March 12, 2018

Driver Functionality: Gear Shifting

  • Low Gear ๐Ÿ”ถ
    Run the drivetrain at low gear with a manual button press.
    Signed off by: Nicholas Hubbard on Saturday, February 17, 2018
  • High Gear ๐Ÿ”ถ
    This is not user selectable! Run the drivetrain at high gear.
    Signed off by: Nicholas Hubbard on Saturday, February 17, 2018
  • Automatic Gear ๐Ÿ”ท
    Shifting to high or low based on the speed the robot is running at. Start a count of rotations on teleopInit(). After x amount of rotations, shift to high gear if low gear is not manually chosen. On stick release, reset the counter.
    **Signed off by:**Noah Husby, Monday, March 12, 2018

Robot Status Functions

  • Gear status ๐Ÿ”ด
    Low or high gear?
    Signed off by: Nicholas Hubbard, Saturday, February 17, 2018
  • Gear selection status ๐Ÿ”ด
    Low or automatic?
    Signed off by: Noah Husby, Thursday, Februrary 22, 2018
  • Distance traveled since last dead stick ๐Ÿ”ด
    Count the distance of the drive counter since the last time the stick was neutral.
    **Signed off by:Signed off by: Noah Husby, Monday, March 12, 2018

Refactor LiftArm with Winch support

Within LiftArm Subsystem

  • Add Define getArmAngle method
  • Add Define resetArmAngle method
  • Add Define setArmAngle method
  • Add Define getWristAngle method
  • Add Define resetWristAngle method
  • Add Define setWristAngle method
  • Add Define setClamp method
  • Add Define engageHook method

Within Commands

  • Add Define PickUpCube command
  • Add Define DropOffScaleHigh command
  • Add Define DropOffScaleMedium command
  • Add Define DropOffScaleLow command
  • Add Define DropOffSwitchHigh command
  • Add Define DropOffSwitchMedium command
  • Add Define DropOffSwitchLow command
  • Add Climb command (already created via start and end climb)
  • Remove all lift, arm, clamp and hook commands

Create Vision Subsystem

Abstraction for Limelight NetworkTables values.

Low-level Methods

These are abstrations to make it easier to work with Limelight.

Higher-level Methods

TBD This is where we apply the values from the low-level methods.

Develop PID-Based Drivetrain Code

Whether we're basing it on last year's code or not, let's start implementing some PID code for the drivetrain that we can use in autonomous:

  • Define driveForward(Number distance)
  • Define driveBackward(Number distance)
  • Define turn(Number angle) method as a low-level control. These with have to use the angle from the NavX compass.
  • Define turnLeft() method as high-level interface to turn(Number angle) to turn 90ยฐ to the left.
  • Define turnRight() method as high-level interface to turn(Number angle) to turn 90ยฐ to the right.

The Drivetrain will also need to use the pneumatics to shift gears. We need to discuss how exactly we want to do this (automatic transmission shifts gears at a set speed? drive chooses between high and low gear?). Look for examples of how other teams did it--there should be some good whitepapers and other documentation out there.

Edit: Modified list for completion sake. - @nhubbard

Install Actual Documentation

This makes our project more maintainable and clear to use for others who wish to use it in the future.

  • Replace license with Markdown license.
  • Create an actual README that isn't 2 lines of Markdown.
  • Javadoc-certify each file (this is a long, annoying task)

Feel free to comment on this task.

Testing the robot for MDP

minimum deliverable product

  • Test the winch. This is extremely important! We don't know exactly how this operates, so this is our biggest issue!
  • Test the autonomous drivetrain.
  • Test the climbing arm.

Clean up subsystems & implement state machines

A few minor observations about code readability and conciseness.

Going through the code (in the DropOffScaleHigh), I found Robot.liftArm.getArmAngle() > scaleHighHeight && Robot.liftArm.getArmAngle() != scaleHighHeight. The > operator automatically excludes equality, so the second half of the compound (after the &&) is redundant.

  • Solution: Simplify the statement in DropOffScaleHigh to Robot.liftArm.getArmAngle() > scaleHighHeight. Please keep a lookout for these statements in the future. Nice catch, Mr. Guenther! Completed as of commit 854f346.

I like where you're going with the x = 0, x = 1 in this command; this is the start of a state machine. I'd suggest using an enum for the various states so that it's even easier to follow, and better variable names than x (which is very generic). When you get the wrist and other joints fully implemented, this is going to be even more important. Relevant lines for an example:

private final int MOVING = 0;
private final int REACHED = 1;
// ...
private int armState = MOVING;
//...
while (armState == MOVING) {
//...
} else {
armState = REACHED;
}

See also this more fully realized example of a team using an enum in a state machine

  • Solution: Implement a state machine in the Arm classes. It will make a very readable improvement. Thanks, Mr. Guenther!

Important! You can Google some tutorials and videos on State Machines if you'd like to know more. Note that the State Design Pattern is not exactly the same as the State Machine and is not what we want here.

Edit: Feb 1, 2018 11:37 by @nhubbard: Converted to task list for management purposes.

Testing Functionality for MVP (Minimum Viable Product)

Convert from the post on Band.

Icon Type This... Meaning
๐Ÿ”ท :large_blue_diamond: Low Priority
๐Ÿ”ถ :large_orange_diamond: Medium Priority
๐Ÿ”ด :red_circle: High Priority
โ€ผ๏ธ :bangbang: Immediate Concern

Driver Functionality: Movement

  • Forward and backward ๐Ÿ”ด
    Moving the robot forwards and backwards manually.
    Signed off by: Nicholas Hubbard on Friday, February 16, 2018
  • Rotation ๐Ÿ”ด
    Rotating the robot in up to 360ยฐ of freedom.
    Signed off by: Nicholas Hubbard on Friday, February 16, 2018
  • High gear graceful stop ๐Ÿ”ท
    Read the gear selection. Based on this, gracefully stop in high gear; dead stop in low gear only.
    Signed off by:

Driver Functionality: Gear Shifting

  • Low Gear ๐Ÿ”ถ
    Run the drivetrain at low gear with a manual button press.
    Signed off by: Nicholas Hubbard on Saturday, February 17, 2018
  • High Gear ๐Ÿ”ถ
    This is not user selectable! Run the drivetrain at high gear.
    Signed off by: Nicholas Hubbard on Saturday, February 17, 2018
  • Automatic Gear ๐Ÿ”ท
    Shifting to high or low based on the speed the robot is running at. Start a count of rotations on teleopInit(). After x amount of rotations, shift to high gear if low gear is not manually chosen. On stick release, reset the counter.
    Signed off by:

Operator Functionality: Arm and Wrist

  • Raising and lowering arm stick ๐Ÿ”ด
    This is not user selectable! Set the arm stick to a specified position. There will be presets for this.
    Signed off by: Noah Husby on Thursday, February 15, 2018
  • Arm and wrist movement
    • Move to floor position ๐Ÿ”ถ
      For picking up cubes off of the floor.
      Signed off by: Noah Husby, Sunday, February 18, 2018
    • Move to switch delivery position ๐Ÿ”ถ
      For delivering cube to switch.
      Signed off by: Noah Husby, Sunday, February 18, 2018
    • Move to scale delivery position ๐Ÿ”ถ
      For delivering cube to scale. Close the wrist if not already closed.
      Signed off by: Noah Husby, Sunday, February 18, 2018
    • Move to cube storage delivery position ๐Ÿ”ถ
      For delivering cube to vault.
      Signed off by: Noah Husby, Sunday, February 18, 2018
    • Move to custom delivery position ๐Ÿ”ถ
      For pyramid/missed drop/et cetera.
      Signed off by: Noah Husby, Sunday, February 18, 2018
    • Rotation of wrist ๐Ÿ”ถ
      For movement of the wrist to any given angle. Crucial to custom delivery position.
      Signed off by: Nicholas Hubbard on Saturday, February 17, 2018

Operator Functionality: Buttons

  • Cube dropping positions
    • Drop the cube naturally ๐Ÿ”ด
      Drop a cube directly over the target.
      Signed off by: Nicholas Hubbard on Saturday, February 17, 2018
    • Drop the cube with W O O S H ๐Ÿ”ด
      Drop a cube with a punt from the puncher.
      Signed off by: Nicholas Hubbard on Saturday, February 17, 2018
  • Climb Position โ€ผ๏ธ
    Release the wrist and winch brake, close the hand, raise the arm to the climbing angle, and rotate the wrist to the climbing position. Set winch and wrist brakes when done.
    Signed off by: Nicholas Hubbard, February 20, 2018
  • Climbing โ€ผ๏ธ
    Does not engage unless the robot is already in climbing position! Release the winch and wrist brakes, and rotate the wrist the engage the rung. Activate the winch to climb and set the winch brake at the end of the climb. Do not set the wrist brake. Must absolutely be able to halt the climb!*
    Signed off by: Nicholas Hubbard, February 20, 2018
  • Pre-match position ๐Ÿ”ด
    Load a cube into position for starting a match.
    Signed off by: Nicholas Hubbard on Saturday, February 17, 2018
  • Puncher ๐Ÿ”ด
    Moving the puncher inward and outward.
    Signed off by: Nicholas Hubbard on Saturday, February 17, 2018

Robot Status Functions

  • Gear status ๐Ÿ”ด
    Low or high gear?
    Signed off by: Nicholas Hubbard, Saturday, February 17, 2018
  • Gear selection status ๐Ÿ”ด
    Low or automatic?
    Signed off by: Noah Husby, Thursday, Februrary 22, 2018
  • Distance traveled since last dead stick ๐Ÿ”ด
    Count the distance of the drive counter since the last time the stick was neutral.
    Signed off by:
  • Arm position ๐Ÿ”ด
    Retrieved by potentiometer.
    Signed off by: Noah Husby, Thursday, Februrary 22, 2018
  • Wrist position ๐Ÿ”ด
    Retrieved by encoder.
    Signed off by: Noah Husby, Thursday, Februrary 22, 2018
  • Direction of rotation to wrist position ๐Ÿ”ด
    This is what direction the wrist was rotated to get to a position.
    Signed off by: Noah Husby, Thursday, Februrary 22, 2018
  • Gripper status โ€ผ๏ธ
    Read the arm position. Safety measure for wrist rotation. Blocking level of priority!
    Signed off by: Noah Husby, Thursday, Februrary 22, 2018

Goals
Automate as much as possible for the operator!

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.