%exampleHelperGazeboCleanupApplyForces
%   Cleans up the models added to Gazebo in the GazeboApplyForcesExample example.
%   Removes the two balls, the three doors, and the two extra TurtleBots
%
%   See also GazeboApplyForcesExample

%   Copyright 2014 The MathWorks, Inc.

% Remove the balls
try
    removeModel(gazebo,'ball');
catch
    disp('Error while removing ball');
end

try
    removeModel(gazebo,'ball_0');
catch
    disp('Error while removing ball_0');
end

% Remove the doors
try
    removeModel(gazebo,'hinged_door');
catch
    disp('Error while removing hinged_door');
end

try
    removeModel(gazebo,'hinged_door_0');
catch
    disp('Error while removing hinged_door_0');
end

try
    removeModel(gazebo,'hinged_door_1');
catch
    disp('Error while removing hinged_door_0');
end

% Remove the TurtleBots
try
    removeModel(gazebo,'turtlebot');
catch
    disp('Error while removing turtlebot');
end

try
    removeModel(gazebo,'turtlebot_0');
catch
    disp('Error while removing turtlebot');
end
