Go to the source code of this file.
Functions | |
| Plot C estimator and | matlab (x, y) data figure(1) |
| plot (xpos, ypos,'ok', xpos, ypos,'-b') | |
| plot (mX, mY,'-r') | |
| title ('Estimator postion output') | |
| legend ('C estimator', 'matlab estimator') | |
| quiver (xpos, ypos, cos(angle), sin(angle),'r') | |
| Plot C estimator and matlab angle and steering angle | figure (2) |
| subplot (3, 1, 1) | |
| title ('Truck angle') | |
| plot (time, angle,'r') | |
| plot (time, mAngle,'b') | |
| subplot (3, 1, 2) | |
| title ('Differential truck angle') | |
| plot (time, mAngleD,'b') | |
| legend ('matlab estimator') | |
| subplot (3, 1, 3) | |
| title ('Steering angle') | |
| plot (time, mSteeringAngle,'b') | |
| plot differential encoder forward movement and differential encoder turning | figure (3) |
| plot (time2, encFR_D,'-r') | |
| plot (time2, encFL_D,'-g') | |
| plot (time2, encBR_D,'-b') | |
| plot (time2, encBL_D,'-c') | |
| title ('Differential encoder data') | |
| legend ('front right','front left','back right', 'back left') | |
| plot (time2, encFR_D+encBR_D-encFL_D-encBL_D,'.b') | |
Variables | |
| Will load and plot test line cpp data file get input data from tab deliminated file | data = dlmread('line.dat','\t') |
| xpos = data(:,1) | |
| ypos = data(:,2) | |
| angle = data(:,3) | |
| encFR = data(:,4) | |
| encFL = data(:,5) | |
| encBR = data(:,6) | |
| encBL = data(:,7) | |
| irFR = data(:,8) | |
| irFL = data(:,9) | |
| len = length(xpos) | |
| time = [0:len-1] | |
| Use matlab estimator to calculate truck | states [mX, mY, mAngle, mAngleD, mSteeringAngle] = encEstimator(encFR,encFL,encBR,encBL) |
| hold | off |
| hold | on |
| Calculate differential encoder values | encFR_D = encFR(2:len) - encFR(1:len-1) |
| encFL_D = encFL(2:len) - encFL(1:len-1) | |
| encBR_D = encBR(2:len) - encBR(1:len-1) | |
| encBL_D = encBL(2:len) - encBL(1:len-1) | |
| time2 = [0:len-2] | |
|
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 7 of file lineplot.m. |
|
|
Definition at line 4 of file lineplot.m. |
|
|
Definition at line 11 of file lineplot.m. |
|
|
Definition at line 62 of file lineplot.m. |
|
|
Definition at line 10 of file lineplot.m. |
|
|
Definition at line 61 of file lineplot.m. |
|
|
Definition at line 9 of file lineplot.m. |
|
|
Definition at line 60 of file lineplot.m. |
|
|
Definition at line 8 of file lineplot.m. |
|
|
Definition at line 59 of file lineplot.m. |
|
|
Definition at line 13 of file lineplot.m. |
|
|
Definition at line 12 of file lineplot.m. |
|
|
Definition at line 15 of file lineplot.m. |
|
|
Definition at line 24 of file lineplot.m. |
|
|
Definition at line 26 of file lineplot.m. |
|
|
Definition at line 19 of file lineplot.m. |
|
|
Definition at line 16 of file lineplot.m. |
|
|
Definition at line 63 of file lineplot.m. |
|
|
Definition at line 5 of file lineplot.m. |
|
|
Definition at line 6 of file lineplot.m. |
1.4.4