No BSD License  

Highlights from
Framework for differential steering vehicle

image thumbnail
from Framework for differential steering vehicle by Paolo Di Prodi
A framework for a differential steering vehicle controlled by a PID system tuned with a genetic algo

position=deadReckonAcceleration(ar,al,vr,vl,t,b)
%% Author: epokh
%% Website: www.epokh.org/drupy
%% This software is under GPL

function position=deadReckonAcceleration(ar,al,vr,vl,t,b)
%%given the ar=right accelerationt
%% al=left acceleration
%% sr=space run for the right wheel
%% sl=space run for the left wheel
%%use ODE to calculate the final position
global A;
global B;
global C;
global D;
global theta0;


vr=ar*t+vr;
vl=al*t+vl;


A=(ar+al)/2;

B=(vr+vl)/2;

C=(ar-al)/(2*b);

D=(vr-vl)/b;

theta=C*t^2+D*t+theta0;
%% Keep attention here, the Ode solver must be optimized!
[tx,x]=ode45(@dxdtOde,[0 t],0);
[ty,y]=ode45(@dydtOde,tx,0);
position=[x(end),y(end),theta];

end

Contact us at files@mathworks.com