Skip to content

Commit

Permalink
Sync changes from 4/2/2024
Browse files Browse the repository at this point in the history
  • Loading branch information
twangodev committed Apr 3, 2024
1 parent 0ae7e8c commit bb6994e
Show file tree
Hide file tree
Showing 52 changed files with 1,362 additions and 1,661 deletions.
25 changes: 0 additions & 25 deletions src/main/deploy/pathplanner/autos/Troll Right.auto

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/navgrid.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,25 @@
"waypoints": [
{
"anchor": {
"x": 4.49,
"y": 6.87
"x": 1.9113560946263224,
"y": 6.285472034271439
},
"prevControl": null,
"nextControl": {
"x": 7.713587380878466,
"y": 7.767357877308347
"x": 1.550088309478945,
"y": 5.9623870231640295
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 7.707945864965804,
"y": 5.008834749150981
"x": 2.316680926742892,
"y": 5.565873600441298
},
"prevControl": {
"x": 8.011288207941806,
"y": 5.923686308384761
},
"nextControl": {
"x": 7.319631417040612,
"y": 3.8377154300604905
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 5.0,
"y": 1.12
},
"prevControl": {
"x": 8.97283311696253,
"y": 0.2231071082512538
"x": 1.2945574370576298,
"y": 5.521816553472107
},
"nextControl": null,
"isLocked": false,
Expand All @@ -55,11 +39,14 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 0,
"rotateFast": false
"rotation": 180.0,
"rotateFast": true
},
"reversed": false,
"folder": "Autonomous",
"previewStartingState": null,
"useDefaultConstraints": false
"previewStartingState": {
"rotation": -127.92965517984241,
"velocity": 0
},
"useDefaultConstraints": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,25 @@
"waypoints": [
{
"anchor": {
"x": 4.980663700146722,
"y": 0.9105123040299752
"x": 1.86729904765713,
"y": 5.477759506502913
},
"prevControl": null,
"nextControl": {
"x": 5.98066370014671,
"y": 0.9105123040299752
"x": 1.8085563183648736,
"y": 5.0371890368109895
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 7.242258777891271,
"y": 1.2335973151375008
"x": 2.3372408819951813,
"y": 4.376333332273105
},
"prevControl": {
"x": 6.586981820925471,
"y": 0.4782086008521783
},
"nextControl": {
"x": 8.299627905144566,
"y": 2.4525089479519377
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 7.021973543052633,
"y": 7.3722125261782985
},
"prevControl": {
"x": 7.947171529405674,
"y": 7.0638131973939515
"x": 1.6470138128111684,
"y": 4.670046978734387
},
"nextControl": null,
"isLocked": false,
Expand All @@ -55,8 +39,8 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 0,
"rotateFast": false
"rotation": 156.80060338532698,
"rotateFast": true
},
"reversed": false,
"folder": "Autonomous",
Expand Down
17 changes: 13 additions & 4 deletions src/main/java/org/rambots/Robot.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.rambots

import com.pathplanner.lib.commands.PathfindingCommand
import com.pathplanner.lib.pathfinding.Pathfinding
import edu.wpi.first.hal.FRCNetComm.tInstances
import edu.wpi.first.hal.FRCNetComm.tResourceType
Expand All @@ -13,6 +14,7 @@ import org.littletonrobotics.junction.Logger
import org.littletonrobotics.junction.networktables.NT4Publisher
import org.littletonrobotics.junction.wpilog.WPILOGReader
import org.littletonrobotics.junction.wpilog.WPILOGWriter
import org.rambots.subsystems.LightingSubsystem
import org.rambots.util.LocalADStarAK


Expand All @@ -30,13 +32,12 @@ object Robot : LoggedRobot() {

private var autonomousCommand: Command? = null


override fun robotInit() {
// Report the use of the Kotlin Language for "FRC Usage Report" statistics
HAL.report(tResourceType.kResourceType_Language, tInstances.kLanguage_Kotlin, 0, WPILibVersion.Version)


Pathfinding.setPathfinder(LocalADStarAK());
Pathfinding.setPathfinder(LocalADStarAK())
PathfindingCommand.warmupCommand().schedule()
// Record metadata
Logger.recordMetadata("ProjectName", BuildConstants.MAVEN_NAME);
Logger.recordMetadata("BuildDate", BuildConstants.BUILD_DATE);
Expand Down Expand Up @@ -76,18 +77,25 @@ object Robot : LoggedRobot() {
}



override fun robotPeriodic() {
CommandScheduler.getInstance().run()
}

override fun disabledInit() {

RobotContainer.unlockAllMotors()
LightingSubsystem.clearLL()
}

override fun disabledPeriodic() {

}

override fun disabledExit() {
RobotContainer.lockAllMotors()
LightingSubsystem.clearLL()
}

override fun autonomousInit() {
autonomousCommand = RobotContainer.autonomousCommand
autonomousCommand?.schedule()
Expand Down Expand Up @@ -122,4 +130,5 @@ object Robot : LoggedRobot() {
override fun simulationPeriodic() {

}

}
Loading

0 comments on commit bb6994e

Please sign in to comment.