Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 reef alignment miniauto #31

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
bbab249
init files + add photonlib
Saturncorgi Jan 7, 2025
917f568
added like code
Saturncorgi Jan 7, 2025
7c35447
more code
Saturncorgi Jan 8, 2025
5132a8c
Merge pull request #7 from IronRiders/main
Saturncorgi Jan 8, 2025
c0e7e35
update backup
Saturncorgi Jan 8, 2025
f72c77a
modified somthing
Saturncorgi Jan 8, 2025
764f58c
test
Saturncorgi Jan 8, 2025
ee28e8e
Merge branch '2-reef-alignment-miniauto' of https://github.com/IronRi…
Saturncorgi Jan 8, 2025
9f20e6b
no warnings 😊
Saturncorgi Jan 8, 2025
585066d
merge?
Saturncorgi Jan 14, 2025
27bc555
removed stuff that shouldn't be here
Saturncorgi Jan 15, 2025
cd28260
swerve updates + test code for motors
Saturncorgi Jan 15, 2025
bef564e
Merge pull request #20 from IronRiders/main
a-mishmash Jan 16, 2025
283ff10
got rid of swerve stuff while it does not work
Saturncorgi Jan 17, 2025
fa6175d
Merge branch 'main' into 2-reef-alignment-miniauto
Saturncorgi Jan 17, 2025
a99a544
Merge remote-tracking branch 'origin/main' into 2-reef-alignment-mini…
Saturncorgi Jan 17, 2025
be1644b
fix weird merge thingy
Saturncorgi Jan 17, 2025
fd7f752
read the drive stuff i commented out
Saturncorgi Jan 17, 2025
82c9538
made numbers come out + put ids to smartdashboard
Saturncorgi Jan 17, 2025
b78e7ef
Created Coral Wrist Command, Subsystem and Constants file plus util f…
ryanelbert5125gmail Jan 20, 2025
d269685
Merge branch '11-manipulator-system' of https://github.com/IronRiders…
ryanelbert5125gmail Jan 20, 2025
0e26cdc
some *limited* commenting + added canAlignCoral smart dashboard value
Jan 23, 2025
2f302ad
added pose estimation based on all 4 cameras possibly
Jan 23, 2025
b1273e2
FYI that was all writen at 11:30 at night and probably won't work
Jan 23, 2025
7195bf3
not super sure acctually
Saturncorgi Jan 23, 2025
caeaa0e
Merge branch '2-reef-alignment-miniauto' of https://github.com/IronRi…
Saturncorgi Jan 23, 2025
15b80b6
cleaned up comments a bit
Saturncorgi Jan 23, 2025
1ab8e85
re-add drive stuff + format vision stuff
Saturncorgi Jan 23, 2025
4ac5422
IDK stuff
Saturncorgi Jan 23, 2025
3967b52
Allow for an arbitrary number of cameras
Saturncorgi Jan 23, 2025
a53ac57
also stuff
Saturncorgi Jan 23, 2025
86a5d53
a bit of input validation
Saturncorgi Jan 23, 2025
738b243
stuff
Saturncorgi Jan 23, 2025
e2339cd
update all vendordeps
Saturncorgi Jan 23, 2025
01a4c83
Merge pull request #29 from IronRiders/main
a-mishmash Jan 23, 2025
0500552
Updated drive
a-mishmash Jan 23, 2025
175b8f7
Merge branch '11-manipulator-system' into 2-reef-alignment-miniauto
Saturncorgi Jan 23, 2025
1e2494b
stuff again
Saturncorgi Jan 24, 2025
2755a88
bingus
a-mishmash Jan 24, 2025
3a9ee7c
Merge branch '11-manipulator-system' into 2-reef-alignment-miniauto
Saturncorgi Jan 24, 2025
0e90abc
no warnings
Saturncorgi Jan 24, 2025
0f5451a
actually no warnings
Saturncorgi Jan 24, 2025
a0763e4
stuff
Saturncorgi Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

build/
.gradle/
.vscode/
.idea/ # please do not use IntelliJ!
build
build
6 changes: 6 additions & 0 deletions .wpilib/wpilib_preferences.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"currentLanguage": "none",
"enableCppIntellisense": false,
"projectYear": "none",
"teamNumber": 4180
}
2 changes: 1 addition & 1 deletion src/main/deploy/swerve/modules/backleft.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"front": -12,
"left": 12
},
"absoluteEncoderOffset": 193.0,
"absoluteEncoderOffset": 99.884,
"drive": {
"type": "talonfx",
"id": 5,
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/swerve/modules/backright.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"front": -12,
"left": -12
},
"absoluteEncoderOffset": 185.0,
"absoluteEncoderOffset": 205.782,
"drive": {
"type": "talonfx",
"id": 3,
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/swerve/modules/frontleft.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"front": 12,
"left": 12
},
"absoluteEncoderOffset": 266.0,
"absoluteEncoderOffset": 83.670,
"drive": {
"type": "talonfx",
"id": 7,
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/swerve/modules/frontright.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"front": 12,
"left": -12
},
"absoluteEncoderOffset": 22.0,
"absoluteEncoderOffset": 33.034,
"drive": {
"type": "talonfx",
"id": 1,
Expand Down
112 changes: 112 additions & 0 deletions src/main/deploy/vision/iron-hallway.tags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"tags": [
{
"ID": 1,
"pos": {
"translation": {
"x": 1.5239999512320015,
"y": 3.962399873203204,
"z": 0.6921499778512008
},
"rotation": {
"quaternion": {
"W": -0.7071067811865475,
"X": 0,
"Y": 0,
"Z": 0.7071067811865476
}
}
}
},
{
"ID": 2,
"pos": {
"translation": {
"x": 4.5719998536960045,
"y": 3.962399873203204,
"z": 1.9113499388368018
},
"rotation": {
"quaternion": {
"W": -0.7071067811865475,
"X": 0,
"Y": 0,
"Z": 0.7071067811865476
}
}
}
},
{
"ID": 3,
"pos": {
"translation": {
"x": 7.6199997561600075,
"y": 3.962399873203204,
"z": 1.3017499583440013
},
"rotation": {
"quaternion": {
"W": -0.7071067811865475,
"X": 0,
"Y": 0,
"Z": 0.7071067811865476
}
}
}
},
{
"ID": 4,
"pos": {
"translation": {
"x": 7.6199997561600075,
"y": 0,
"z": 1.3017499583440013
},
"rotation": {
"quaternion": {
"W": 0.7071067811865476,
"X": 0,
"Y": 0,
"Z": 0.7071067811865476
}
}
}
},
{
"ID": 5,
"pos": {
"translation": {
"x": 4.5719998536960045,
"y": 0,
"z": 1.9113499388368018
},
"rotation": {
"quaternion": {
"W": 0.7071067811865476,
"X": 0,
"Y": 0,
"Z": 0.7071067811865476
}
}
}
},
{
"ID": 6,
"pos": {
"translation": {
"x": 1.5239999512320015,
"y": 0,
"z": 0.6921499778512008
},
"rotation": {
"quaternion": {
"W": 0.7071067811865476,
"X": 0,
"Y": 0,
"Z": 0.7071067811865476
}
}
}
}
]
}
12 changes: 8 additions & 4 deletions src/main/java/org/ironriders/core/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@
import edu.wpi.first.wpilibj.RobotBase;

