-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
World Visualization Bug Fix If Objects Removed/Attached #80
Conversation
… and instead doing it in plugin_pybullet.py
…d and simplifying marker publishing of "simple objects" e.g. trays, cups and so on
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.
In test bowl and cup, there are no markers for the cup and bowl, after they were placed on the kitchen island.
if object_name not in self.currently_publishing_objects: | ||
return True | ||
return False | ||
object_names = [object_name for object_name, _ in objects_dict.items()] |
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.
world has a get_object_names
src/giskardpy/plugin_pybullet.py
Outdated
@@ -359,6 +359,10 @@ def attach_object(self, req): | |||
except: | |||
pass | |||
|
|||
def attach_existing_obj_to_robot(self, name, link, pose): | |||
self.unsafe_get_world().attach_existing_obj_to_robot(name, link, pose) | |||
self.remove_object(name) |
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.
This seems weird, the attach_existing_obj_to_robot
already removes the object. If you are doing it just to get rid of the marker, you should probably split up the remove_object
function.
# Simple objects (containing only one link) are published here: | ||
if link_name == object_name and len(object.get_link_names()) == 1: | ||
marker = object.as_marker_msg() | ||
markers.append(marker) |
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.
Doesn't that mean that the marker.id
and so on are not being set anymore? Is that intentional?
src/giskardpy/world.py
Outdated
@@ -161,7 +161,6 @@ def attach_existing_obj_to_robot(self, name, link, pose): | |||
""" | |||
# TODO this should know the object pose and not require it as input | |||
self._robot.attach_urdf_object(self.get_object(name), link, pose) | |||
self.remove_object(name) |
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.
Oh I don't like that. Attaching should definitely remove the object. The world class should work properly on its own.
@ichumuh Changed above wrt your comments and tested it with |
thx |
Basically changing
plugin_world_vis.has_environment_changed()
, so it detects if objects were deleted too. Moreover, ignoring of objects having only one link since they are managed fromplugin_pybullet
.