On speeding up co-simulation between Gazebo and Simulink

1 ビュー (過去 30 日間)
Haruki Shimotori
Haruki Shimotori 2021 年 2 月 20 日
コメント済み: Gaurav Bhosale 2021 年 2 月 22 日
Hello.
This question helped me understand why shortening the step time of the cosimulation increases the simulation time.
The CPU usage of my PC at this time was about 80% (both Windows and virtual machine Ubuntu). For some reason, the CPU was not used to its limit, so I figured that increasing the specs of my PC would shorten the simulation time.
However, I thought that if there is a problem such as a speed limit on the process of co-simulation between Matlab and Gazebo, then increasing the specs of my PC would not reduce the simulation time.
I have no idea, because I don't know how the co-simulation is done between Matlab and Gazebo. Does increasing the specs of my PC reduce the simulation time?
Best regards.
  1 件のコメント
Gaurav Bhosale
Gaurav Bhosale 2021 年 2 月 22 日
Hi Haruki,
When you launch Gazebo, it runs faster as it is Play mode. But, Gazebo Co-Simulation provides lock stepping and synchronization between Simulink and Gazebo, which need Gazebo single step call ( world->Step() ). So, the single stepping in Gazebo is takes more time as it is 'Play' - 'Pause' mode. Further, it will be more costly if the Simulation invloves senosor like camera, lidar. i.e. sensor simulation in Gazebo. on other hand, the message exchange adds few seconds but the major processing time is needed for Gazebo stepping.
Therefore, increasing specs of PC will help you at some extend but the incrasing sample time or decreasing sensor update rate can help you more for fast simulation.
Thanks.

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by