-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Avoid crashes and better warn when getting PROTO #6473
Conversation
Can you please fix the source tests which are failing to a wrong coding style? |
When at it. Is the log message on failure of |
I am not sure what is the exact difference between modelName and nodeModelName, can you explain it? |
According to the little knowledge I have about Webots, |
Yes, I found the confirmation here. I will propose an improvement to the terminology you used. |
FYI, I probably found the cause of the issue that brought me to this PR: #6474 . |
Avoid crashes and better warn when getting the PROTO in `WbSupervisorUtilities::getProtoParameterNodeInstance()`. Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
Avoid crashes and better warn when getting the PROTO in
WbSupervisorUtilities::getProtoParameterNodeInstance()
.Description
I discovered the bug when we used a cache to save nodes in Python. When calling
getPose()
orgetPosition()
we got an error message thatwb_supervisor_node_get_position() can exclusively be used with Pose (or derived)
. Now, the error message isCannot get the PROTO instance for node
LED(type LED).
plus the old message. This helped me fixing the bug in our code.Related Issues
None
Tasks
Add the list of tasks of this PR.
Documentation
No documentation change
Additional context
We probably save the result of
getMFNode()
in Python too soon because the pointed object is not a valid node later in our code (maybe the pointer changes when changing the DEF?).