/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
* you are doing, do not modify this file except to change the parameter class to the startRobot
* Do NOT add any static variables to this class, or any initialization at all.
* Unless you know what
* you are doing, do not modify this file except to change the parameter class
* to the startRobot
* call.
*/
public final class Main {
private Main() {}
private Main() {
}

/**
* Main initialization function. Do not perform any initialization here.
*
* <p>If you change your main robot class, change the parameter type.
* <p>
* If you change your main robot class, change the parameter type.
*/
public static void main(String... args) {
RobotBase.startRobot(Robot::new);
Expand Down
54 changes: 37 additions & 17 deletions src/main/java/org/ironriders/core/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import edu.wpi.first.wpilibj2.command.CommandScheduler;

/**
* The methods in this class are called automatically corresponding to each mode, as described in
* the TimedRobot documentation. If you change the name of this class or the package after creating
* The methods in this class are called automatically corresponding to each
* mode, as described in
* the TimedRobot documentation. If you change the name of this class or the
* package after creating
* this project, you must also update the Main.java file in the project.
*/
public class Robot extends TimedRobot {
Expand All @@ -20,39 +22,52 @@ public class Robot extends TimedRobot {
private Command autonomousCommand;

/**
* This function is run when the robot is first started up and should be used for any
* This function is run when the robot is first started up and should be used
* for any
* initialization code.
*/
public Robot() {
// Instantiate our RobotContainer. This will perform all our button bindings, and put our
// Instantiate our RobotContainer. This will perform all our button bindings,
// and put our
// autonomous chooser on the dashboard.
robotContainer = new RobotContainer();
}

/**
* This function is called every 20 ms, no matter the mode. Use this for items like diagnostics
* This function is called every 20 ms, no matter the mode. Use this for items
* like diagnostics
* that you want ran during disabled, autonomous, teleoperated and test.
*
* <p>This runs after the mode specific periodic functions, but before LiveWindow and
* <p>
* This runs after the mode specific periodic functions, but before LiveWindow
* and
* SmartDashboard integrated updating.
*/
@Override
public void robotPeriodic() {
// Runs the Scheduler. This is responsible for polling buttons, adding newly-scheduled
// commands, running already-scheduled commands, removing finished or interrupted commands,
// and running subsystem periodic() methods. This must be called from the robot's periodic
// Runs the Scheduler. This is responsible for polling buttons, adding
// newly-scheduled
// commands, running already-scheduled commands, removing finished or
// interrupted commands,
// and running subsystem periodic() methods. This must be called from the
// robot's periodic
// block in order for anything in the Command-based framework to work.
CommandScheduler.getInstance().run();
}

/** This function is called once each time the robot enters Disabled mode. */
@Override
public void disabledInit() {}
public void disabledInit() {
}

@Override
public void disabledPeriodic() {}
public void disabledPeriodic() {
}

/** This autonomous runs the autonomous command selected by your {@link RobotContainer} class. */
/**
* This autonomous runs the autonomous command selected by your
* {@link RobotContainer} class.
*/
@Override
public void autonomousInit() {
autonomousCommand = robotContainer.getAutonomousCommand();
Expand All @@ -65,7 +80,8 @@ public void autonomousInit() {

/** This function is called periodically during autonomous. */
@Override
public void autonomousPeriodic() {}
public void autonomousPeriodic() {
}

@Override
public void teleopInit() {
Expand All @@ -80,7 +96,8 @@ public void teleopInit() {

/** This function is called periodically during operator control. */
@Override
public void teleopPeriodic() {}
public void teleopPeriodic() {
}

@Override
public void testInit() {
Expand All @@ -90,13 +107,16 @@ public void testInit() {

/** This function is called periodically during test mode. */
@Override
public void testPeriodic() {}
public void testPeriodic() {
}

/** This function is called once when the robot is first started up. */
@Override
public void simulationInit() {}
public void simulationInit() {
}

/** This function is called periodically whilst in simulation. */
@Override
public void simulationPeriodic() {}
public void simulationPeriodic() {
}
}
Loading
Loading