Clear Filters
Clear Filters

How do I use the Track Designer?

4 views (last 30 days)
I found this entry on File Exchange called Track Designer, and I want to use it, but I am not sure where to start. How is this code used?

Accepted Answer

MathWorks Student Competitions Team
Edited: MathWorks Student Competitions Team on 22 May 2017
This File Exchange entry contains a MATLAB App, which can be installed by double-clicking on the *.mlappinstall file that is downloaded from File Exchange, and following the on-screen prompts. Once the App is installed, you should have a new icon in the APPS tab of the Toolstrip.
When you click on this icon, an App will open. This App allows for you to design a custom track of your own design, by laying out track pieces, one at a time.
After you have created the track that you want, you can save that track, using the button that reads "Save", or using the floppy disk icon in the top left corner of the App. This will save two files on your computer:
  • [TrackName].slx
  • [TrackName].wrl
The .slx file contains Simscape Multibody blocks defining the track, and the .wrl file contains a virtual World (VRML) representation of the track. These two files must stay together in the same folder.
The App also installs a Simulink Library, nxpcup_physmodlib:
Which contains a plant model for the NXP Cup car, and some other blocks as well. To help get you started, the app also installs a Simulink model, SimulationMainModel:
which shows one way you can use the plant model to develop a controller. If you double-click on the "NXP Cup Car" block, a dialog will open:
You can click on the "Browse..." button to choose a virtual world file you created with the Track Builder app. Once you select your track, you can run the simulation by clicking on the green play button, which will start the simulation and show how your controller handles on the track you specified.

More Answers (0)

Categories

Find more on Simulation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!