MultiObjectTracker in For Each Subsystem block, Simulink

6 visualizaciones (últimos 30 días)
Johan Fanas
Johan Fanas el 25 de En. de 2021
Comentada: Johan Fanas el 5 de Feb. de 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 comentarios
Prashant Arora
Prashant Arora el 5 de Feb. de 2021
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 el 5 de Feb. de 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

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Publishers and Subscribers en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by