SImulink PurePursuit error; trajectory problem (Version:R2023a)

3 ビュー (過去 30 日間)
Joshua Tashbar
Joshua Tashbar 2023 年 10 月 14 日
回答済み: Remo Pillat 2023 年 11 月 30 日
Hi.
I'm getting an error with the PurePursuit simulink block.
The error is "Excepted waypoints to be an array with number of columns equal to 2"
I also attached a minimally working Simulink file (Version:R2023a).
Thank you
Josh
  1 件のコメント
Walter Roberson
Walter Roberson 2023 年 10 月 14 日
This does not appear to be using the Mathworks Robotics System Toolbox; it appears to be using the Peter Corke Robotics Toolbox. Peter Corke's toolbox is well respected for robotics work, but it is a third-party toolbox.

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

採用された回答

Remo Pillat
Remo Pillat 2023 年 11 月 30 日
Hi Joshua,
There are two problems with your current model
  1. The "trajectory" block from Peter Corke's toolbox will output a waypoint as a 1-D vector (column vector internally). To get it into the [Nx2] format that Aishwarya mentioned, you need to add a "Transpose" block between the "trajectory" and the "Pure Pursuit" block.
  2. The "trajectory" block from Peter Corke's toolbox only give you the waypoint at the time instant of the Simulink simulation, not the whole trajectory (the output will always be 1x2). For the "Pure Pursuit" block to work correctly, you need to provide a full trajectory, i.e. multiple waypoints in an Nx2 matrix. I suggest you just create your own trajectory with a MATLAB Function block or an Interpreted MATLAB Fcn block. You can probably call the trajectory tools in Peter's toolbox directly in MATLAB.

その他の回答 (1 件)

Aishwarya
Aishwarya 2023 年 10 月 25 日
Hi Joshua,
As per my understanding, you are facing error in your Simulink model which points that waypoints are not in correct dimension as required by the ‘Pure Pursuit’ block.
Below are some suggestions that can help resolve the error:
  • Ensure that the ‘waypoints’ input to the ‘Pure Pursuit’ block is an n-by-2 array of [x y] pairs, where ‘n’ is number of waypoints.
  • The waypoints can be specified as an array in Simulink.
Please refer to below MathWorks documentation for more details on ‘Pure pursuit’ block:
I hope this helps.

カテゴリ

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

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by