Skip to content

Add error msgs to ensure friendly for novices when starting with custom plugin#3352

Open
XINJIANGMO wants to merge 3 commits intogazebosim:gz-sim8from
XINJIANGMO:fixbug-2967
Open

Add error msgs to ensure friendly for novices when starting with custom plugin#3352
XINJIANGMO wants to merge 3 commits intogazebosim:gz-sim8from
XINJIANGMO:fixbug-2967

Conversation

@XINJIANGMO
Copy link
Contributor

🦟 Bug fix

Fixes #2967

Summary

when novices use custom plugins to start simulation , custom plugin will disable default plugins.
if costom plugins even do not specify physics egine , leading to no update phase and simulation can not run well.

Before fix : novices might be confused about if it's wrong installation , actually wrong usage.
After fix: give users tips to add at least physics engine to make simultion run well.

related PR PR#3334 . #3334 ensure auto-loading SceneBroadcaster when users necessaay(use gui)

combine this PR with #3334 , making sure that novices can follow the tip to add the physics engine and not confused about installaion issue due to SceneBroadcaster exists.

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the fix (as needed)
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.

Signed-off-by: momo <2438833481@qq.com>
Copilot AI review requested due to automatic review settings February 25, 2026 09:49
@XINJIANGMO XINJIANGMO requested a review from arjo129 as a code owner February 25, 2026 09:49
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Feb 25, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a one-time runtime diagnostic to help novice users understand why simulations may not advance when custom world plugins disable the default systems (notably physics).

Changes:

  • Track whether a “no Update systems” warning has been emitted.
  • Emit a message when the Update-phase system list is empty, suggesting adding a physics engine system plugin.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/SimulationRunner.hh Adds a new boolean flag to track whether the “no update systems” condition has been reported.
src/SimulationRunner.cc Logs a one-time message when there are no Update-phase systems running.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

XINJIANGMO and others added 2 commits February 25, 2026 18:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Oscmoar07 <108773152+XINJIANGMO@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Oscmoar07 <108773152+XINJIANGMO@users.noreply.github.com>

{
GZ_PROFILE("Update");
if (!this->checkedUpdateSystems && this->systemMgr->SystemsUpdate().empty())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, but we should have a way to override this for advance use cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azeey Thanks for your feedback! I consider that add env variable to allow advanced use to override it and supress this error message when they try to run simulation without any update system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎵 harmonic Gazebo Harmonic

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

3 participants