matlab simulink code generation error

We had created a inverse kinematic model of kinova robotic model in simulink and it was simulating without error. But when we tried to generate the code for the simulink mode we were getting the below error stating to modify the "joint.m" file. It is a system function of simulink model where we were not able to modify it. we had attached a screen shot where the sytem is asking to modify the joint.m file. Code generation is very crucial for our project. So please help us to solv the error.
Simulink detected an error 'Declaration of upper bound size as Inf is not supported. Please consider enabling dynamic memory allocation to allow unbounded sizes.'. The error occurred for MATLAB System block 'sairam_generated_kinovaa_ik/Inverse Kinematics/MATLAB System'. See line 149, column 13 in file 'C:\Program Files\MATLAB\R2018b\toolbox\robotics\robotmanip\+robotics\Joint.m'. The error was detected during code generation phase. Start code generation report. To prevent this error, modify the System object to avoid code that does not support code generation.

댓글 수: 3

Walter Roberson
Walter Roberson 2019년 3월 24일
Enable dynamic memory allocation. You need dynamic memory allocation to be able to handle indefinite size arrays, as those have to go on the heap (the stack is used for fixed size variables.)
Jonas
Jonas 2021년 6월 30일
I have pretty much the same issue. Where am I supposed to change that exactly?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

질문:

2019년 3월 24일

댓글:

2021년 6월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by