On speeding up co-simulation between Gazebo and Simulink

3 ビュー (過去 30 日間)
Haruki SHIMOTORI
Haruki SHIMOTORI 2021 年 2 月 20 日
回答済み: onlytwohand 2023 年 12 月 3 日
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.

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

回答 (1 件)

onlytwohand
onlytwohand 2023 年 12 月 3 日
a littlemistake in EKF_self_localization.m
In the project "self_localization_for_mobile_robot" which drived form github.com
There is a file "EKF_self_localization.m".
a command "Kt = St \ (EstPt * Ht'); "
It dose not agree with the article "IRobot Self-localization Using EKF.pdf" .
The correct command is "Kt = EstPt * Ht' / St;".
How do you thinf of it?
I can not mail you for no email address.
Any question, please send to yang@loongrail.net.
Guoqiang Yang

カテゴリ

Help Center および File ExchangeGazebo Co-Simulation についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by