MultiObjectTracker in For Each Subsystem block, Simulink

Hi,
I am trying to use the MultiObjectTracker block with data coming from ROS nodes in Simulink. The message subscribed to contains a list of objects and I am trying to put the data in the correct Bus format and feed it to the MultiObjectTracker block, but I keep getting an error that the MultiObjectTracker cannot be used in a For Loop and it suggets that I should use 'supportsMultipleInstanceImpl'. I am not really sure what this does and how to use it. In the documentation it says it returns a flags equals to true, but I don't know how that is going to help me use the MultiObjectTracker. Here is a screenshot of the error.
Any suggestions on how to fix this issue or another approach I should take to use the MultiObjectTracker block with data coming from ROS nodes.

2 件のコメント

Prashant Arora
Prashant Arora 2021 年 2 月 5 日
Hi Johan,
Can you please clarify your use-case a little more? The For-each subsystem is intended to loop over each element of the input.
For Multi-Object Tracker you typically pass the entire list of object detections (in bus format defined here) at current time to the tracker block. You don't need to loop over the elements of the bus.
Thanks,
Prashant
Johan Fanas
Johan Fanas 2021 年 2 月 5 日
Hi Prashant,
I fixed my issue a few days ago, but thanks. I did same as you stated. I was trying to iterate through the detection because I had to format the data coming from the sensors so the Multi Object tracker doesn't give me an error. For example, ObstableID, Measurement, MeasurementParameters, etc. I fixed it by iterating through the data (while maintaining the tracker outside the for loop) and then feeding the data.
Thanks,
Johan

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangePublishers and Subscribers についてさらに検索

質問済み:

2021 年 1 月 25 日

コメント済み:

2021 年 2 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by