Skip to content

Commit

Permalink
fixed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Taimorioka committed Jan 15, 2025
1 parent 7414858 commit 15403bd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
Empty file.
22 changes: 0 additions & 22 deletions src/main/kotlin/com/frcteam3636/frc2025/Robot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ package com.frcteam3636.frc2025

import com.ctre.phoenix6.StatusSignal
import com.frcteam3636.frc2025.subsystems.drivetrain.Drivetrain
import com.frcteam3636.frc2025.subsystems.drivetrain.Drivetrain.Constants.BUMPER_LENGTH
import com.frcteam3636.frc2025.subsystems.drivetrain.Drivetrain.Constants.BUMPER_WIDTH
import com.frcteam3636.frc2025.subsystems.drivetrain.Drivetrain.Constants.TRACK_WIDTH
import com.frcteam3636.frc2025.subsystems.drivetrain.Drivetrain.Constants.WHEEL_BASE
import com.frcteam3636.frc2025.utils.Elastic
import com.frcteam3636.frc2025.utils.ElasticNotification
import com.frcteam3636.frc2025.utils.NotificationLevel
Expand All @@ -16,10 +12,6 @@ import com.frcteam3636.version.GIT_SHA
import edu.wpi.first.hal.FRCNetComm.tInstances
import edu.wpi.first.hal.FRCNetComm.tResourceType
import edu.wpi.first.hal.HAL
import edu.wpi.first.math.geometry.Pose2d
import edu.wpi.first.math.geometry.Rotation2d
import edu.wpi.first.math.geometry.Translation2d
import edu.wpi.first.math.system.plant.DCMotor
import edu.wpi.first.wpilibj.*
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard
import edu.wpi.first.wpilibj.util.WPILibVersion
Expand All @@ -29,11 +21,6 @@ import edu.wpi.first.wpilibj2.command.Commands
import edu.wpi.first.wpilibj2.command.button.CommandXboxController
import edu.wpi.first.wpilibj2.command.button.JoystickButton
import org.ironmaple.simulation.SimulatedArena
import org.ironmaple.simulation.drivesims.COTS
import org.ironmaple.simulation.drivesims.SwerveDriveSimulation
import org.ironmaple.simulation.drivesims.configs.DriveTrainSimulationConfig
import org.ironmaple.simulation.seasonspecific.reefscape2025.ReefscapeAlgaeOnField
import org.ironmaple.simulation.seasonspecific.reefscape2025.ReefscapeCoral
import org.littletonrobotics.junction.LogFileUtil
import org.littletonrobotics.junction.LoggedRobot
import org.littletonrobotics.junction.Logger
Expand Down Expand Up @@ -186,15 +173,6 @@ object Robot : LoggedRobot() {

}

fun displaySimFieldToAdvantageScope() {
if (Robot.model !== Robot.Model.SIMULATION) return

Logger.recordOutput("FieldSimulation/RobotPosition", Drivetrain.estimatedPose)
Logger.recordOutput(
"FieldSimulation/Notes", *SimulatedArena.getInstance().getGamePiecesArrayByType("Note")
)
}

override fun robotPeriodic() {
Dashboard.update()
Diagnostics.collect(statusSignals).reportAlerts()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,11 @@ class DrivingSparkMAX(val id: REVMotorControllerId) : DrivingMotor {
class SimSwerveModule(val sim: SwerveModuleSimulation) : SwerveModule {

private val driveMotor: SimulatedMotorController.GenericMotorController = sim.useGenericMotorControllerForDrive()
.withCurrentLimit(DRIVING_CURRENT_LIMIT)

// reference to the simulated turn motor
private val turnMotor: SimulatedMotorController.GenericMotorController = sim.useGenericControllerForSteer()
.withCurrentLimit(TURNING_CURRENT_LIMIT)

// TODO: figure out what the moment of inertia actually is and if it even matters
private val drivingFeedforward = SimpleMotorFeedforward(DRIVING_FF_GAINS_TALON)
Expand Down

0 comments on commit 15403bd

Please sign in to comment.