-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Added ability to import objects with webots wbt type. Refactored the … #539
Conversation
…superviser file to allow for this feature addition. Signed-off-by: TBreeze98
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.
Thanks for your contribution! I am wondering if there is a use case for this new feature. What are MDT files, I never heard of them?
Before reviewing this PR, I would need more details about the usefulness of this new feature. Indeed, it allows to add a way to spawn objects from VRML strings. However, this is very limited because it will only be possible to import objects at the root level and not at the field level as the The existing alternative today would be to create its own supervisor node which would import the node from the string. Even if this requires a little more knowledge and steps to the users, it is a solution that does the same thing, or even more. Could you clarify why adding the import via a service is particularly useful? Do you have a particular use case? |
@ygoumaz No problem. This has lots of use cases available for people needing to spawn in objects at runtime for visual references, such as waypoints or to trace a path out that a robot has taken, or to create objects to use as obstacles when decided by the operator. The way i am using it is to create visual waypoints for a rover navigating around a world to help with debugging and visualising. So as the rover reaches one waypoint, another is calculated to move to and an object is spawned in for visualisation via the service. Please let me know if you need more explanation on the usefulness. |
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.
I have a few suggestions on the code. I have probably missed some renamings.
@ygoumaz Thanks for the suggestions, ive applied them all. Regarding the "added field type check" commit, Im not sure when the crash was introduced, possibly during the merges made by omichael, but it was causing crashes during the node removal on line 148 of ros2_supervisor.py |
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.
A few more remarks after my tests.
webots_ros2_driver/webots/lib/controller/python/controller/field.py
Outdated
Show resolved
Hide resolved
I merged latest changes of the master branch, including the correction of the bug in Also tests failure of rolling/testing are not related to your PR. |
Resolved all of your suggestions now. Please let me know if theres anything else @ygoumaz |
@ygoumaz will be off for a few weeks, so I am following-up on this one. It looks all good to me. I only have a few suggestions to improve the python code. |
Co-authored-by: Olivier Michel <[email protected]>
Co-authored-by: Olivier Michel <[email protected]>
Co-authored-by: Olivier Michel <[email protected]>
Co-authored-by: Olivier Michel <[email protected]>
Co-authored-by: Olivier Michel <[email protected]>
Co-authored-by: Olivier Michel <[email protected]>
Co-authored-by: Olivier Michel <[email protected]>
Co-authored-by: Olivier Michel <[email protected]>
@omichel Those changes all seem good, I have commited them all now. |
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.
Great. Thank you.
Hi @ad-daniel @omichel , |
I don't believe it was reverted, I reverted the commits in a test branch for debugging purposes but the changes should still be there in the main branch. I think it's a new feature of github, unless you have encountered any issue with this |
Ahh yeah, i see thats in a test branch now. I was encountering issues with the supervisor and saw that revert comment and thought it could be that. Found and fixed the issue now though. Thanks for the response. |
…superviser file to allow for this feature addition. Signed-off-by: TBreeze98
Description
Feature added: Added ability to import objects through the supervisor node at runtime.
Affected Packages
List of affected packages: