Add error msgs to ensure friendly for novices when starting with custom plugin#3352
Add error msgs to ensure friendly for novices when starting with custom plugin#3352XINJIANGMO wants to merge 3 commits intogazebosim:gz-sim8from
Conversation
Signed-off-by: momo <2438833481@qq.com>
There was a problem hiding this comment.
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.
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()) |
There was a problem hiding this comment.
This is good, but we should have a way to override this for advance use cases.
There was a problem hiding this comment.
@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.
🦟 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
SceneBroadcasterwhen 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
SceneBroadcasterexists.Checklist
codecheckpassed (See contributing)