gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.2k stars 482 forks source link

gzclient: improve startup reliability #3338

Closed scpeters closed 1 year ago

scpeters commented 1 year ago

🦟 Bug fix

This is an additional fix for https://github.com/gazebosim/gazebo-classic/issues/681, following up from #3121

Summary

In #3121, a call to the /scene_info service was added in the Scene class to improve the reliability of initializing gzclient. This improved reliability, but I have still observed flaky gzclient startups, particularly when loading worlds with large Digital Elevation Maps (DEMs). I found another place where ~/request and ~/response topics are used to get scene info in the MainWindow class, which I suspect is an additional source of unreliable start-up behavior.

This applies similar changes from #3121 to the MainWindow class by getting scene info from the /scene_info service and falling back to using the request / response topics if the service is not available or the service call fails.

Checklist

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.