-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix adding system to non-existent entity #2516
Conversation
Signed-off-by: Ian Chen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I've only got a minor issue over the logging.
src/SystemManager.cc
Outdated
// otherwise check if entity exists before attempting to load the plugin. | ||
else if (!this->entityCompMgr->HasEntity(entity)) | ||
{ | ||
gzwarn << "Unable to add plugins to Entity: '" << entity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth setting to gzerr
as by default end users don't see any indication of failure unless the enable logging at higher verbosities. In addition the add service should probable return false if we fail to add a object, but by default it always returns true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated this msg and the one above to gzerr
. 510a5dd
In addition the add service should probable return false if we fail to add a object, but by default it always returns true.
I noticed we do that in several places in gz-sim so that the requests can be handled asynchronously. The response data true
indicates that the request was handled but not necessarily successful. I added a todo note on this. Not sure if there's a way to set response data in an asynchronous way, maybe @caguero knows if it's currently possible?
Signed-off-by: Ian Chen <[email protected]>
🦟 Bug fix
Fixes #2508, #2511, and #2513
Summary
Checklist
codecheck
passed (See contributing)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.