Where is the non-tunable property 'pStateSize' located in the TOMHT tracker?

3 次查看(过去 30 天)
Hello,
When I use the Matlab coder to create C++ code of the TOMHT tracker, an Error while checking for run-Time errors with Matlab Coder occurs. This error occurs at the line that calls the TOMHTtracker: tracks = tracker(detections,time), where tracker is a trackerTOMHT object.
The error says: Failed to compute constant value for nontunable property 'pStateSize'. In code generation, nontunable properties can only be assigned constant values.
We build our own IMM composed of a CVKF, CAKF and CTUKF. If we use any of these 3 filters instead of our IMM, their are no runtime errors found by the Matlab coder, so we must have made a mistake in the IMM. However, I cannot find the 'pStateSize' property anywhere. I was wondering if you could help me to solve this issue.
Thank you very much,
Joost

采纳的回答

Elad Kivelevitch
Elad Kivelevitch 2021-11-18
编辑:Elad Kivelevitch 2021-11-18
Hi,
I believe the error would be coming from matlabshared.tracking.internal.fusion.ObjectTrack. This is the internal object track object that is managed by the tracker for each target. What it means is that in code generation we could not figure out the state size of the object.
However, I am not sure why you would run into this issue in your code. This could be something we should fix.
Could you provide a little more information. What does your FilterInitializationFcn look like (maybe if you can attach that)?
And also, please let me know which MATLAB release you're currently using.
Thanks,
Elad
  7 个评论
Joost
Joost 2021-11-22
Hello Elad,
suddenly I am getting an error using the initukfimm2d function that you send me, when the Coder checks for run time errors. I do not understand why this error did not occur before, and it seems to have to do with the fact that the variable ind changes from a boolean to an array, which results in the run time error. This is the error:
Error using constvel2constturn (line 36)
Index exceeds array dimensions. Index value 4 exceeds valid range [1-1].
and this is line 34 - 36 of constvel2constturn:
ind = true;
if dims<3 % One of the models is not 3D
ind(1:2*dims) = true;
We had to change quite some files because we had to change the constvel2constturn file and give it a different name, and it seems to work. I was wondering if there is a more elegant fix for which we do not have to change so many files.
Kind regards,
Joost
Elad Kivelevitch
Elad Kivelevitch 2021-11-22
Hi Joost,
This seems like something we would like to take the time to look into.
To allow you to move forward, please consider adding your switchimm2D back to the IMM filter. The built-in switchimm function tries to handle multiple cases of 2D to 3D, 3D to 2D, 3D to 3D, etc. There might be a case that isn't supported fully and needs resolution.
Elad

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by