66
77import org .math .plot .Plot2DPanel ;
88
9- import extra .GoodGraphing ;
10- import paths .FastPathPlanner ;
11- import paths .MotionPath ;
12- import paths .Point ;
13- import paths .Position ;
14- import paths .Util ;
9+ import scadlib . extra .GoodGraphing ;
10+ import scadlib . paths .FastPathPlanner ;
11+ import scadlib . paths .MotionPath ;
12+ import scadlib . paths .Point ;
13+ import scadlib . paths .Position ;
14+ import scadlib . paths .Util ;
1515
1616/**
1717 * Overarching class to run various paths.
@@ -48,18 +48,19 @@ public static void main(String[] args) {
4848 figure .yGridOn ();
4949 figure .setYLabel ("Y (inches)" );
5050 figure .setXLabel ("X (inches)" );
51- double width = 648 , height = 324.5 ;
52- double robotWidth = 22 ;
53- double robotLength = 32 ;
54- figure .setXTic (0 , width , 12 );
55- figure .setYTic (0 , height , 12 );
56- // Add the close switch
57- // 38.719 is length of switch
51+ double width = 648 ;
52+ double height = 324.5 ;
53+ double robotWidth = 25.75 ;
54+ double robotLength = 37.25 ;
5855 double switchLength = 38.719 ;
5956 double distanceToSwitchFromWall = 85.25 ;
6057 double distanceToSwitchFromAlliance = 140 ;
6158 double delta = 10 ;
6259 double widthOfSwitch = 56 ;
60+ figure .setXTic (0 , width , 12 );
61+ figure .setYTic (0 , height , 12 );
62+ // Add the close switch
63+ // 38.719 is length of switch
6364 figure .addData (new double [][]{
6465 {distanceToSwitchFromAlliance , distanceToSwitchFromWall },
6566 {distanceToSwitchFromAlliance , height -distanceToSwitchFromWall },
@@ -110,6 +111,8 @@ public static void main(String[] args) {
110111 figure .addData (fpp .leftPath , Color .red );
111112 figure .addData (fpp .rightPath , Color .green );
112113
114+
115+
113116 GoodGraphing fig = new GoodGraphing (fpp .smoothCenterVelocity , null , Color .blue );
114117 fig .yGridOn ();
115118 fig .xGridOn ();
@@ -119,6 +122,14 @@ public static void main(String[] args) {
119122 fig .addData (fpp .smoothLeftVelocity , Color .red );
120123 fig .addData (fpp .smoothRightVelocity , Color .green );
121124
125+ double [][] leftV = fpp .smoothLeftVelocity ;
126+ double [][] rightV = fpp .smoothRightVelocity ;
127+
128+ for (int i = 0 ; i < leftV .length ; i ++) {
129+ System .out .print (leftV [i ][0 ]);
130+ System .out .println (", " +leftV [i ][1 ]);
131+ }
132+
122133 GoodGraphing pos = new GoodGraphing (fpp .nodeOnlyPath , Color .blue , Color .green );
123134 pos .yGridOn ();
124135 pos .xGridOn ();
0 commit comments