Skip to content

Commit 32bb82c

Browse files
Merge branch 'main' into questnav
2 parents 6aed0c4 + 6f24ed3 commit 32bb82c

20 files changed

Lines changed: 367 additions & 44 deletions

.advantagescope/Robot_Nautilus2025/config.json

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "Nautilus",
3-
"disableSimplification": false,
43
"rotations": [
54
{"axis": "x", "degrees": 90}
65
],
@@ -15,15 +14,15 @@
1514
}
1615
],
1716
"position": [
18-
0.1975,
19-
-0.2032,
20-
0.205
17+
0.3048,
18+
0.12,
19+
0.12
2120
],
2221
"resolution": [
2322
1280,
2423
960
2524
],
26-
"fov": 82
25+
"fov": 83
2726
},
2827
{
2928
"name": "Back Camera",
@@ -38,9 +37,9 @@
3837
}
3938
],
4039
"position": [
41-
-0.3159252,
42-
-0.0508,
43-
0.1760474
40+
-0.3048,
41+
0,
42+
0.12
4443
],
4544
"resolution": [
4645
960,
@@ -53,17 +52,40 @@
5352
"rotations": [
5453
{
5554
"axis": "y",
56-
"degrees": -20
55+
"degrees": -25
5756
},
5857
{
5958
"axis": "z",
6059
"degrees": 100
6160
}
6261
],
6362
"position": [
64-
0.077343,
65-
-0.322961,
66-
0.1825752
63+
-0.12,
64+
0.3048,
65+
0.12
66+
],
67+
"resolution": [
68+
960,
69+
720
70+
],
71+
"fov": 62.5
72+
},
73+
{
74+
"name": "Right Camera",
75+
"rotations": [
76+
{
77+
"axis": "y",
78+
"degrees": -20
79+
},
80+
{
81+
"axis": "z",
82+
"degrees": -90
83+
}
84+
],
85+
"position": [
86+
0.07,
87+
-0.3048,
88+
0.50
6789
],
6890
"resolution": [
6991
960,
@@ -72,5 +94,22 @@
7294
"fov": 62.5
7395
}
7496
],
75-
"components": []
97+
"components": [
98+
{
99+
"zeroedRotations": [{"axis": "x", "degrees": 90}],
100+
"zeroedPosition": [0, 0, 0]
101+
},
102+
{
103+
"zeroedRotations": [{"axis": "x", "degrees": 90}],
104+
"zeroedPosition": [0, 0, -0.06]
105+
},
106+
{
107+
"zeroedRotations": [{"axis": "x", "degrees": 90}],
108+
"zeroedPosition": [-0.28575, 0, -0.48]
109+
},
110+
{
111+
"zeroedRotations": [{"axis": "x", "degrees": 90}],
112+
"zeroedPosition": [0.124, -0.298, -0.450]
113+
}
114+
]
76115
}
-811 KB
Binary file not shown.
1.99 MB
Binary file not shown.
9.1 MB
Binary file not shown.
4.56 MB
Binary file not shown.
1.99 MB
Binary file not shown.

gradlew

100644100755
File mode changed.

reefscape.png

-333 KB
Loading

