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

vect_vel=curve(initial_pos,final_pos,b,time)
%% Author: epokh
%% Website: www.epokh.org/drupy
%% This software is under GPL

function vect_vel=curve(initial_pos,final_pos,b,time)
%%This function compute the kinematics for a turn
%% giving the initial position (including the heading)
%% and the final position (including the heading) of the robot
%% using the Tom Brown approssimation
x0=initial_pos(1);
y0=initial_pos(2);
theta0=initial_pos(3);
x1=final_pos(1);
y1=final_pos(2);
theta1=final_pos(3);
%% ss=(sr+sl)/2
%% sm=(sr-sl)/2
if(theta1==0)
    ss=(x1-x0);
else
    ss=(y1-y0)/sin(theta1);
end

sm=(theta1-theta0)*b;
sr=ss+sm;
sl=ss-sm;

vr=sr/time;
vl=sl/time;

vect_vel=[vl,vr];

end%%end function

Contact us at files@mathworks.com