the following problem I have: I built a simulink model to generate a standalone ros node. It is a simple controller. I would like to publish the data with 10 hz, so I defined the sample time (by the blank message) 0.1.
After building the model and running the ROS-node, I test the publisher frequency with
and I get 9.94, 9.95....
If I implement the same functionality in Python ROS-node, I get the desired 10 hz, so it must be some code generation issue and not the limitation of the target hardware.
Could you help me, how to have a more stable publishing rate in a generated Simulink ROS-node?