DoF-6413 / chargedUp

Code base for 2023 season DOF
MIT License
3 stars 1 forks source link

Explore Simulation Setup #40

Closed El1zabethS closed 1 year ago

El1zabethS commented 1 year ago

Research and document everything needed for simulation setup.

El1zabethS commented 1 year ago

https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/robot-simulation/index.html

El1zabethS commented 1 year ago
El1zabethS commented 1 year ago

DifferentialDrivetrainSim requires LinearSystem<N2, N2, N2> which requires drivetrainPlant, driveMotor, double gearing, double trackWidthMeters, double wheelRadiusMeters, measurementStdDevs. These values are found with the robot characterization tool.

Value guide: driveMotor - A DCMotor representing the drivetrain. gearing - The gearingRatio ratio of the robot, as output over input. This must be the same ratio as the ratio used to identify or create the drivetrainPlant. trackWidthMeters - The distance between the two sides of the drivetrian. Can be found with SysId. wheelRadiusMeters - The radius of the wheels on the drivetrain, in meters. measurementStdDevs - Standard deviations for measurements, in the form [x, y, heading, left velocity, right velocity, left distance, right distance]ᵀ. Can be null if no noise is desired. Gyro standard deviations of 0.0001 radians, velocity standard deviations of 0.05 m/s, and position measurement standard deviations of 0.005 meters are a reasonable starting point.

El1zabethS commented 1 year ago

https://github.com/ligerbots/InfiniteRecharge2020/blob/infiniteSimulator/src/main/java/frc/robot/simulation/SparkMaxWrapper.java

El1zabethS commented 1 year ago

https://github.com/fletch3555/SparkMaxSim-java/tree/master/src/main/java/net/thefletcher/revrobotics

El1zabethS commented 1 year ago
  1. Declare and Define Drivetrain and Encodes in Simulation
  2. Create a Simulation Function that sets motor inputs
El1zabethS commented 1 year ago

https://github.com/Mechanical-Advantage/RobotCode2022

El1zabethS commented 1 year ago

https://www.chiefdelphi.com/t/simulation-for-development/420264