MatCarAnim
This toolbox provides several functions and *.m-files to animate single or multi-unit car (or tractor / trucks - trailer) combinations with given trajectories of their center of gravity movements.
Exemplary usage:
% Installation: add the toolbox-functions to the MATLAB search paths
addpathMatCarAnim;
% Create new CarAnim-Struct
carAnim = newCarAnim('name','CarAnim_Test');
% Create an Animation-Window
carAnim = createAnimWindow(carAnim);
% New Car-unit: Tractor
[carAnim id1] = newCarUnit(carAnim);
(... Calc Simulation Results --> trajectories ...)
for idxPlot=1:length(psi_1)
% Update position (Trafo etc.) and draw it
carAnim = updateCarUnitStruct(carAnim,id1,'r_cg',r_1(:,idxPlot), ...
'psi',psi_1(idxPlot));
% Redraw object
redrawCarAnim(carAnim);
pause(0.05) % show the user the current figure
end
Cite As
Johannes (2023). MatCarAnim (https://www.mathworks.com/matlabcentral/fileexchange/67720-matcaranim), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Robotics and Autonomous Systems > Robotics System Toolbox > Coordinate Transformations and Trajectories >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
CarUnit/
examples/
Version | Published | Release Notes | |
---|---|---|---|
1.0 |
update image
|
|