src/main/java/frc/robot/Robot.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public Robot() throws RuntimeException {
103103
case SIM:
104104
// Running a physics simulator, log to NT
105105
Logger.addDataReceiver(new NT4Publisher());
106+
107+
// Silence Joystick Warnings
108+
DriverStation.silenceJoystickConnectionWarning(RobotBase.isSimulation());
106109
break;
107110

108111
case REPLAY:
@@ -116,7 +119,7 @@ public Robot() throws RuntimeException {
116119

117120
// Start AdvantageKit logger
118121
Logger.start();
119-
122+
120123
// Check for valid swerve config
121124
var modules =
122125
new SwerveModuleConstants[] {

src/main/java/frc/robot/RobotContainer.java

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import frc.robot.Constants.DriveConstants;
4343
import frc.robot.Constants.Mode;
4444
import frc.robot.Constants.ReefLevel;
45+
import frc.robot.Constants.RobotType;
4546
import frc.robot.commands.auto.AutoCommands;
4647
import frc.robot.commands.auto.AutoModeBaseCmd;
4748
import frc.robot.commands.drive.DriveCommands;
@@ -61,6 +62,7 @@
6162
import frc.robot.subsystems.brain.SetLevelCmd;
6263
import frc.robot.subsystems.climber.ClimberIO;
6364
import frc.robot.subsystems.climber.ClimberIOHardware;
65+
import frc.robot.subsystems.climber.ClimberIOSim;
6466
import frc.robot.subsystems.climber.ClimberSubsystem;
6567
import frc.robot.subsystems.drive.Drive;
6668
import frc.robot.subsystems.drive.GyroIO;
@@ -73,6 +75,7 @@
7375
import frc.robot.subsystems.funnel.FunnelSubsystem;
7476
import frc.robot.subsystems.grabber.GrabberIO;
7577
import frc.robot.subsystems.grabber.GrabberIOHardware;
78+
import frc.robot.subsystems.grabber.GrabberIOSim;
7679
import frc.robot.subsystems.grabber.GrabberSubsystem;
7780
import frc.robot.subsystems.manipulator.ManipulatorConstants;
7881
import frc.robot.subsystems.manipulator.ManipulatorIO;
@@ -91,6 +94,7 @@
9194
import frc.robot.subsystems.vision.TrackerIO;
9295
import frc.robot.subsystems.vision.TrackerIOQuest;
9396
import frc.robot.subsystems.vision.VisionConstants;
97+
import frc.robot.util.Mechanism3d;
9498
import frc.robot.util.ReefUtil;
9599
import frc.simulator.engine.ISimulatedSubsystem;
96100

@@ -265,13 +269,13 @@ private RobotContainer() {
265269
}
266270

267271
try {
268-
grabber_ = new GrabberSubsystem(new GrabberIOHardware());
272+
grabber_ = new GrabberSubsystem(new GrabberIOSim(drivebase_::getPose));
269273
} catch (Exception ex) {
270274
subsystemCreateException(ex);
271275
}
272276

273277
try {
274-
climber_ = new ClimberSubsystem(new ClimberIOHardware());
278+
climber_ = new ClimberSubsystem(new ClimberIOSim());
275279
} catch (Exception ex) {
276280
subsystemCreateException(ex);
277281
}
@@ -380,14 +384,35 @@ private RobotContainer() {
380384
autonomousTab.add("Auto Mode", autoChooser_.getSendableChooser()).withSize(2, 1);
381385
tuningTab.add("Tuning Modes", tuningChooser_.getSendableChooser()).withSize(2, 1);
382386

387+
// Visualizers
388+
new Mechanism3d(
389+
"Measured",
390+
drivebase_::getPose,
391+
manipulator_::getElevatorPosition,
392+
manipulator_::getArmPosition,
393+
climber_::getClimberPosition,
394+
brain_::gp
395+
);
396+
397+
new Mechanism3d(
398+
"Setpoints",
399+
drivebase_::getPose,
400+
manipulator_::getElevatorTarget,
401+
manipulator_::getArmTarget,
402+
climber_::getClimberPosition,
403+
brain_::gp
404+
);
405+
383406
// Configure the button bindings
384407
configureDriveBindings();
385408
configureButtonBindings();
386409
configureTestModeBindings() ;
387410

388-
manipulator_.setDefaultCommand(new CalibrateCmd(manipulator_));
411+
if (Constants.getRobot() != RobotType.SIMBOT) {
412+
manipulator_.setDefaultCommand(new CalibrateCmd(manipulator_));
413+
}
389414
}
390-
415+
391416
public Drive drivebase() {
392417
return drivebase_;
393418
}

0 commit comments

Comments
 (0)