mechanical-advantage / robotcode2018 Goto Github PK
View Code? Open in Web Editor NEWRobot code for "The Revenge of Bot-Bot"
Robot code for "The Revenge of Bot-Bot"
The 2018 robot may require more than one PCM. Investigate what is required to use >1 in code.
The spork will require controls and OI support.
DEPLOY: Release pneumatics, spring loaded deployment. Deployment to be by DRIVER (not operator) and require TWO buttons, one on EACH joystick to prevent accidental triggering.
PICKUP: Drive two Talon controlled motors, each with mag encoder. Actual rotation through a small # of degrees with heavy gearing-down. Encoders must not be allowed to drift too far apart. Control by operator or driver button (TBD), "run while held".
STOW: Post-match. Reverse out, then drive in and re-engage pneumatics to lock. Controls TBD.
For situations where quick-and-dirty is good enough, have a variant of TurnToAngle that takes precision as an argument.
Remove bot-bot-isms from camera code on Revenge
Confirm that autonomous sequences use programmed eject power and do not read the current slider value.
Investigate and perhaps implement additional data logging to aid in understanding match behaviors.
Consider the 995 "CsvLogger" class as one possible approach.
https://github.com/FRC-Team-955/Team955RobotLib/wiki/CsvLogger
Consider also the alternative of having a mechanism to send data to the driver station and log it there.
General
Drivetrain tuning
Intake
Elevator
For 2-cube autos, add code to actually grab the cube before continuing.
Also determine whether/how to turn off the intake, depending on if Banner sensor is installed.
Work with others to identify controls needed by driver and operator (buttons, joysticks, etc.)
Add code to lower intake during autonomous sequences (and raise off floor if needed).
Set up Komodo analyzer and test its use. Consider creating a Wiki HOWTO for it.
Auto climb:
Leave ready for climbing under operator control
Modify the range of the eject power slider so that at its bottom position, there is still a minimum usable eject power (instead of 0).
Investigate whether running intake during auto helps to avoid dropping cubes.
General
Drivetrain tuning
Intake
Scoring Arm
Create the real dashboard layout for competition
Update intake controls so that intake operates as hold-to-operate.
TBD desired behavior of "off" button. May be repurposed for other things!
Consider ways of experimentally supporting a low speed intake to minimize cube "kicking". (This may or may not be used, is something that was suggested to explore.)
One possibility suggested was remapping intake-on to toggle between intake-low and intake-high speeds. There may be other alternatives.
Add ability to drive >8 LEDs to driver station-Arduino protocol.
Proposed solution: use 2 bits/byte for LED group ID, remaining 6 bits for LED states per group. Provides up to 24 LEDs.
Includes auto-stop, sensors, speeds, current limiting/monitoring
For situations where it may be desirable to vary from default values, create a variant of DriveDistanceOnHeading that takes acceptable tolerance, max accel, max velocity as parameters. Set up so that if a passed parameter is 0, the default is used for that parameter.
Remap controls so that
Switch auto delivery in straight line if on correct side otherwise just cross line.
Ensure that Eject button is run-until-released while Eject in (all) autos is time-terminated
See what may be useful in the CTRE Phoenix libraries (as new functionality is released)
There is discussion of having code available to help teams cross-the-line in auto, to aid in acquiring the RP. For example:
https://www.chiefdelphi.com/forums/showthread.php?threadid=161926
Review this (and related resources such as this: https://github.com/Open-RIO/2018-Minimum-Viable-Autonomous) so as to be in a position to offer alliance members help.
Determine what TalonSRX run time values may be useful in understanding the behavior of the 4 Talons/drive motors, and add these to the driver station dashboard.
Provide a scale-only autonomous option (possibly with an additional variant of "only if same side")
Add LED state outputs to network tables where needed in code
Investigate and understand the Field Management System API for accessing game data.
Provide interface function(s) enabling easy access to necessary data (switch/scale ownership) based on that data.
Make sure that robot autonomous does not get stuck if it hits an immovable object and the wheels won't turn. May require simulating this condition on Everybot since behavior of Revenge's shifting gearbox varies depending on low/high gear setting.
Install necessary software and files on a team laptop so that it can serve as a backup driver station in the event of continued issues with the Surface.
Update auto sequences to include positioning of robot afterward.
Evaluate others.
Consider whether actual grab of next cube is worth attempting.
Test, tune and debug DriveDistanceOnHeading and TurnToAngle routines.
Beware that WPILib2018 has broken setToleranceBuffer and this may need to be worked around. SetToleranceBuffer is also deprecated so may need to be refactored out eventually anyway.
Restructure the auto selector so that it is not one long list of items (or, at minimum, rename items for clarity).
Now that the code is structured to support 3 robots, fill in all the places necessary for the 2018 competition robot drive to function. Assume tank drive, 2 motors per side, 2-speed gearboxes.
Running into the scale is a tech foul so we should investigate ways of preventing that. Possible ideas include:
Add support for additional, upward-facing camera to be used for scale positioning.
Consider automatically switching to this camera when the elevator is sufficiently high.
Create a version of DriveDistanceOnHeading that takes arguments for max speed and max accel (as % values).
This is probably best done as a variant with a different signature.
As discussed, the logical approach is for the % values to be of robot maximums, e.g. a "normal" DriveDistanceOnHeading was using 90% & 3% respectively. This allows maximum flexibility (can go up as well as down) and avoids "% of a %" confusion.
Investigate any and all possible software issues, data, workarounds, logs that can contribute to understanding and resolving elevator performance (and brownout) issues.
This includes developing (and running/debugging on a test robot) code for testing torque contribution of each motor as suggested by CTRE.
Set up a motion-profile tuning interface in Shuffleboard
The FMS does not report ownership instantly, and the code needs to work around that.
Consult with mechanical team to understand the mechanical design and incorporated sensors, and map these to logical software subsystems to be built.
Try Nvidia vision-learning software to see how effectively it can be trained to track game cubes. This will require feeding it a substantial number of different cube pictures.
Create "for dummies" document with electronics layout:
Map out auto sequences and selections for 2018 game.
Verify correct operation of "flipped" profile logic for autonomous sequences
Create improved PID tuning interface, possible using Shuffleboard. See if (deprecated) SFX dashboard approach can be retired.
Explore use of PixyCam (training, effectiveness in tracking cubes, HW/SW interface use on RoboRIO)
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.