File Exchange

## Backer-Upper Truck Simulator with Fuzzy Control

version 1.0.0.0 (31.7 KB) by
Struct to create truck and a dock object and simulate with keyboard arrows

1 Download

Updated 24 Mar 2016

View License

Struct to create truck and a dock object and simulate with keyboard arrows.
truck.m: Handle object that simulates a truck with a cabin and a truck.
dock.m: Handle object that simulates a dock.
logic.m: Creates a fuzzy logic control for this problem (see the file for more information of how to use other fuzzy files)
Example:
d = dock([17,50],0);
d.minDistance = 3;
d.minOrientation = 45;
t = truck(d.position+[20 0]);
t.supressWarnings = 1;
h = t.plot('','','','hold');
d.plot(h,'','plotPoint','hold');
while ishandle(h) && ~strcmp(t.lastPressedKey, 'escape')
t.move; % this enables user to control the truck with keyboard arrows (spacebar resets steering)
h = t.plot('next','b','','hold');
if d.docked(t,'message'), break, end
pause(.001);
end
See html file for more help.
See example_simulation.m for more examples that uses fuzzy logic control.

Attention: if the response speed is slow with MATLAB 2016a, try using MATLAB 2015b.

### Cite As

Fernando Freitas Alves (2020). Backer-Upper Truck Simulator with Fuzzy Control (https://www.mathworks.com/matlabcentral/fileexchange/56135-backer-upper-truck-simulator-with-fuzzy-control), MATLAB Central File Exchange. Retrieved .

### Comments and Ratings (2)

André Coelho

After some tweaking, I could spot the changes needed to make the toolbox work again with Fuzzy Logic toolbox Version 2.6 (Matlab 2019b). No warnings and no errors are now issued. The corrections to be made are confined only to scripts 'logic.m' and 'fuzzyIO.m'.

André Coelho

Unfortunately, it is not working properly with the new version of the Fuzzy Logic toolbox. Will it be updated?

### Updates

 24 Mar 2016 1.0.0.0 Update description.
##### MATLAB Release Compatibility
Created with R2015b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux
##### Acknowledgements

Inspired by: tightfig(hfig)