%==================================================================================== function hwk7 %==================================================================================== global ROBOT_V ODOM_DT; ROBOT_V = 5; ODOM_DT = 0.1; % Construct nice figure close all, figure, axis([0 200 0 150]), axis equal, axis manual, hold on; numObstacles = 0; % Get the obstacle positions % This loop will terminate when the user center/right clicks the mouse while 1 [x, y, button]=ginput(1); if button~=1 break; end numObstacles=numObstacles+1; oX(numObstacles)=x; oY(numObstacles)=y; h2 = plot(oX, oY, 'ro'); set(h2,'linewidth',2.5); drawnow; end % Get robot position [rX, rY, button]=ginput(1); % Get the goal position [goal(1), goal(2), button]=ginput(1); % Add your code here