interpolate
説明
例
複数のウェイポイントに基づいた navPath の作成
Dubins 空間で、複数のウェイポイントに基づいて navPath
オブジェクトを作成します。
dubinsSpace = stateSpaceDubins([0 25; 0 25; -pi pi])
dubinsSpace = stateSpaceDubins with properties: SE2 Properties Name: 'SE2 Dubins' StateBounds: [3x2 double] NumStateVariables: 3 Dubins Vehicle Properties MinTurningRadius: 1
pathobj = navPath(dubinsSpace)
pathobj = navPath with properties: StateSpace: [1x1 stateSpaceDubins] States: [0x3 double] NumStates: 0
waypoints = [8 10 pi/2; 7 14 pi/4; 10 17 pi/2; 10 10 -pi]; append(pathobj,waypoints)
ちょうど 250 個の点が含まれるよう、そのパスに内挿を行います。
interpolate(pathobj,250)
内挿されたパスと元のウェイポイントを可視化します。
figure grid on axis equal hold on plot(pathobj.States(:,1),pathobj.States(:,2),".b") plot(waypoints(:,1),waypoints(:,2),"*r","MarkerSize",10)
パスの長さを計算します。
len = pathLength(pathobj);
disp("Path length = " + num2str(len))
Path length = 19.4722
入力引数
pathObj
— 制御パス オブジェクト
navControlPath
オブジェクト
制御パス。navPathControl
オブジェクトとして指定します。
データ型: double
バージョン履歴
R2021b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)