Why do I get an error of dimensionality when working with multi-object tracker and Detection Concatenation

조회 수: 7 (최근 30일)
Hello,
I'm new to automated driving toolbox and driving scenario designer. I was attempting to create a simple scenario using the scenario designer and then exporting the sensor (RADAR and Camera) and scenario as a simulink model.
To the simulink model (scenario reader and the sensor generator), I tried adding a Detection concatenation block and passing its output to the multi-object tracker. I encountered an error which is attached with this query along with the sample scenario and the simulink model.
-------------------------------------------------------------------
Error:
Caused by: Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'.
Component:Simulink | Category:Model error
An error occurred while propagating data type 'double' from 'Sample_model_Multi_Object/Digital Clock', output port 1.
Component:Simulink | Category:Model error
------------------------------------------
I would highly appreciate if anyone could help me understand what I'm doing wrong and how I can resolve this issue. Also any additional reading material on these toolboxes would be great.
Kindly Note: I was refering to the Tracking and Sensor fusion chapter on https://in.mathworks.com/help/driving/ug/adaptive-cruise-control-with-sensor-fusion.html
Thank you.

답변 (1개)

Akshat Dalal
Akshat Dalal 2023년 9월 4일
Hello Aasish,
I understand you are having some trouble while working with Multi-Object Tracker and Detection Concatenation Blocks from the Automated Driving Toolbox.
I went through your model and observed that you are using “initcvkf” function as the Filter initialization function for the Multi-Object Tracker block. After some debugging, I found that the error originates in this function. The function expects as input, an object of class “objectDetection” that must contain position information in either 1, 2, or 3 dimensions. However, your model passes an object with position information in 6 dimensions leading to an error. You could try debugging this behaviour.
I was able to resolve the errors in your model by referring to solution mentioned in the above question. The solution refers to the following example - https://in.mathworks.com/help/releases/R2021b/driving/ug/sensor-fusion-using-synthetic-radar-and-vision-data-in-simulink.html
I replaced the Filter initialization function for your Multi-Object Tracker block with the helperInitSimulinkDemoFilter function used in the example and reducing the Sample time of the Digital Clock in your model to 0.01.
To read more about these blocks, please refer the following documentation -
  1. https://in.mathworks.com/help/releases/R2021b/driving/ref/detectionconcatenation.html
  2. https://in.mathworks.com/help/releases/R2021b/driving/ref/multiobjecttracker.html
To read more about Linear Kalman Filters for Object Tracking, please refer the following documentation –
  1. https://in.mathworks.com/help/releases/R2021b/fusion/ref/trackingkf.html
  2. https://in.mathworks.com/help/releases/R2021b/driving/ref/initcvkf.html

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by