[Content_Types].xml
_rels/.rels
matlab/document.xml
matlab/output.xml
metadata/coreProperties.xml
metadata/mwcoreProperties.xml
metadata/mwcorePropertiesExtension.xml
metadata/mwcorePropertiesReleaseInfo.xml
dt = 0.1;
x0 = [0;0];
goal = [5;5];
kmax = 100; % max time steps
thres = 0.1;
obstacle = [2;3];
dmin = 2; Single Integrator x = x0;
xlist = [x];
% For plotting
figure(1);clf;hold on;axis([-10 10 -10 10])
robot.handle = plot(x(1),x(2),’o’,’linewidth’,3,’color’,’r’,’markersize’,20);
traj.handle = plot(xlist(1,:), xlist(2,:),’k’);
set(robot.handle,’XDataSource’,’x(1)’);
set(robot.handle,’YDataSource’,’x(2)’);
set(traj.handle,’XDataSource’,’xlist(1,:)’);
set(traj.handle,’YDataSource’,’xlist(2,:)’);
% Set up controller
k = [3 0;0 1];
u = @(x) k*(goal-x); % Proportional control
% Simulation
for k = 1:kmax
x = single_integrator(x, u(x), dt);
refreshdata([robot.handle],’caller’);
axis([-10 10 -10 10])
if norm(x-goal)