Mobile robot tracking behavior in XY graph

I'm trying to mimic the travel path of a robot in an XY graph on simulink and trying to enter a desired trajectory block in matlab using just XY dimensions but I'm unsure how to go about that.
I'm also trying to place obstacles on the XY graph using a simulink block with the desired obstacle location in the X and Y plane.

Réponses (1)

Sam Chak
Sam Chak le 27 Août 2022
Modifié(e) : Sam Chak le 28 Août 2022
You can try generating the Cubic Polynomial Trajectory. Check this example and see if it is good enough or suitable for your case.
Edit: To suggest using the sawtooth function to generate the triangular path for the mobile robot to track.
p = 40; % period of a triangle wave
T = 1.5*p; % 1.5 periods of a triangle wave
fs = 1000; % sample rate
t = 0:1/fs:T-1/fs;
sTr = sawtooth(2*pi/p*t, 0.5); % standard triangle wave
aTr = 10*(sTr + 1) + 2; % augmented triangle wave
plot(t, aTr)
grid on, ylim([0 25]), xlabel('x-axis'), ylabel('y-axis')
title('Desired trajectory for the Mobile Robot to follow')

3 commentaires

T.R.O
T.R.O le 27 Août 2022
Hi Sam I was looking to make trajectory plans such as this. Please let me know if yiu have any information on how I'll be able to simulate such using simulink. The blue path is the desired trajectory and the red path is robot’s trajectory.
thank you
Sam Chak
Sam Chak le 28 Août 2022
Hi @T.R.O, I have edited my Answer to show you how to design the triangle wave-like trajectory.
T.R.O
T.R.O le 28 Août 2022
Thank you so much Sam. Very helpful.
The only other question I had was how to add obstacles in the XY plot in simulink like the picture shown below.
Thanks again

Connectez-vous pour commenter.

Catégories

Question posée :

le 27 Août 2022

Commenté :

le 28 Août 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by