MATLAB Answers

MultiObjectTracker in For Each Subsystem block, Simulink

1 view (last 30 days)
Johan Fanas
Johan Fanas on 25 Jan 2021
Commented: Johan Fanas on 5 Feb 2021
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 Comments
Johan Fanas
Johan Fanas on 5 Feb 2021
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

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!