Why constant value cannot be changed real time in deployment while using ROS2 toolbox and external mod?

5 Ansichten (letzte 30 Tage)
hey all, I'm trying to deploy the following model on a ROS2 device.
The issue is, as I try to change the values during deployment in the blocks named "cmd_lin" & "cmd_ang" by using knob blocks it doesn't allow me to. The values in the blocks cannot be changed. I face the following errors in the diagnostic viewer.
However, earlier I've been able to change values real time during deployment on the same ROS2 device with the following model which is not much different from the model where I'm facing issue. Nothing is changed vastly between the two models.
When I change values successfully in the model above the diagnostic viewer shows like that:
Also on the command window it shows:
It doesn't show like that on command window when the issue occurs. As far as I can recall I'm not missing any crucial steps as in setup or something that I had done when deploying the model where the issue didn't occur.

Akzeptierte Antwort

Ahmed
Ahmed am 15 Jun. 2025
Hey all, figured it out. Go to 'Configuration Parameters > Code Generation > Optimization > Default parameter behavior' and
set it to 'Tunable'. If it's set to 'Inlined' the values in constant block cannot be changed while simulation is running.

Weitere Antworten (0)

Tags

Produkte


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by