Skip to content

Commit 2771834

Browse files
nobody5050having115690Programmers
authored
Release/state comp (#166)
* Turn to an angle based on vision (#157) * turn to an angle based on vision * cleaned up * Add PreScoreShuffle command * Add logging * tuning on bot * auto scoring based on proximity * Create AutoChooser * Add entries and groups + a bug * linter * WORKING CHANGEABLE CHOOSER * Make linter happy (again) * add TODOs * fix stuff * intake mostly working * maybe this is how to rotate? * area threshold * add remaining autos to chooser * bind climbers and auto-score toggle to POV up/down * more than one way to test things * feed * avoid bad stuff * Update vendor deps and split pre score shuffle into multiple commands * Use scoring shuffling commands in intake * working feeding * fix subwoofer shot * working turn to note in sim * Split constants into their own files * linter * more led patterns * ramping = false if disabled auto scoring * ignore sim ctre stuff * stuffnthings * debounce intake * AAA EVERYTHING IS BROKEN * uhhh * intake in auto fixed * auto actually fixed * fixture locations * Remove ramping and only use score * Add tags to an auto and fix paths * Don't ramp when in zone and more climbing distance * autos tuned * address comments about constants --------- Co-authored-by: 5690 <[email protected]> * Show multiple vision targets simultaneously (#161) * show multiple vision targets simultaneously * linter * Don't mark explicit * add comment * fix drivebase width length * pathplanner pid good enough * Documentation for state, removal of unused code (#163) * Remove unused command compositions, document commands * More documentation * Add remaining LED entries to README --------- Co-authored-by: 5690 <[email protected]> Co-authored-by: having11 <[email protected]> * make build * Simp Auto * Remove Climbing Limits when Enabled and Add the Real OwO Binding (#165) * Add ability to remove limits on climbing in shuffleboard * Slow down amp arm speed * Make auto factory generic * bind the real OwO * linter * cleanup --------- Co-authored-by: Evan Rust <[email protected]> Co-authored-by: 5690 <[email protected]> Co-authored-by: having11 <[email protected]>
1 parent 7af2a78 commit 2771834

File tree

80 files changed

+2235
-1261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2235
-1261
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ logs
5959
*.tar.gz
6060
*.rar
6161

62+
ctre_sim/*.dat
63+
6264
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
6365
hs_err_pid*
6466

README.md

Lines changed: 156 additions & 63 deletions
Large diffs are not rendered by default.

elastic-layout.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1.0,"grid_size":40,"tabs":[{"name":"Competition","grid_layout":{"layouts":[],"containers":[{"title":"Auto Modes","x":600.0,"y":280.0,"width":240.0,"height":120.0,"type":"ComboBox Chooser","properties":{"topic":"/SmartDashboard/Auto Modes","period":0.06,"sort_options":false}},{"title":"Field","x":0.0,"y":0.0,"width":600.0,"height":400.0,"type":"Field","properties":{"topic":"/SmartDashboard/Field","period":0.06,"field_game":"Crescendo","robot_width":0.85,"robot_length":0.85,"show_other_objects":true,"show_trajectories":true}},{"title":"Has Note","x":600.0,"y":0.0,"width":240.0,"height":160.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Has Note","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"HAS TARGET LOCK","x":1080.0,"y":160.0,"width":200.0,"height":120.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/HAS TARGET LOCK","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"FMSInfo","x":840.0,"y":0.0,"width":440.0,"height":160.0,"type":"FMSInfo","properties":{"topic":"/FMSInfo","period":0.06}},{"title":"Rear Left Motor","x":840.0,"y":280.0,"width":120.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Rear Left Motor","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"Rear Right Motor","x":960.0,"y":280.0,"width":120.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Rear Right Motor","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"Front Left Motor","x":840.0,"y":160.0,"width":120.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Front Left Motor","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"Front Right Motor","x":960.0,"y":160.0,"width":120.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Front Right Motor","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"Proximity","x":720.0,"y":160.0,"width":120.0,"height":120.0,"type":"ComboBox Chooser","properties":{"topic":"/SmartDashboard/Proximity","period":0.06,"sort_options":false}},{"title":"aimbot enabled","x":1080.0,"y":280.0,"width":200.0,"height":120.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/aimbot enabled","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Note Count","x":600.0,"y":160.0,"width":120.0,"height":120.0,"type":"ComboBox Chooser","properties":{"topic":"/SmartDashboard/Note Count","period":0.06,"sort_options":false}}]}},{"name":"Axies","grid_layout":{"layouts":[],"containers":[{"title":"Arm Reset Encoder","x":0.0,"y":0.0,"width":400.0,"height":120.0,"type":"Command","properties":{"topic":"/SmartDashboard/Arm Reset Encoder","period":0.06,"show_type":true}},{"title":"Left Climber Reset Encoder","x":440.0,"y":0.0,"width":400.0,"height":120.0,"type":"Command","properties":{"topic":"/SmartDashboard/Left Climber Reset Encoder","period":0.06,"show_type":true}},{"title":"Right Climber Reset Encoder","x":880.0,"y":0.0,"width":400.0,"height":120.0,"type":"Command","properties":{"topic":"/SmartDashboard/Right Climber Reset Encoder","period":0.06,"show_type":true}},{"title":"Arm Absolute Position","x":0.0,"y":120.0,"width":200.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Arm Absolute Position","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"Arm At Max","x":200.0,"y":240.0,"width":200.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Arm At Max","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Arm At Min","x":0.0,"y":240.0,"width":200.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Arm At Min","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Arm Pid Enabled","x":0.0,"y":320.0,"width":400.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Arm Pid Enabled","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Arm Speed %","x":200.0,"y":120.0,"width":200.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Arm Speed %","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"Left Climber At Max","x":640.0,"y":240.0,"width":200.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Left Climber At Max","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Left Climber At Min","x":440.0,"y":240.0,"width":200.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Left Climber At Min","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Left Climber Pid Enabled","x":440.0,"y":320.0,"width":400.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Left Climber Pid Enabled","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Left Climber Position","x":440.0,"y":120.0,"width":200.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Left Climber Position","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"Left Climber Speed %","x":640.0,"y":120.0,"width":200.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Left Climber Speed %","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"Right Climber At Max","x":1080.0,"y":240.0,"width":200.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Right Climber At Max","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Right Climber At Min","x":880.0,"y":240.0,"width":200.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Right Climber At Min","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Right Climber Pid Enabled","x":880.0,"y":320.0,"width":400.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Right Climber Pid Enabled","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Right Climber Position","x":880.0,"y":120.0,"width":200.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Right Climber Position","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"Right Climber Speed %","x":1080.0,"y":120.0,"width":200.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/Right Climber Speed %","period":0.06,"data_type":"double","show_submit_button":false}}]}},{"name":"Intake","grid_layout":{"layouts":[],"containers":[{"title":"Note present Lower center ","x":240.0,"y":160.0,"width":240.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Note present Lower center ","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Note present lower amp ","x":480.0,"y":240.0,"width":240.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Note present lower amp ","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Note present lower podium ","x":0.0,"y":240.0,"width":240.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Note present lower podium ","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Note present upper amp ","x":480.0,"y":0.0,"width":240.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Note present upper amp ","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Note present upper center ","x":240.0,"y":80.0,"width":240.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Note present upper center ","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Note present upper podium ","x":0.0,"y":0.0,"width":240.0,"height":80.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Note present upper podium ","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"Has Note","x":760.0,"y":80.0,"width":240.0,"height":160.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/Has Note","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}}]}},{"name":"Pathplanner","grid_layout":{"layouts":[],"containers":[{"title":"Field","x":0.0,"y":0.0,"width":760.0,"height":400.0,"type":"Field","properties":{"topic":"/SmartDashboard/Field","period":0.06,"field_game":"Crescendo","robot_width":0.85,"robot_length":0.85,"show_other_objects":true,"show_trajectories":true}},{"title":"TURN TO ANGLE relative target deg","x":1000.0,"y":0.0,"width":280.0,"height":120.0,"type":"Text Display","properties":{"topic":"/SmartDashboard/TURN TO ANGLE relative target deg","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"TURN TO POSE AT GOAL","x":1000.0,"y":120.0,"width":280.0,"height":120.0,"type":"Boolean Box","properties":{"topic":"/SmartDashboard/TURN TO POSE AT GOAL","period":0.06,"data_type":"boolean","true_color":4283215696,"false_color":4294198070}},{"title":"activePath","x":760.0,"y":240.0,"width":240.0,"height":160.0,"type":"Text Display","properties":{"topic":"/PathPlanner/activePath","period":0.06,"data_type":"double[]","show_submit_button":false}},{"title":"currentPose","x":760.0,"y":0.0,"width":240.0,"height":120.0,"type":"Text Display","properties":{"topic":"/PathPlanner/currentPose","period":0.06,"data_type":"double[]","show_submit_button":false}},{"title":"inaccuracy","x":1000.0,"y":240.0,"width":160.0,"height":160.0,"type":"Text Display","properties":{"topic":"/PathPlanner/inaccuracy","period":0.06,"data_type":"double","show_submit_button":false}},{"title":"targetPose","x":760.0,"y":120.0,"width":240.0,"height":120.0,"type":"Text Display","properties":{"topic":"/PathPlanner/targetPose","period":0.06,"data_type":"double[]","show_submit_button":false}},{"title":"vel","x":1160.0,"y":240.0,"width":120.0,"height":160.0,"type":"Text Display","properties":{"topic":"/PathPlanner/vel","period":0.06,"data_type":"double[]","show_submit_button":false}}]}}]}

src/main/cpp/Robot.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ void Robot::RobotInit() {
2525
frc::DataLogManager::Start();
2626

2727
// Logs joystick data without hogging NT bandwidth
28-
// *May* tax the rio, should be tested
2928
frc::DriverStation::StartDataLog(frc::DataLogManager::GetLog());
3029
m_container.Initialize();
3130
}
@@ -38,7 +37,10 @@ void Robot::RobotInit() {
3837
* <p> This runs after the mode specific periodic functions, but before
3938
* LiveWindow and SmartDashboard integrated updating.
4039
*/
41-
void Robot::RobotPeriodic() { frc2::CommandScheduler::GetInstance().Run(); m_container.Periodic(); }
40+
void Robot::RobotPeriodic() {
41+
frc2::CommandScheduler::GetInstance().Run();
42+
m_container.Periodic();
43+
}
4244

4345
/**
4446
* This function is called once each time the robot enters Disabled mode. You

0 commit comments

Comments
 (0)