Skip to content

Commit

Permalink
update interpolation data, tune shooter pid
Browse files Browse the repository at this point in the history
  • Loading branch information
Tmanxyz committed Aug 28, 2024
1 parent e67c851 commit 5c09508
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 63 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/stuypulse/robot/constants/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public interface FF {

public interface RIGHT {
public interface PID {
double kP = 0.000316711;
double kP = 0.0002;
double kI = 0;
double kD = 0.0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,67 @@ public static void main(String[] args) {

// RPM, distance (inches)
private static final double[][] RPMAndDistance = {
// fake data im just putting here so it doesnt crash lol
{3100,382},
{3100,292},
{3100,337},
{3100,337},
{3100,290},
{3100,300},
{3200,335},
{3200,349},
{3200,337},
{3200,339},
{3300,379},
{3300,384},
{3300,389},
{3300,373},
{3300,354},
{3500,389},
{3500,331},
{2500,238},
{2500,233},
{2500,259},
{2000,169},
{2500,288},
{2000,164},
{2000,191},
{1500,109},
{1500,109},
{1500,108},
{1500,105},
{1200,79},
{1200,82},
{1200,67},
{1200,69},
{1200,64},
{4000, 562},
{4000, 538},
{4000, 578},
{4000, 498},
{4000, 527},
{4000, 499},
{4000, 481},
{4000, 611},
{4000, 528},
{4000, 365},
{4000, 487},
{4000, 548},
{3800, 456},
{3800, 457},
{3800, 515},
{3800, 563},
{3800, 560},
{3800, 495},
{3600, 519},
{3600, 505},
{3600, 525},
{3600, 513},
{3600, 521},
{3600, 513},
{3600, 554},
{3600, 495},
{3400, 428},
{3400, 415},
{3400, 430},
{3400, 428},
{3400, 437},
{3200, 439},
{3200, 425},
{3200, 455},
{3200, 446},
{3200, 447},
{3200, 447},
{3000, 413},
{3000, 428},
{3000, 418},
{3000, 413},
{3000, 369},
{3000, 400},
{3000, 342},
{3000, 426},
{2600, 285},
{2600, 316},
{2600, 302},
{2600, 304},
{2600, 338},
{2600, 318},
{2200, 258},
{2200, 307},
{2200, 267},
{2200, 267},
{2200, 306},
{2200, 272},
{1500, 194},
{1500, 198},
{1500, 132},
{1500, 133},
};

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,88 @@ public static void main(String[] args) {

// RPM, distance (inches)
private static final double[][] RPMAndDistance = {
{1000, 55.5},
{1000, 42.5},
{1000, 57},
{1200, 73},
{2900, 295},
{2900, 265.5},
{2900, 279},
{2900, 289},
{3000, 306},
{3000, 317},
{3000, 311.5},
{3000, 324},
{3000, 303},
{3000, 300},
{3000, 303.5},
{3700, 437},
{3700, 447.5},
{3700, 419},
{3700, 416},
{3700, 400},
{3700, 381.5},
{3800, 410.5},
{3800, 441.25},
{3900, 457.5},
{3900, 427},
{4000, 476},
{4000, 435},
{4000, 439},
{4000, 551},
{4000, 573},
{4000,546 },
{4000, 566},
{4000, 579},
{4000, 458},
{4000, 533},
{3800, 561},
{3800, 499},
{3800, 576},
{3800, 517},
{3800, 497},
{3800, 522},
{3600, 456},
{3600, 516},
{3600, 465},
{3600, 422},
{3600, 542},
{3400, 435},
{3400, 467},
{3400, 496},
{3400, 461},
{3400, 470},
{3400, 448},
{3400, 516},
{3200, 433},
{3200, 456},
{3200, 447},
{3200, 406},
{3200, 424},
{3200, 454},
{3000, 414},
{3000, 388},
{3000, 389},
{3000, 392},
{3000, 405},
{3000, 400},
{3000, 430},
{2600, 316},
{2600, 354},
{2600, 339},
{2200, 288},
{2200, 241},
{2200, 268},
{2200, 218},
{2200, 210},
{1500, 145},
{1500, 145},
{1500, 136},
{1500, 184},
{1500, 178},
};
// private static final double[][] RPMAndDistance = {
// {1000, 55.5},
// {1000, 42.5},
// {1000, 57},
// {1200, 73},
// {2900, 295},
// {2900, 265.5},
// {2900, 279},
// {2900, 289},
// {3000, 306},
// {3000, 317},
// {3000, 311.5},
// {3000, 324},
// {3000, 303},
// {3000, 300},
// {3000, 303.5},
// {3700, 437},
// {3700, 447.5},
// {3700, 419},
// {3700, 416},
// {3700, 400},
// {3700, 381.5},
// {3800, 410.5},
// {3800, 441.25},
// {3900, 457.5},
// {3900, 427},
// {4000, 476},
// {4000, 435},
// {4000, 439},
// };

static {
interpolatingDoubleTreeMap = new InterpolatingDoubleTreeMap();
Expand Down

0 comments on commit 5c09508

Please sign in to comment.