I am using the Dubins connection object to find the shortest path, but it seems like it's not the shortest path.

10 ビュー (過去 30 日間)
yeunjoo
yeunjoo 2024 年 3 月 6 日
回答済み: Milan Bansal 2024 年 3 月 28 日 6:31
I am using the code below because I want to find the shortest path for the LRL mode. Therefore, I have included all other modes except LRL in disablepathtype.
dubConnObj = dubinsConnection;
startPose = [4.61 2.43 deg2rad(20.0)];
goalPose = [5.45 10.55 deg2rad(80.0)];
dubConnObj = dubinsConnection('DisabledPathTypes',{'RLR', 'LSL', 'LSR', 'RSL', 'RSR'});
dubConnObj.MinTurningRadius = 2.5;
[pathSegObj, pathCosts] = connect(dubConnObj,startPose,goalPose);
show(pathSegObj{1})
However, the LRL path displayed by MATLAB does not seem to be the shortest path.
The orange line represents the path shown by MATLAB. Yet, if I follow the LRL path along another circle (the black circle) that simultaneously touches the two circles tangent to the starting and ending points, the distance seems shorter.
I'm wondering if the MATLAB code is not considering this, or if there are other parameters involved. Thank you!
  2 件のコメント
Manikanta Aditya
Manikanta Aditya 2024 年 3 月 6 日
Hi, Try checking this.
dubConnObj = dubinsConnection;
startPose = [4.61 2.43 deg2rad(20.0)];
goalPose = [5.45 10.55 deg2rad(80.0)];
dubConnObj.MinTurningRadius = 2.5;
[pathSegObj, pathCosts] = connect(dubConnObj,startPose,goalPose);
show(pathSegObj{1})
yeunjoo
yeunjoo 2024 年 3 月 6 日
編集済み: yeunjoo 2024 年 3 月 6 日
Thank you for the response. However, I know that the LSR mode is the shortest path for these start and end positions. But what I want is the shortest path in the LRL mode.

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

回答 (1 件)

Milan Bansal
Milan Bansal 2024 年 3 月 28 日 6:31
Hi Yeunjoo
I understand that you have plotted the shortest path in LRL (left-right-left) mode using "dubinsConnection" but you are not sure if the plotted path is the shortest or not and if there is an alternate path possible.
The "dubinsConnection" object in MATLAB is designed to compute the shortest path between two poses (positions and orientations) for a Dubins vehicle, given its minimum turning radius constraint. A Dubins vehicle is one that moves forward at a constant speed, can turn with a minimum radius, but cannot move backwards. In this particular problem, the directions of the path is also fixed.
There are three constraints to the problem:
1.) Left-Right-Left (LRL mode) 2.) Minimum radius 3.) Poses
The path along the black circle is not possible, as it must be violating one of these constraints. Therefore, the path drawn by MATLAB is the shortest path between the start and goal points.
However, if you wish to further reduce the length of the path, try reducing the minimum radius constraint. Please refer to the code snippet below.
% Initialize the Dubins connection object with disabled path types except LRL
dubConnObj = dubinsConnection('DisabledPathTypes', {'RLR', 'LSL', 'LSR', 'RSL', 'RSR'});
% Set the minimum turning radius for the Dubins paths
dubConnObj.MinTurningRadius = 1.75;
% Define the start and goal poses [x, y, theta]
startPose = [4.61 2.43 deg2rad(20.0)];
goalPose = [5.45 10.55 deg2rad(80.0)];
% Find the shortest path and its cost
[pathSegObj, pathCosts] = connect(dubConnObj, startPose, goalPose);
% Display the path
show(pathSegObj{1});
Please refer to the following documentation link to learn more about "dubinsConnection" object.
Please refer to the following documentation link to learn more about "connect" function.
Hope this helps!

カテゴリ

Help Center および File ExchangeMotion Planning についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by