Code Generation error, Unrecognized parameter name: 'StateTransitionModel'.

I am trying to generate code with the MATLAB Coder Toolbox. I am using the trackingKF from the Automated Driving System Toolbox. The code is from this tutorial: Track Multiple Vehicles Using a Camera in the initBboxFilter method. I've slightly edited it to take in a bbox instead of an objectDetection. I get passed all the code checks, but when generating I get the error Unrecognized parameter name: 'StateTransitionModel'. The documentation mentions this limitation if it will help resolve the issue:
When you create a trackingKF object, and you specify a value other than Custom for the MotionModel value, you must specify the state vector explicitly at construction time using the State property. The choice of motion model determines the size of the state vector but does not specify the data type, for example, double precision or single precision. Both size and data type are required for code generation.

 采纳的回答

Hi Hien,
I have been able to reproduce the issue that you were seeing. There is a simple workaround that I can recommend. Instead of:
trackingKF('StateTransitionModel', A, 'MeasurementModel', H, ...)
where ... represents the other parameters you would like to set on construction,
Use:
trackingKF(A,H,...)
Please let me know if you encounter any problem after applying this solution.
Thanks,
Elad

4 个评论

I did the suggested and get the error "Inner dimensions must agree. Generated code for a general matrix multiplication at this call site. If this should have been a scalar times a variable-size matrix, the scalar input must be fixed-size." Here are the variable types I see in the variables tab: A: 8x8 double H: 4x8 double state: 8x1 double stateCov = 8x8 double MeasurementNoise = 4x4 double Q = 8x8 double
edit: I modified the initBboxFilter to take in a bbox not realizing that it has to take in an objectDetection. Will update if I run into more issues. Thanks!
I have reverted the function to how it is in the tutorial. I am still encountering the inner dimensions must agree error. It is accompanied by the Function call failed. Both are on the trackingKF constructor.
Hi Hien,
I will reply to the new thread you opened.
Thanks, Elad

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by