Real-time ROS2 customised messages perform slow pub/sub speed
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Antworten (1)
Jagadeesh Konakalla
am 7 Dez. 2020
Hi Le,
Which version of MATLAB that you are using ?
Thanks
2 Kommentare
Jagadeesh Konakalla
am 8 Dez. 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.
Siehe auch
Kategorien
Mehr zu Target Computer Setup finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!