Real-time ROS2 customised messages perform slow pub/sub speed

4 vues (au cours des 30 derniers jours)
Le
Le le 7 Déc 2020
Dear ,
I develop a simulink program aiming to connect to an external computer in the same ROS2 domain and exchange data over pub/sub protocol. I also use "Real-Time synchronization" block in "Simulink Desktop Real-Time" to set to program running in real-time.
Both pub/sub work fine at the rate 100Hz using default messages type such as std_msgs/Float64, std_msgs_msgs/Int32, etc. without any missed tick. However, it gets really slow when I switch to custom defined messages, even for a very simple one containing only 1 std_msgs/Int32 value. The "missed tick" value increases to 300-500 and the clock of the program violates the real-time. I tried to use Gbit Ethernet connection between two computers but the performance just slightly improve. The 'missed tick' only drops to zero as I reduce the rate to 2-3 Hz which is too slow for my objective.
What could I do to improve the pub/sub speed using custom defined messages in Simulink?
Thank you

Réponses (1)

Jagadeesh Konakalla
Jagadeesh Konakalla le 7 Déc 2020
Hi Le,
Which version of MATLAB that you are using ?
Thanks
  2 commentaires
Le
Le le 7 Déc 2020
2020b
Jagadeesh Konakalla
Jagadeesh Konakalla le 8 Déc 2020
Hi Li,
There are some updates in the MATLAB Release 2020b Update 2 which related to performance improvements. I recommend you to install the update 2 version of R2020b.
Let me know if that does not work for you.
Jagadeesh K.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by