フィルターのクリア

How can I change waypoints/path for pure pursuit algorithm with every iteration?

5 ビュー (過去 30 日間)
Dominika Krason
Dominika Krason 2021 年 12 月 12 日
回答済み: Sandip Kumar 2023 年 3 月 31 日
Hi,
I'm trying to modify this example:
https://www.mathworks.com/help/robotics/ug/path-following-for-differential-drive-robot.html
in a way that I won't have to use pre-established path coordinates.
My algorithm gives me the cooridnates of desired place (this scenario would be a moving marker) as x=d*sin(theta), y=d*cos(theta) where "d" is measured distance from the marker and theta is an angle between center of my camera and the marker. With evry iteration the coordiantes of the marker change as its changing positions, how can I write a matrix for waypoins/path that would change accordingly?
Thanks in advance for any help.
  1 件のコメント
Sandip Kumar
Sandip Kumar 2021 年 12 月 16 日
Have you tried updating the set of Waypoints specified to the controllerPurePursuit object?

サインインしてコメントする。

回答 (1 件)

Sandip Kumar
Sandip Kumar 2023 年 3 月 31 日
With an example showing how to change the Waypoints as you go.
%Create a controllerPurePursuit object.
pp = controllerPurePursuit;
% Assign waypoints.
pp.Waypoints = [0 0;1 1];
% Compute control commands using the pp object with the initial pose [x y theta] given as the input.
[v,w] = pp([0 0 0]);
% Now release the object, before updating/changing Waypoints.
release(pp);
% Change waypoints and compute the control commands again.
pp.Waypoints = [0 0; 1 1; 2 2];
[v, w] = pp([1 1 0]);

カテゴリ

Help Center および File ExchangeMATLAB Support Package for IP Cameras についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by