Real-time ROS2 customised messages perform slow pub/sub speed
13 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Jagadeesh Konakalla
2020-12-7
Hi Le,
Which version of MATLAB that you are using ?
Thanks
2 个评论
Jagadeesh Konakalla
2020-12-8
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!