Skip to content

Commit

Permalink
roadrunner finished
Browse files Browse the repository at this point in the history
  • Loading branch information
arunaassijaqa committed Nov 17, 2024
1 parent 180f942 commit 8799bd0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object DriveConstants {
var WHEEL_RADIUS = 1.88976 // in`
var GEAR_RATIO = 1.0 // output (wheel) speed / input (motor) speed
@JvmField
var TRACK_WIDTH = 15.5 // in
var TRACK_WIDTH = 13.94 // in

/*
* These are the feedforward parameters used to model the drive motor behavior. If you are using
Expand All @@ -56,11 +56,11 @@ object DriveConstants {
* empirically tuned.
*/
@JvmField
var kV = 0.0123
var kV = 0.0144
@JvmField
var kA = 0.003
var kA = 0.0015
@JvmField
var kStatic = 0.01
var kStatic = 0.012

/*
* These values are used to generate the trajectories for you robot. To ensure proper operation,
Expand Down Expand Up @@ -90,9 +90,13 @@ object DriveConstants {
* You are free to raise this on your own if you would like. It is best determined through experimentation.
*/
@JvmField
var MAX_VEL = 30.0
@JvmField
var MAX_ACCEL = 30.0
var MAX_ANG_VEL = Math.toRadians(180.0)
@JvmField
var MAX_ANG_VEL = Math.toRadians(170.0)
@JvmField
var MAX_ANG_ACCEL = Math.toRadians(170.0)
fun encoderTicksToInches(ticks: Double): Double {
return WHEEL_RADIUS * 2 * Math.PI * GEAR_RATIO * ticks / TICKS_PER_REV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ class StandardTrackingWheelLocalizer(hardwareMap: HardwareMap) : ThreeTrackingWh
val GEAR_RATIO = 1.0 // output (wheel) speed / input (encoder) speed

@JvmField
var LATERAL_DISTANCE = 15.153260857569071 // in; distance between the left and right wheels
var LATERAL_DISTANCE = 15.45 // in; distance between the left and right wheels

@JvmField
var FORWARD_OFFSET = -2.1 // in; offset of the lateral wheel

@JvmField
var X_MULTIPLIER = 0.9944039016245 // Multiplier in the X direction
@JvmField
var Y_MULTIPLIER = 0.99960646480333// Multiplier in the Y direction
fun encoderTicksToInches(ticks: Double): Double {
return WHEEL_RADIUS * 2 * Math.PI * GEAR_RATIO * ticks / TICKS_PER_REV
Expand Down

0 comments on commit 8799bd0

Please sign in to comment.